|
|
@@ -540,6 +540,7 @@ export default {
|
|
|
},
|
|
|
'form.xuan_ze_feng_xian': {
|
|
|
handler(data) {
|
|
|
+ if (!data) return
|
|
|
this.loading = true
|
|
|
const order = data.replace(/,/g, "','")
|
|
|
// const sql = `select * from t_fxkzb where find_in_set(id_ , '${data}') ORDER BY FIELD(id_, '${order}')`
|
|
|
@@ -1026,7 +1027,7 @@ export default {
|
|
|
for (let i = 0; i < this.tableList.length; i++) {
|
|
|
const item = this.tableList[i]
|
|
|
if (!item.feng_xian_zhi_shu) {
|
|
|
- throw new Error(`第${i + 1}未计算风险指数,请填写相关数据!`)
|
|
|
+ throw new Error(`第${i + 1}行未计算风险指数,请填写相关数据!`)
|
|
|
}
|
|
|
if (item.feng_xian_ying_du !== '风险接受' && !item.zhi_ding_ren_) {
|
|
|
throw new Error(`第${i + 1}行缺少措施制定人!`)
|
|
|
@@ -1100,7 +1101,7 @@ export default {
|
|
|
})
|
|
|
.catch(() => {})
|
|
|
} catch (error) {
|
|
|
- this.$message.warning(error)
|
|
|
+ this.$message.error(error)
|
|
|
}
|
|
|
},
|
|
|
// 判断状态是否已完成
|
|
|
@@ -1156,7 +1157,12 @@ export default {
|
|
|
if (addedIds.length > 0) {
|
|
|
const params = {
|
|
|
tableName: 't_fxsbpgb2',
|
|
|
- paramWhere: addedIds
|
|
|
+ paramWhere: addedIds.map((t) => ({
|
|
|
+ ...t,
|
|
|
+ xuan_ze_feng_xian: this.form.xuan_ze_feng_xian || '',
|
|
|
+ bian_zhi_bu_men_: this.position,
|
|
|
+ bian_zhi_shi_jian: this.time
|
|
|
+ }))
|
|
|
}
|
|
|
console.log(params)
|
|
|
await this.$common.request('add', params)
|
|
|
@@ -1164,19 +1170,29 @@ export default {
|
|
|
}
|
|
|
// 更新
|
|
|
if (updatedIds.length > 0) {
|
|
|
+ console.log(
|
|
|
+ '更新数据',
|
|
|
+ updatedIds,
|
|
|
+ this.form.xuan_ze_feng_xian,
|
|
|
+ this.position,
|
|
|
+ this.time
|
|
|
+ )
|
|
|
const params = {
|
|
|
tableName: 't_fxsbpgb2',
|
|
|
- updList: updatedIds.map((item) => ({
|
|
|
- where: {
|
|
|
- id_: item.id_
|
|
|
- },
|
|
|
- param: {
|
|
|
- ...item,
|
|
|
- xuan_ze_feng_xian: this.form.xuan_ze_feng_xian,
|
|
|
- bian_zhi_bu_men_: this.position,
|
|
|
- bian_zhi_shi_jian: this.time
|
|
|
+ updList: updatedIds.map((item) => {
|
|
|
+ delete item.create_time_
|
|
|
+ return {
|
|
|
+ where: {
|
|
|
+ id_: item.id_
|
|
|
+ },
|
|
|
+ param: {
|
|
|
+ ...item,
|
|
|
+ xuan_ze_feng_xian: this.form.xuan_ze_feng_xian || '',
|
|
|
+ bian_zhi_bu_men_: this.position,
|
|
|
+ bian_zhi_shi_jian: this.time
|
|
|
+ }
|
|
|
}
|
|
|
- }))
|
|
|
+ })
|
|
|
}
|
|
|
console.log(params)
|
|
|
const res = await this.$common.request('update', params)
|