diff --git a/components/select_measures/index.vue b/components/select_measures/index.vue
index d12f4df..2c5edfe 100644
--- a/components/select_measures/index.vue
+++ b/components/select_measures/index.vue
@@ -5,7 +5,7 @@
-
+
{{ item.PROTECTIVE_MEASURES }}
@@ -46,6 +46,11 @@ export default {
type: Number,
required: true,
default: 0
+ },
+ rowKey: {
+ type: String,
+ required: true,
+ default: ''
}
},
data() {
@@ -89,7 +94,7 @@ export default {
if (allSelectedMeasuresList.length > 0) {
for (let i = 0; i < allSelectedMeasuresList.length; i++) {
for (let j = 0; j < withSelectMeasuresList.length; j++) {
- if (allSelectedMeasuresList[i].BUS_BREAKGROUND_MEASURES_ID === withSelectMeasuresList[j].BUS_BREAKGROUND_MEASURES_ID) {
+ if (allSelectedMeasuresList[i][this.rowKey] === withSelectMeasuresList[j][this.rowKey]) {
withSelectMeasuresList.splice(j, 1)
}
}
@@ -113,7 +118,7 @@ export default {
const withSelectMeasuresList = this.withSelectMeasuresList
for (let i = 0; i < selectValue.length; i++) {
for (let j = 0; j < withSelectMeasuresList.length; j++) {
- if (selectValue[i] === withSelectMeasuresList[j].BUS_BREAKGROUND_MEASURES_ID) {
+ if (selectValue[i] === withSelectMeasuresList[j][this.rowKey]) {
value.push(withSelectMeasuresList[j])
}
}
diff --git a/pages/application/blindboard/blindboard-measures/blindboard-measures-detail.vue b/pages/application/blindboard/blindboard-measures/blindboard-measures-detail.vue
index 8ff4eba..953bfc9 100644
--- a/pages/application/blindboard/blindboard-measures/blindboard-measures-detail.vue
+++ b/pages/application/blindboard/blindboard-measures/blindboard-measures-detail.vue
@@ -8,68 +8,80 @@
-
-
- 安全防护措施
-
-
-
-
-
- 主要安全措施
-
-
-
-
-
- {{item.PROTECTIVE_MEASURES}}
-
-
-
- 确认单位:
-
- {{measuresList[index].DEPARTMENT_NAME?measuresList[index].DEPARTMENT_NAME:'请选择'}}
+
+
+ 安全防护措施
+
+
+
+
+
+
+
+
+ 确认单位:
+
+
+ {{item.DEPARTMENT_NAME?item.DEPARTMENT_NAME:'请选择'}}
-
-
-
-
- 确认人
-
-
- {{measuresList[index].USER_NAME?measuresList[index].USER_NAME:'请选择'}}
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ 确认人
+
+
+ {{item.USER_NAME?item.USER_NAME:'请选择'}}
+
+
+
+
+
+
+ 安全措施:
+
+
+
+
+
+ {{index1+1}} . {{item1.PROTECTIVE_MEASURES}}
+
+
+
+
+
-
-
+
+
-
- 签字照片:
-
-
-
-
+
+ 签字照片:
+
+
+
+
+
-
-
+
-
+
@@ -78,6 +90,7 @@
+
@@ -90,9 +103,10 @@
import gcoord from '@/common/gcoord.js'
import ruiDatePicker from '@/components/rattenking-dtpicker/rattenking-dtpicker.vue';
import detail from '@/pages/application/blindboard/blindboard-detail/index'
+ import selectMeasures from "@/components/select_measures/index.vue";
export default {
components: {
- tkiTree,ruiDatePicker,writingBoard,detail
+ tkiTree,ruiDatePicker,writingBoard,detail,selectMeasures
},
data() {
return {
@@ -102,6 +116,9 @@
treeNode:[],//部门下拉数据
pd:{},// 数据
measuresList:[],
+ measuresListCopy:[],
+ selectMeasuresShow:false,
+ selectMeasuresIndex:-1,
modalName:null,
imgList:[],
}
@@ -112,6 +129,7 @@
// 初始化现场作业负责人
this.getDept();
this.getMeasures();
+ this.addMeasuresListCopy();
loginSession();
},
methods: {
@@ -145,8 +163,72 @@
}
});
},
+ addMeasuresListCopy(){
+ this.measuresListCopy.push({
+ id:Math.random(),
+ DEPARTMENT_ID:'',
+ DEPARTMENT_NAME:'',
+ USER_ID:'',
+ USER_NAME:'',
+ userList:[],
+ userIndex:-1,
+ selectMeasures:[]
+ })
+ },
+ removeMeasuresListCopy(index){
+ this.measuresListCopy.splice(index,1)
+ },
+ fnSelectMeasures(index){
+ this.selectMeasuresShow = true
+ this.selectMeasuresIndex = index
+ },
- goSubmit(APPLY_STATUS){
+ showDeptTree(index) {
+ this.isUps=true
+ this.$refs['tkiTree'+index][0]._show();
+ },
+
+ deptTreeConfirm(e,i) {
+ this.isUps=false;
+ this.measuresListCopy[i].DEPARTMENT_ID=e[0].id;
+ this.measuresListCopy[i].DEPARTMENT_NAME=e[0].name;
+ this.measuresListCopy[i].USER_ID = ''
+ this.measuresListCopy[i].USER_NAME = ''
+ this.getUserList(e[0].id,i);
+ },
+
+ deptTreeCancel(e) {
+ this.isUps=false;
+ },
+
+ pickerUser(e,i) {
+ for (let j = 0; j < this.measuresListCopy.length; j++) {
+ if(this.measuresListCopy[j].USER_ID === this.measuresListCopy[i].userList[e.detail.value].USER_ID && i !== j){
+ uni.showToast({
+ icon: 'none',
+ title: '确认人不能重复',
+ duration: 1500
+ });
+ return;
+ }
+ }
+ this.measuresListCopy[i].userIndex = e.detail.value;
+ this.measuresListCopy[i].USER_ID=this.measuresListCopy[i].userList[e.detail.value].USER_ID;
+ this.measuresListCopy[i].USER_NAME=this.measuresListCopy[i].userList[e.detail.value].NAME;
+ this.$forceUpdate();//强制刷新
+ },
+
+ isBlankList(i) {
+ if (this.measuresListCopy[i].userList.length == 0) {
+ uni.showToast({
+ icon: 'none',
+ title: '请先选择确认单位',
+ duration: 1500
+ })
+ }
+ },
+
+ goSubmit(APPLY_STATUS){
var _this = this;
uni.showLoading({
title: '请稍候'
@@ -160,8 +242,8 @@
return;
}
if(APPLY_STATUS == 1){
- for (let i = 0; i < this.measuresList.length; i++) {
- const measures = this.measuresList[i]
+ for (let i = 0; i < this.measuresListCopy.length; i++) {
+ const measures = this.measuresListCopy[i]
if(!measures.USER_ID){
uni.showToast({
icon: 'none',
@@ -170,18 +252,38 @@
});
return;
}
+ if(measures.selectMeasures.length === 0){
+ uni.showToast({
+ icon: 'none',
+ title: '第'+(i+1)+'项未选择安全措施',
+ duration: 1500
+ });
+ return;
+ }
}
}
const formData={}
var files = [];
var signtime = [];
- const signers = this.measuresList.map(item => {
- return {
- BUS_BLINDBOARD_MEASURES_ID: item.BUS_BLINDBOARD_MEASURES_ID,
- USER_ID: item.USER_ID
- }
- })
+ var signers = [];
+ for (let i = 0; i < this.measuresListCopy.length; i++) {
+ const measures = this.measuresListCopy[i]
+ for (let j = 0; j < measures.selectMeasures.length; j++) {
+ signers.push({
+ BUS_BLINDBOARD_MEASURES_ID: measures.selectMeasures[j].BUS_BLINDBOARD_MEASURES_ID,
+ USER_ID: measures.USER_ID
+ })
+ }
+ }
+ if(signers.length !== this.measuresList.length){
+ uni.showToast({
+ icon: 'none',
+ title: '请为每个安全措施选择确认人',
+ duration: 1500
+ });
+ return;
+ }
this.uploadImgFaults(files,signtime)
formData.BLINDBOARD_ID = _this.pd.BLINDBOARD_ID
formData.SIGNTIME = signtime.join(",")
@@ -270,40 +372,6 @@
});
},
- showDeptTree(index) {
- this.isUps=true
- this.$refs['tkiTree'+index][0]._show();
- },
-
- deptTreeConfirm(e,i) {
- this.isUps=false;
- this.measuresList[i].DEPARTMENT_ID=e[0].id;
- this.measuresList[i].DEPARTMENT_NAME=e[0].name;
- this.measuresList[i].USER_ID = ''
- this.measuresList[i].USER_NAME = ''
- this.getUserList(e[0].id,i);
- },
-
- deptTreeCancel(e) {
- this.isUps=false;
- },
-
- pickerUser(e,i) {
- this.measuresList[i].userIndex = e.detail.value;
- this.measuresList[i].USER_ID=this.measuresList[i].userList[e.detail.value].USER_ID;
- this.measuresList[i].USER_NAME=this.measuresList[i].userList[e.detail.value].NAME;
- this.$forceUpdate();//强制刷新
- },
-
- isBlankList(i) {
- if (this.measuresList[i].userList.length == 0) {
- uni.showToast({
- icon: 'none',
- title: '请先选择确认单位',
- duration: 1500
- })
- }
- },
//获取人员列表
getUserList(dept,i){
@@ -324,7 +392,7 @@
},
success: function(res){
if("success" == res.data.result){
- _this.measuresList[i].userList = res.data.userList;
+ _this.measuresListCopy[i].userList = res.data.userList;
}else{
uni.showToast({
title: res.data.message,
@@ -372,5 +440,19 @@
diff --git a/pages/application/breakground/breakground-measures/breakground-measures-detail.vue b/pages/application/breakground/breakground-measures/breakground-measures-detail.vue
index 47ccf7a..e4a46d3 100644
--- a/pages/application/breakground/breakground-measures/breakground-measures-detail.vue
+++ b/pages/application/breakground/breakground-measures/breakground-measures-detail.vue
@@ -90,7 +90,7 @@
-
+
diff --git a/pages/application/confinedspace/confinedspace-measures/confinedspace-measures-detail.vue b/pages/application/confinedspace/confinedspace-measures/confinedspace-measures-detail.vue
index f82ee14..5aa7b94 100644
--- a/pages/application/confinedspace/confinedspace-measures/confinedspace-measures-detail.vue
+++ b/pages/application/confinedspace/confinedspace-measures/confinedspace-measures-detail.vue
@@ -6,70 +6,82 @@
-
+
-
-
- 安全防护措施
-
-
-
-
-
- 主要安全措施
-
-
-
-
-
- {{item.PROTECTIVE_MEASURES}}
-
-
-
- 确认单位:
-
- {{measuresList[index].DEPARTMENT_NAME?measuresList[index].DEPARTMENT_NAME:'请选择'}}
+
+
+ 安全防护措施
+
+
+
+
+
+
+
+
+ 确认单位:
+
+
+ {{item.DEPARTMENT_NAME?item.DEPARTMENT_NAME:'请选择'}}
-
-
-
-
- 确认人
-
-
- {{measuresList[index].USER_NAME?measuresList[index].USER_NAME:'请选择'}}
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ 确认人
+
+
+ {{item.USER_NAME?item.USER_NAME:'请选择'}}
+
+
+
+
+
+
+ 安全措施:
+
+
+
+
+
+ {{index1+1}} . {{item1.PROTECTIVE_MEASURES}}
+
+
+
+
+
-
-
+
+
-
- 签字照片:
-
-
-
-
+
+ 签字照片:
+
+
+
+
+
-
-
+
-
+
@@ -78,7 +90,8 @@
-
+
+
diff --git a/pages/application/cutroad/cutroad-measures/cutroad-measures-detail.vue b/pages/application/cutroad/cutroad-measures/cutroad-measures-detail.vue
index f3bc52a..901964d 100644
--- a/pages/application/cutroad/cutroad-measures/cutroad-measures-detail.vue
+++ b/pages/application/cutroad/cutroad-measures/cutroad-measures-detail.vue
@@ -8,68 +8,80 @@
-
-
- 安全防护措施
-
-
-
-
-
- 主要安全措施
-
-
-
-
-
- {{item.PROTECTIVE_MEASURES}}
-
-
-
- 确认单位:
-
- {{measuresList[index].DEPARTMENT_NAME?measuresList[index].DEPARTMENT_NAME:'请选择'}}
+
+
+ 安全防护措施
+
+
+
+
+
+
+
+
+ 确认单位:
+
+
+ {{item.DEPARTMENT_NAME?item.DEPARTMENT_NAME:'请选择'}}
-
-
-
-
- 确认人
-
-
- {{measuresList[index].USER_NAME?measuresList[index].USER_NAME:'请选择'}}
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ 确认人
+
+
+ {{item.USER_NAME?item.USER_NAME:'请选择'}}
+
+
+
+
+
+
+ 安全措施:
+
+
+
+
+
+ {{index1+1}} . {{item1.PROTECTIVE_MEASURES}}
+
+
+
+
+
-
-
+
+
-
- 签字照片:
-
-
-
-
+
+ 签字照片:
+
+
+
+
+
-
-
+
-
+
@@ -78,7 +90,8 @@
-
+
+
diff --git a/pages/application/eight-assignments.vue b/pages/application/eight-assignments.vue
index 39cd995..588459e 100644
--- a/pages/application/eight-assignments.vue
+++ b/pages/application/eight-assignments.vue
@@ -2,7 +2,7 @@
返回
- 高危作业
+ 特殊作业
diff --git a/pages/application/electricity/electricity-measures/electricity-measures-detail.vue b/pages/application/electricity/electricity-measures/electricity-measures-detail.vue
index dd49f33..c30eaa1 100644
--- a/pages/application/electricity/electricity-measures/electricity-measures-detail.vue
+++ b/pages/application/electricity/electricity-measures/electricity-measures-detail.vue
@@ -6,70 +6,82 @@
-
+
-
-
- 安全防护措施
-
-
-
-
-
- 主要安全措施
-
-
-
-
-
- {{item.PROTECTIVE_MEASURES}}
-
-
-
- 确认单位:
-
- {{measuresList[index].DEPARTMENT_NAME?measuresList[index].DEPARTMENT_NAME:'请选择'}}
+
+
+ 安全防护措施
+
+
+
+
+
+
+
+
+ 确认单位:
+
+
+ {{item.DEPARTMENT_NAME?item.DEPARTMENT_NAME:'请选择'}}
-
-
-
-
- 确认人
-
-
- {{measuresList[index].USER_NAME?measuresList[index].USER_NAME:'请选择'}}
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ 确认人
+
+
+ {{item.USER_NAME?item.USER_NAME:'请选择'}}
+
+
+
+
+
+
+ 安全措施:
+
+
+
+
+
+ {{index1+1}} . {{item1.PROTECTIVE_MEASURES}}
+
+
+
+
+
-
-
+
+
-
- 签字照片:
-
-
-
-
+
+ 签字照片:
+
+
+
+
+
-
-
+
-
+
@@ -78,7 +90,8 @@
-
+
+
diff --git a/pages/application/highwork/highwork-measures/highwork-measures-detail.vue b/pages/application/highwork/highwork-measures/highwork-measures-detail.vue
index 5135260..dfeeca1 100644
--- a/pages/application/highwork/highwork-measures/highwork-measures-detail.vue
+++ b/pages/application/highwork/highwork-measures/highwork-measures-detail.vue
@@ -8,68 +8,80 @@
-
-
- 安全防护措施
-
-
-
-
-
- 主要安全措施
-
-
-
-
-
- {{item.PROTECTIVE_MEASURES}}
-
-
-
- 确认单位:
-
- {{measuresList[index].DEPARTMENT_NAME?measuresList[index].DEPARTMENT_NAME:'请选择'}}
+
+
+ 安全防护措施
+
+
+
+
+
+
+
+
+ 确认单位:
+
+
+ {{item.DEPARTMENT_NAME?item.DEPARTMENT_NAME:'请选择'}}
-
-
-
-
- 确认人
-
-
- {{measuresList[index].USER_NAME?measuresList[index].USER_NAME:'请选择'}}
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ 确认人
+
+
+ {{item.USER_NAME?item.USER_NAME:'请选择'}}
+
+
+
+
+
+
+ 安全措施:
+
+
+
+
+
+ {{index1+1}} . {{item1.PROTECTIVE_MEASURES}}
+
+
+
+
+
-
-
+
+
-
- 签字照片:
-
-
-
-
+
+ 签字照片:
+
+
+
+
+
-
-
+
-
+
@@ -78,7 +90,9 @@
-
+
+
+
diff --git a/pages/application/hoisting/hoisting-measures/hoisting-measures-detail.vue b/pages/application/hoisting/hoisting-measures/hoisting-measures-detail.vue
index 5fd1636..ffe3f4f 100644
--- a/pages/application/hoisting/hoisting-measures/hoisting-measures-detail.vue
+++ b/pages/application/hoisting/hoisting-measures/hoisting-measures-detail.vue
@@ -8,68 +8,80 @@
-
-
- 安全防护措施
-
-
-
-
-
- 主要安全措施
-
-
-
-
-
- {{item.PROTECTIVE_MEASURES}}
-
-
-
- 确认单位:
-
- {{measuresList[index].DEPARTMENT_NAME?measuresList[index].DEPARTMENT_NAME:'请选择'}}
+
+
+ 安全防护措施
+
+
+
+
+
+
+
+
+ 确认单位:
+
+
+ {{item.DEPARTMENT_NAME?item.DEPARTMENT_NAME:'请选择'}}
-
-
-
-
- 确认人
-
-
- {{measuresList[index].USER_NAME?measuresList[index].USER_NAME:'请选择'}}
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ 确认人
+
+
+ {{item.USER_NAME?item.USER_NAME:'请选择'}}
+
+
+
+
+
+
+ 安全措施:
+
+
+
+
+
+ {{index1+1}} . {{item1.PROTECTIVE_MEASURES}}
+
+
+
+
+
-
-
+
+
-
- 签字照片:
-
-
-
-
+
+ 签字照片:
+
+
+
+
+
-
-
+
-
+
@@ -78,7 +90,8 @@
-
+
+
diff --git a/pages/application/hotwork/hotwork-measures/hotwork-measures-detail.vue b/pages/application/hotwork/hotwork-measures/hotwork-measures-detail.vue
index 30d532b..2e84868 100644
--- a/pages/application/hotwork/hotwork-measures/hotwork-measures-detail.vue
+++ b/pages/application/hotwork/hotwork-measures/hotwork-measures-detail.vue
@@ -6,70 +6,82 @@
-
+
-
-
- 安全防护措施
-
-
-
-
-
- 主要安全措施
-
-
-
-
-
- {{item.PROTECTIVE_MEASURES}}
-
-
-
- 确认单位:
-
- {{measuresList[index].DEPARTMENT_NAME?measuresList[index].DEPARTMENT_NAME:'请选择'}}
+
+
+ 安全防护措施
+
+
+
+
+
+
+
+
+ 确认单位:
+
+
+ {{item.DEPARTMENT_NAME?item.DEPARTMENT_NAME:'请选择'}}
-
-
-
-
- 确认人
-
-
- {{measuresList[index].USER_NAME?measuresList[index].USER_NAME:'请选择'}}
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ 确认人
+
+
+ {{item.USER_NAME?item.USER_NAME:'请选择'}}
+
+
+
+
+
+
+ 安全措施:
+
+
+
+
+
+ {{index1+1}} . {{item1.PROTECTIVE_MEASURES}}
+
+
+
+
+
-
-
+
+
-
- 签字照片:
-
-
-
-
+
+ 签字照片:
+
+
+
+
+
-
-
+
-
+
@@ -78,7 +90,9 @@
-
+
+
+
diff --git a/pages/basics/home.vue b/pages/basics/home.vue
index 7078dcc..9742ae8 100644
--- a/pages/basics/home.vue
+++ b/pages/basics/home.vue
@@ -110,7 +110,7 @@
{{ eight_work_count }}
- 高危作业
+ 特殊作业