|
@@ -188,7 +188,7 @@
|
|
|
<div class="buttons" v-if="zhankai1">
|
|
|
<button @click="sc">筛选</button>
|
|
|
</div>
|
|
|
- <div v-if="zhankai2">
|
|
|
+ <div v-if="zhankai2" v-show="!show">
|
|
|
<el-table :data="tableData" border style="width: 100%">
|
|
|
<el-table-column
|
|
|
align="center"
|
|
@@ -308,42 +308,30 @@
|
|
|
</van-popup>
|
|
|
</div>
|
|
|
|
|
|
- <!-- <div>
|
|
|
+ <div>
|
|
|
<van-field
|
|
|
- readonly
|
|
|
- clickable
|
|
|
+ v-model="value_dubanren"
|
|
|
+ name="督办责任人"
|
|
|
label="督办责任人"
|
|
|
- :value="value8"
|
|
|
- placeholder="请选择"
|
|
|
- @click="showPicker8 = true"
|
|
|
+ placeholder="请选择督办责任人"
|
|
|
+ @click="open_overlay()"
|
|
|
/>
|
|
|
- <van-popup v-model="showPicker8" round position="bottom">
|
|
|
- <van-picker
|
|
|
- show-toolbar
|
|
|
- :columns="columns8"
|
|
|
- @cancel="showPicker8 = false"
|
|
|
- @confirm="onConfirm8"
|
|
|
- />
|
|
|
- </van-popup>
|
|
|
- </div> -->
|
|
|
+ </div>
|
|
|
|
|
|
- <van-field
|
|
|
- v-model="fieldValue_duBanRen"
|
|
|
- is-link
|
|
|
- readonly
|
|
|
- label="督办责任人"
|
|
|
- placeholder="请选择督办责任人"
|
|
|
- @click="show_duBanRen = true"
|
|
|
- />
|
|
|
- <van-popup v-model="show_duBanRen" round position="bottom">
|
|
|
- <van-cascader
|
|
|
- v-model="cascaderValue_duBanRen"
|
|
|
- title="请选择督办责任人"
|
|
|
- :options="options"
|
|
|
- @close="show_duBanRen = false"
|
|
|
- @finish="onFinish_duBanRen"
|
|
|
+ <!-- 遮罩层 -->
|
|
|
+ <van-overlay :show="show" class="overlay" style="z-index: 999;">
|
|
|
+ <van-tree-select
|
|
|
+ :items="items"
|
|
|
+ :active-id.sync="activeIds"
|
|
|
+ :main-active-index.sync="activeIndex"
|
|
|
+ height="92%"
|
|
|
+ @click-item="right_click"
|
|
|
/>
|
|
|
- </van-popup>
|
|
|
+
|
|
|
+ <div class="buttons">
|
|
|
+ <button @click="overlay_click()">确认</button>
|
|
|
+ </div>
|
|
|
+ </van-overlay>
|
|
|
|
|
|
<div>
|
|
|
<van-field
|
|
@@ -388,6 +376,12 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ show: false,
|
|
|
+ value_dubanren: "",
|
|
|
+ items: [],
|
|
|
+ activeIds: [],
|
|
|
+ activeIndex: 0,
|
|
|
+
|
|
|
token: "89",
|
|
|
|
|
|
shows: true,
|
|
@@ -528,7 +522,7 @@ export default {
|
|
|
fieldValue_jianChaRen: "",
|
|
|
cascaderValue_jianChaRen: "",
|
|
|
|
|
|
- jianChaRen_key:"",
|
|
|
+ jianChaRen_key: "",
|
|
|
|
|
|
options: [],
|
|
|
};
|
|
@@ -595,12 +589,12 @@ export default {
|
|
|
this.value7 = value;
|
|
|
this.showPicker7 = false;
|
|
|
},
|
|
|
- onConfirm8(value, index) {
|
|
|
- this.staffArr_id = this.staffArr[index].id;
|
|
|
+ // onConfirm8(value, index) {
|
|
|
+ // this.staffArr_id = this.staffArr[index].id;
|
|
|
|
|
|
- this.value8 = value;
|
|
|
- this.showPicker8 = false;
|
|
|
- },
|
|
|
+ // this.value8 = value;
|
|
|
+ // this.showPicker8 = false;
|
|
|
+ // },
|
|
|
onConfirm9(value, index) {
|
|
|
this.zhengGaiType = index + 1;
|
|
|
|
|
@@ -647,20 +641,19 @@ export default {
|
|
|
// 初始化筛选数据
|
|
|
// 风险点
|
|
|
this.riskPointArr = res.data.data.riskPointArr;
|
|
|
- this.riskPointArr.unshift({key:"0",value:"请选择"})
|
|
|
- console.log(this.riskPointArr)
|
|
|
+ this.riskPointArr.unshift({ key: "0", value: "请选择" });
|
|
|
+ // console.log(this.riskPointArr);
|
|
|
// 风险类型
|
|
|
this.riskTypeArr = res.data.data.riskTypeArr;
|
|
|
- this.riskTypeArr.unshift({key:"0",value:"请选择"})
|
|
|
+ this.riskTypeArr.unshift({ key: "0", value: "请选择" });
|
|
|
|
|
|
// 风险等级
|
|
|
this.riskLevelArr = res.data.data.riskLevelArr;
|
|
|
- this.riskLevelArr.unshift({key:"0",value:"请选择"})
|
|
|
+ this.riskLevelArr.unshift({ key: "0", value: "请选择" });
|
|
|
|
|
|
// 事故类型
|
|
|
this.accidentTypeArr = res.data.data.accidentTypeArr;
|
|
|
- this.accidentTypeArr.unshift({key:"0",value:"请选择"})
|
|
|
-
|
|
|
+ this.accidentTypeArr.unshift({ key: "0", value: "请选择" });
|
|
|
|
|
|
// 检查专业
|
|
|
this.inspectionSpecialtyArr = res.data.data.inspectionSpecialtyArr;
|
|
@@ -803,7 +796,16 @@ export default {
|
|
|
}
|
|
|
|
|
|
if (this.zhengGaiType == 1) {
|
|
|
- this.dates = "";
|
|
|
+ var date = new Date();
|
|
|
+
|
|
|
+ let year = date.getFullYear()
|
|
|
+ let month = parseInt(date.getMonth()+1)
|
|
|
+ let day = date.getDate()
|
|
|
+ if(day < 10){
|
|
|
+ day = '0'+day
|
|
|
+ }
|
|
|
+ console.log(year+"-"+ month +"-"+day)
|
|
|
+ this.dates = year+"-"+ month +"-"+day
|
|
|
}
|
|
|
|
|
|
this.$http
|
|
@@ -840,7 +842,7 @@ export default {
|
|
|
inspection_location: this.inspection_location,
|
|
|
|
|
|
// 检查人id
|
|
|
- inspected_person: this.jianChaRen_key
|
|
|
+ inspected_person: this.jianChaRen_key,
|
|
|
}
|
|
|
)
|
|
|
.then((res) => {
|
|
@@ -862,20 +864,22 @@ export default {
|
|
|
this.fieldValue_zhengGaiRen = selectedOptions
|
|
|
.map((option) => option.text)
|
|
|
.join("--");
|
|
|
+ console.log(selectedOptions)
|
|
|
|
|
|
- this.zhengGaiRen_id = selectedOptions[1].value;
|
|
|
+ this.zhengGaiRen_id = selectedOptions[1].id;
|
|
|
},
|
|
|
|
|
|
// 选择督办责任人
|
|
|
|
|
|
- onFinish_duBanRen({ selectedOptions }) {
|
|
|
- this.show_duBanRen = false;
|
|
|
- this.fieldValue_duBanRen = selectedOptions
|
|
|
- .map((option) => option.text)
|
|
|
- .join("--");
|
|
|
+ // onFinish_duBanRen({ selectedOptions }) {
|
|
|
+ // this.show_duBanRen = false;
|
|
|
|
|
|
- this.staffArr_id = selectedOptions[1].value;
|
|
|
- },
|
|
|
+ // this.fieldValue_duBanRen = selectedOptions
|
|
|
+ // .map((option) => option.text)
|
|
|
+ // .join("--");
|
|
|
+
|
|
|
+ // this.staffArr_id = selectedOptions[1].value;
|
|
|
+ // },
|
|
|
|
|
|
// 选择检查人
|
|
|
|
|
@@ -885,7 +889,10 @@ export default {
|
|
|
.map((option) => option.text)
|
|
|
.join("--");
|
|
|
|
|
|
- this.jianChaRen_key = selectedOptions[1].value;
|
|
|
+ console.log(selectedOptions)
|
|
|
+ this.jianChaRen_key = selectedOptions[1].id;
|
|
|
+
|
|
|
+ console.log(this.jianChaRen_key)
|
|
|
},
|
|
|
|
|
|
// 获取部门、人
|
|
@@ -896,15 +903,68 @@ export default {
|
|
|
{}
|
|
|
)
|
|
|
.then((res) => {
|
|
|
+ // console.log(res.data.data);
|
|
|
this.options = res.data.data;
|
|
|
+
|
|
|
+ this.items = res.data.data;
|
|
|
+
|
|
|
+
|
|
|
+ this.items.map((item,index)=>{
|
|
|
+ // console.log(item.children.map(v=>{return {id: v.value ,text:v.text}}))
|
|
|
+
|
|
|
+ item.children = item.children.map(v=>{return {id: v.value ,text:v.text}})
|
|
|
+ })
|
|
|
+
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
+ open_overlay() {
|
|
|
+ this.show = true;
|
|
|
+ this.value_dubanren = "";
|
|
|
+ },
|
|
|
+ overlay_click() {
|
|
|
+ this.show = false;
|
|
|
+
|
|
|
+ this.activeIds.map((item, index) => {
|
|
|
+ // console.log(item);
|
|
|
+
|
|
|
+ let activeIds_item = item;
|
|
|
+
|
|
|
+ this.staffArr.map((item, index) => {
|
|
|
+ // console.log(activeIds_item);
|
|
|
+ // console.log(item.id);
|
|
|
+
|
|
|
+ if (activeIds_item == item.id) {
|
|
|
+ // console.log(item.name);
|
|
|
+
|
|
|
+ this.value_dubanren += item.name + " , "
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ console.log(this.activeIds);
|
|
|
+
|
|
|
+ this.staffArr_id = " "
|
|
|
+ this.activeIds.map((item,index)=>{
|
|
|
+ this.staffArr_id += item + ","
|
|
|
+ })
|
|
|
+ this.staffArr_id = this.staffArr_id.substring(0, this.staffArr_id.lastIndexOf(','));
|
|
|
+
|
|
|
+ console.log(this.staffArr_id)
|
|
|
+
|
|
|
+ },
|
|
|
+ right_click(e) {
|
|
|
+
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
document.body.style.backgroundColor = "#f0f0f0"; //背景色
|
|
|
|
|
|
this.getStaffAndSectionData(), this.getRiskAndTroubleshootConfigData();
|
|
|
this.getSectionStaff();
|
|
|
+
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -978,4 +1038,9 @@ export default {
|
|
|
color: #fff;
|
|
|
background: #39f;
|
|
|
}
|
|
|
+
|
|
|
+.overlay {
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 25px;
|
|
|
+}
|
|
|
</style>
|