|
@@ -4,30 +4,33 @@
|
|
|
<view style="height:30rpx"></view>
|
|
|
<view class="form-item">
|
|
|
<view class="title">
|
|
|
- <!-- <text class="necessary">*</text> -->
|
|
|
+ <text class="necessary">*</text>
|
|
|
户号:
|
|
|
</view>
|
|
|
- <input name="input" v-model="formMess.deviceNo"></input>
|
|
|
+ <input name="input" v-model="formMess.account_number"></input>
|
|
|
</view>
|
|
|
<view class="form-item">
|
|
|
- <view class="title">流变变比:</view>
|
|
|
- <input name="input" v-model="formMess.deviceName"></input>
|
|
|
+ <view class="title"><text class="necessary">*</text>流变变比:</view>
|
|
|
+ <input name="input" v-model="formMess.rheological_change"></input>
|
|
|
</view>
|
|
|
<view class="form-item">
|
|
|
- <view class="title" style="width:240rpx">单路电源容量:</view>
|
|
|
- <input name="input" v-model="formMess.deviceName"></input>
|
|
|
+ <view class="title" style="width:240rpx"><text class="necessary">*</text>单路电源容量:</view>
|
|
|
+ <input name="input" v-model="formMess.power_capacity"></input>
|
|
|
</view>
|
|
|
<view class="form-item">
|
|
|
- <view class="title">线路:</view>
|
|
|
- <input name="input" v-model="formMess.deviceName"></input>
|
|
|
+ <view class="title"><text class="necessary">*</text>线路:</view>
|
|
|
+ <input name="input" v-model="formMess.route_id"></input>
|
|
|
</view>
|
|
|
<view class="form-item">
|
|
|
- <view class="title">站点名称:</view>
|
|
|
- <input name="input" v-model="formMess.deviceName"></input>
|
|
|
+ <view class="title"><text class="necessary">*</text>站点名称:</view>
|
|
|
+ <select name="" id="" v-model="formMess.site_id" filterable clearable>
|
|
|
+ <!-- <option value="0">请选择</option> -->
|
|
|
+ <option :value="item.id" v-for="item in siteListData">{{ item.site_name}}</option>
|
|
|
+ </select>
|
|
|
</view>
|
|
|
<view class="form-item">
|
|
|
- <view class="title">监察:</view>
|
|
|
- <input name="input" v-model="formMess.deviceName"></input>
|
|
|
+ <view class="title"><text class="necessary">*</text>监察:</view>
|
|
|
+ <input name="input" v-model="formMess.supervision_department_id"></input>
|
|
|
</view>
|
|
|
|
|
|
<view class="info-tit margin-left-xs">
|
|
@@ -35,57 +38,57 @@
|
|
|
四防一通
|
|
|
</view>
|
|
|
<view class="form-item extraDis">
|
|
|
- <view class="title">电缆孔洞:</view>
|
|
|
- <radio-group name="gender">
|
|
|
+ <view class="title"><text class="necessary">*</text>电缆孔洞:</view>
|
|
|
+ <radio-group name="formMess.cable_hole" @change="radioChange">
|
|
|
<label class="margin-right-xl">
|
|
|
- <radio value="是" checked /><text>是</text>
|
|
|
+ <radio value="1"/><text>是</text>
|
|
|
</label>
|
|
|
<label>
|
|
|
- <radio value="否" /><text>否</text>
|
|
|
+ <radio value="0" checked /><text>否</text>
|
|
|
</label>
|
|
|
</radio-group>
|
|
|
</view>
|
|
|
<view class="form-item extraDis">
|
|
|
- <view class="title">门窗、墙壁破损:</view>
|
|
|
- <radio-group name="gender">
|
|
|
+ <view class="title"><text class="necessary">*</text>门窗、墙壁破损:</view>
|
|
|
+ <radio-group name="formMess.damage" @change="radioChange">
|
|
|
<label class="margin-right-xl">
|
|
|
- <radio value="是" checked /><text>是</text>
|
|
|
+ <radio value="1"/><text>是</text>
|
|
|
</label>
|
|
|
<label>
|
|
|
- <radio value="否" /><text>否</text>
|
|
|
+ <radio value="0" checked /><text>否</text>
|
|
|
</label>
|
|
|
</radio-group>
|
|
|
</view>
|
|
|
<view class="form-item extraDis">
|
|
|
- <view class="title">屋顶墙壁渗漏水:</view>
|
|
|
- <radio-group name="gender">
|
|
|
+ <view class="title"><text class="necessary">*</text>屋顶墙壁渗漏水:</view>
|
|
|
+ <radio-group name="formMess.water_leakage" @change="radioChange">
|
|
|
<label class="margin-right-xl">
|
|
|
- <radio value="是" checked /><text>是</text>
|
|
|
+ <radio value="1"/><text>是</text>
|
|
|
</label>
|
|
|
<label>
|
|
|
- <radio value="否" /><text>否</text>
|
|
|
+ <radio value="0" checked /><text>否</text>
|
|
|
</label>
|
|
|
</radio-group>
|
|
|
</view>
|
|
|
<view class="form-item extraDis">
|
|
|
- <view class="title">灭火器配置不足:</view>
|
|
|
- <radio-group name="gender">
|
|
|
+ <view class="title"><text class="necessary">*</text>灭火器配置不足:</view>
|
|
|
+ <radio-group name="formMess.annihilator_insufficient_configuration">
|
|
|
<label class="margin-right-xl">
|
|
|
- <radio value="是" checked /><text>是</text>
|
|
|
+ <radio value="1"/><text>是</text>
|
|
|
</label>
|
|
|
<label>
|
|
|
- <radio value="否" /><text>否</text>
|
|
|
+ <radio value="0" checked /><text>否</text>
|
|
|
</label>
|
|
|
</radio-group>
|
|
|
</view>
|
|
|
<view class="form-item extraDis">
|
|
|
- <view class="title">灭火器超期:</view>
|
|
|
- <radio-group name="gender">
|
|
|
+ <view class="title"><text class="necessary">*</text>灭火器超期:</view>
|
|
|
+ <radio-group name="formMess.annihilator_overdue">
|
|
|
<label class="margin-right-xl">
|
|
|
- <radio value="是" checked /><text>是</text>
|
|
|
+ <radio value="1"/><text>是</text>
|
|
|
</label>
|
|
|
<label>
|
|
|
- <radio value="否" /><text>否</text>
|
|
|
+ <radio value="0" checked /><text>否</text>
|
|
|
</label>
|
|
|
</radio-group>
|
|
|
</view>
|
|
@@ -95,35 +98,47 @@
|
|
|
室内环境
|
|
|
</view>
|
|
|
<view class="form-item extraDis">
|
|
|
- <view class="title">堆放杂物:</view>
|
|
|
- <radio-group name="gender">
|
|
|
+ <view class="title"><text class="necessary">*</text>堆放杂物:</view>
|
|
|
+ <radio-group name="formMess.pile_up_sundries">
|
|
|
<label class="margin-right-xl">
|
|
|
- <radio value="是" checked /><text>是</text>
|
|
|
+ <radio value="1"/><text>是</text>
|
|
|
</label>
|
|
|
<label>
|
|
|
- <radio value="否" /><text>否</text>
|
|
|
+ <radio value="0" checked /><text>否</text>
|
|
|
</label>
|
|
|
</radio-group>
|
|
|
</view>
|
|
|
<view class="form-item extraDis">
|
|
|
- <view class="title">积灰严重:</view>
|
|
|
- <radio-group name="gender">
|
|
|
+ <view class="title"><text class="necessary">*</text>积灰严重:</view>
|
|
|
+ <radio-group name="formMess.serious_ash_deposition">
|
|
|
<label class="margin-right-xl">
|
|
|
- <radio value="是" checked /><text>是</text>
|
|
|
+ <radio value="1"/><text>是</text>
|
|
|
</label>
|
|
|
<label>
|
|
|
- <radio value="否" /><text>否</text>
|
|
|
+ <radio value="0" checked /><text>否</text>
|
|
|
</label>
|
|
|
</radio-group>
|
|
|
</view>
|
|
|
<view class="form-item extraDis">
|
|
|
- <view class="title">配电房周围环境潮湿:</view>
|
|
|
- <radio-group name="gender">
|
|
|
+ <view class="title"><text class="necessary">*</text>配电房周围环境潮湿:</view>
|
|
|
+ <radio-group name="formMess.around_environment_humid">
|
|
|
<label class="margin-right-xl">
|
|
|
- <radio value="是" checked /><text>是</text>
|
|
|
+ <radio value="1"/><text>是</text>
|
|
|
</label>
|
|
|
<label>
|
|
|
- <radio value="否" /><text>否</text>
|
|
|
+ <radio value="0" checked /><text>否</text>
|
|
|
+ </label>
|
|
|
+ </radio-group>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="form-item extraDis">
|
|
|
+ <view class="title"><text class="necessary">*</text>配电房周围对方杂物:</view>
|
|
|
+ <radio-group name="formMess.around_pile_up_sundries">
|
|
|
+ <label class="margin-right-xl">
|
|
|
+ <radio value="1"/><text>是</text>
|
|
|
+ </label>
|
|
|
+ <label>
|
|
|
+ <radio value="0" checked /><text>否</text>
|
|
|
</label>
|
|
|
</radio-group>
|
|
|
</view>
|
|
@@ -133,35 +148,35 @@
|
|
|
电工
|
|
|
</view>
|
|
|
<view class="form-item extraDis">
|
|
|
- <view class="title">无电工:</view>
|
|
|
- <radio-group name="gender">
|
|
|
+ <view class="title"><text class="necessary">*</text>无电工:</view>
|
|
|
+ <radio-group name="formMess.no_electrician">
|
|
|
<label class="margin-right-xl">
|
|
|
- <radio value="是" checked /><text>是</text>
|
|
|
+ <radio value="1"/><text>是</text>
|
|
|
</label>
|
|
|
<label>
|
|
|
- <radio value="否" /><text>否</text>
|
|
|
+ <radio value="0" checked /><text>否</text>
|
|
|
</label>
|
|
|
</radio-group>
|
|
|
</view>
|
|
|
<view class="form-item extraDis">
|
|
|
- <view class="title">电工人数配置不足:</view>
|
|
|
- <radio-group name="gender">
|
|
|
+ <view class="title"><text class="necessary">*</text>电工人数配置不足:</view>
|
|
|
+ <radio-group name="formMess.electrician_lack">
|
|
|
<label class="margin-right-xl">
|
|
|
- <radio value="是" checked /><text>是</text>
|
|
|
+ <radio value="1"/><text>是</text>
|
|
|
</label>
|
|
|
<label>
|
|
|
- <radio value="否" /><text>否</text>
|
|
|
+ <radio value="0" checked /><text>否</text>
|
|
|
</label>
|
|
|
</radio-group>
|
|
|
</view>
|
|
|
<view class="form-item extraDis">
|
|
|
- <view class="title">电工证超期:</view>
|
|
|
- <radio-group name="gender">
|
|
|
+ <view class="title"><text class="necessary">*</text>电工证超期:</view>
|
|
|
+ <radio-group name="formMess.overdue_electrician_certificate">
|
|
|
<label class="margin-right-xl">
|
|
|
- <radio value="是" checked /><text>是</text>
|
|
|
+ <radio value="1"/><text>是</text>
|
|
|
</label>
|
|
|
<label>
|
|
|
- <radio value="否" /><text>否</text>
|
|
|
+ <radio value="0" checked /><text>否</text>
|
|
|
</label>
|
|
|
</radio-group>
|
|
|
</view>
|
|
@@ -173,13 +188,13 @@
|
|
|
电试
|
|
|
</view>
|
|
|
<view class="form-item extraDis">
|
|
|
- <view class="title">电试超期:</view>
|
|
|
- <radio-group name="gender">
|
|
|
+ <view class="title"><text class="necessary">*</text>电试超期:</view>
|
|
|
+ <radio-group name="formMess.electric_test_overdue">
|
|
|
<label class="margin-right-xl">
|
|
|
- <radio value="是" checked /><text>是</text>
|
|
|
+ <radio value="1"/><text>是</text>
|
|
|
</label>
|
|
|
<label>
|
|
|
- <radio value="否" /><text>否</text>
|
|
|
+ <radio value="0" checked /><text>否</text>
|
|
|
</label>
|
|
|
</radio-group>
|
|
|
</view>
|
|
@@ -191,7 +206,7 @@
|
|
|
</view>
|
|
|
<view class="form-item extraDis">
|
|
|
<view class="title">设备老旧(标明出厂或投运日期):</view>
|
|
|
- <input type="text" style="width:35%">
|
|
|
+ <input type="text" style="width:35%" v-model="formMess.old_equipment">
|
|
|
</view>
|
|
|
|
|
|
<!-- 安全工器具 -->
|
|
@@ -200,24 +215,24 @@
|
|
|
安全工器具
|
|
|
</view>
|
|
|
<view class="form-item extraDis">
|
|
|
- <view class="title">配置不足(绝缘体):</view>
|
|
|
- <radio-group name="gender">
|
|
|
+ <view class="title"><text class="necessary">*</text>配置不足(绝缘体):</view>
|
|
|
+ <radio-group name="formMess.blanket_insufficient_configuration">
|
|
|
<label class="margin-right-xl">
|
|
|
- <radio value="是" checked /><text>是</text>
|
|
|
+ <radio value="1"/><text>是</text>
|
|
|
</label>
|
|
|
<label>
|
|
|
- <radio value="否" /><text>否</text>
|
|
|
+ <radio value="0" checked /><text>否</text>
|
|
|
</label>
|
|
|
</radio-group>
|
|
|
</view>
|
|
|
<view class="form-item extraDis">
|
|
|
- <view class="title">接地线与存放位置编号:</view>
|
|
|
- <radio-group name="gender">
|
|
|
+ <view class="title"><text class="necessary">*</text>接地线与存放位置编号:</view>
|
|
|
+ <radio-group name="formMess.ground_wire">
|
|
|
<label class="margin-right-xl">
|
|
|
- <radio value="是" checked /><text>是</text>
|
|
|
+ <radio value="1"/><text>是</text>
|
|
|
</label>
|
|
|
<label>
|
|
|
- <radio value="否" /><text>否</text>
|
|
|
+ <radio value="0" checked /><text>否</text>
|
|
|
</label>
|
|
|
</radio-group>
|
|
|
</view>
|
|
@@ -228,31 +243,26 @@
|
|
|
模拟屏
|
|
|
</view>
|
|
|
<view class="form-item extraDis">
|
|
|
- <view class="title">模拟屏:</view>
|
|
|
- <radio-group name="gender">
|
|
|
+ <view class="title"><text class="necessary">*</text>模拟屏:</view>
|
|
|
+ <radio-group name="formMess.analog_screen">
|
|
|
<label class="margin-right-xl">
|
|
|
- <radio value="是" checked /><text>是</text>
|
|
|
+ <radio value="1"/><text>是</text>
|
|
|
</label>
|
|
|
<label>
|
|
|
- <radio value="否" /><text>否</text>
|
|
|
+ <radio value="0" checked /><text>否</text>
|
|
|
</label>
|
|
|
</radio-group>
|
|
|
</view>
|
|
|
<view class="form-item">
|
|
|
<view class="title">备注:</view>
|
|
|
- <input type="text">
|
|
|
+ <input type="text" v-model="formMess.remarks">
|
|
|
</view>
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
<view class="btn-area submitBottomBtn padding-lr-sm " style="position:static">
|
|
|
- <button class="bg-blue round margin-top" @click="submit()">提 交 </button>
|
|
|
+ <button class="bg-blue round margin-top" @click="addSubmit">提 交 </button>
|
|
|
</view>
|
|
|
<br>
|
|
|
</form>
|
|
|
-
|
|
|
-
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -261,28 +271,163 @@
|
|
|
|
|
|
data() {
|
|
|
return {
|
|
|
- index: -1,
|
|
|
-
|
|
|
- type: '0',
|
|
|
-
|
|
|
- isShow: false,
|
|
|
+ siteListData:[],
|
|
|
+ radioOne: 1,
|
|
|
formMess: {
|
|
|
- "userName": "sss",
|
|
|
- "siteName": "",
|
|
|
- "place": "",
|
|
|
- "longitude": "",
|
|
|
- "dimension": "",
|
|
|
- "contactor": "",
|
|
|
- "mobile": "",
|
|
|
+ "account_number": "",
|
|
|
+ "rheological_change": "",
|
|
|
+ "power_capacity": "",
|
|
|
+ "route_id": "",
|
|
|
+ "site_id": "",
|
|
|
+ "supervision_department_id": "",
|
|
|
+
|
|
|
+ "cable_hole": "",
|
|
|
+ "damage": "",
|
|
|
+ "water_leakage": "",
|
|
|
+ "annihilator_insufficient_configuration": "",
|
|
|
+ "annihilator_overdue": "",
|
|
|
+
|
|
|
+ "pile_up_sundries": "",
|
|
|
+ "serious_ash_deposition": "",
|
|
|
+ "around_environment_humid": "",
|
|
|
+ "around_pile_up_sundries": "",
|
|
|
+
|
|
|
+ "no_electrician": "",
|
|
|
+ "electrician_lack": "",
|
|
|
+ "overdue_electrician_certificate": "",
|
|
|
+
|
|
|
+ "electric_test_overdue": "",
|
|
|
+
|
|
|
+ "old_equipment": "",
|
|
|
+
|
|
|
+ "blanket_insufficient_configuration": "",
|
|
|
+ "ground_wire": "",
|
|
|
+
|
|
|
+
|
|
|
+ "analog_screen": "",
|
|
|
+ "remarks": "",
|
|
|
},
|
|
|
|
|
|
|
|
|
}
|
|
|
},
|
|
|
onLoad: function(option) {
|
|
|
+ this.getDataList()
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ //数据请求
|
|
|
+ async getDataList(params = {}) {
|
|
|
+ const res = await this.$myRequest({
|
|
|
+ url: 'BlackoutPlan/getSiteBox',
|
|
|
+ showLoading: true,
|
|
|
+ data: params
|
|
|
+ })
|
|
|
+ console.log('res.data.data')
|
|
|
+ console.log(res.data.data)
|
|
|
+ this.siteListData = res.data.data
|
|
|
+ },
|
|
|
+
|
|
|
+ radioChange(e) {
|
|
|
+ console.log('type:' + e.detail.value);
|
|
|
+ this.radioOne = e.detail.value;
|
|
|
+ },
|
|
|
+
|
|
|
+ //新增提交
|
|
|
+ async addSubmit() {
|
|
|
+
|
|
|
+ //提交验证
|
|
|
+ if (!this.formMess.account_number) {
|
|
|
+ uni.showToast({
|
|
|
+ title: "请输入户号",
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.formMess.rheological_change) {
|
|
|
+ uni.showToast({
|
|
|
+ title: "请输入流变变化",
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.formMess.power_capacity) {
|
|
|
+ uni.showToast({
|
|
|
+ title: "请输入单路电源容量",
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.formMess.route_id) {
|
|
|
+ uni.showToast({
|
|
|
+ title: "请输入所属线路",
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.formMess.site_id) {
|
|
|
+ uni.showToast({
|
|
|
+ title: "请选择所属站点",
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.formMess.supervision_department_id) {
|
|
|
+ uni.showToast({
|
|
|
+ title: "请输入所属监察",
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ let res = await this.addArchive({
|
|
|
+ "account_number": this.formMess.account_number,
|
|
|
+ "rheological_change": this.formMess.rheological_change,
|
|
|
+ "power_capacity": this.formMess.power_capacity,
|
|
|
+ "route_id": this.formMess.route_id,
|
|
|
+ "site_id": this.formMess.site_id,
|
|
|
+ "supervision_department_id": this.formMess.supervision_department_id,
|
|
|
+ "cable_hole":this.radioOne,
|
|
|
+ "damage":this.radioOne,
|
|
|
+ "water_leakage":this.radioOne,
|
|
|
+ "annihilator_insufficient_configuration":this.radioOne,
|
|
|
+
|
|
|
+
|
|
|
+ "old_equipment": this.formMess.old_equipment,
|
|
|
+ "remarks": this.formMess.remarks,
|
|
|
+
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+ if (!res.data.flag) {
|
|
|
+ uni.showToast({
|
|
|
+ title: "添加失败",
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: "添加成功",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ setTimeout(() => {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/authManage/authManage',
|
|
|
+
|
|
|
+ });
|
|
|
+ }, 1000);
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ addArchive(params = {}) {
|
|
|
+ return this.$myRequest({
|
|
|
+ url: 'Archives/addArchives',
|
|
|
+ data: params
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|