29a787c2 by 任超

style:申请业务规则配置

1 parent da0a783c
......@@ -187,6 +187,8 @@ export default {
}
this.ruleForm = newValue.rowData
this.addIndexes()
this.key++
console.log(1111111);
},
deep: true
}
......
......@@ -38,6 +38,7 @@ export default {
},
data () {
return {
input: '',
key: 0,
rules: {
djywbm: [
......@@ -70,8 +71,17 @@ export default {
label: '登记情形编码',
render: (h, scope) => {
return (
<el-input placeholder="登记情形编码" class={{ repeat: scope.row.repeat }} disabled={scope.row.sftsdjqx == '1'} value={scope.row[scope.column.property]}
onInput={(val) => { scope.row[scope.column.property] = val }} onBlur={() => { this.nodecodeBlur(scope.$index, scope.row) }} maxlength="8"></el-input>
<div>
<el-input placeholder="登记情形编码" v-show={scope.row.nodecodeShow} v-fo class={{ repeat: scope.row.repeat }} disabled={scope.row.sftsdjqx == '1'}
value={scope.row[scope.column.property]} onFocus={() => { this.itemShowFalse(); scope.row.nodecodeShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val }} onBlur={() => { this.nodecodeBlur(scope.$index, scope.row) }} maxlength="8">
</el-input>
<el-input placeholder="登记情形编码" v-show={!scope.row.nodecodeShow} class={{ repeat: scope.row.repeat }} disabled={scope.row.sftsdjqx == '1'}
value={scope.row[scope.column.property]} onFocus={() => { this.itemShowFalse(); scope.row.nodecodeShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val }} onBlur={() => { this.nodecodeBlur(scope.$index, scope.row) }} maxlength="8">
</el-input>
</div>
)
}
},
......@@ -80,8 +90,14 @@ export default {
label: '登记情形名称',
render: (h, scope) => {
return (
<el-input placeholder="登记情形名称" disabled={scope.row.sftsdjqx == '1'} value={scope.row[scope.column.property]}
<div>
<el-input placeholder="登记情形名称" v-show={scope.row.nodenameShow} v-fo disabled={scope.row.sftsdjqx == '1'} value={scope.row[scope.column.property]}
onInput={(val) => { scope.row[scope.column.property] = val }}
onFocus={() => { this.itemShowFalse(); scope.row.nodenameShow = true; }}></el-input>
<el-input placeholder="登记情形名称" v-show={!scope.row.nodenameShow} disabled={scope.row.sftsdjqx == '1'}
onFocus={() => { this.itemShowFalse(); scope.row.nodenameShow = true; }} value={scope.row[scope.column.property]}
onInput={(val) => { scope.row[scope.column.property] = val }}></el-input>
</div>
)
}
},
......@@ -102,8 +118,15 @@ export default {
label: '登记原因模板',
render: (h, scope) => {
return (
<el-input placeholder="登记原因模板" disabled={scope.row.sftsdjqx == '1'} value={scope.row[scope.column.property]}
onInput={(val) => { scope.row[scope.column.property] = val }}></el-input>
<div>
<el-input placeholder="登记原因模板" v-show={scope.row.djyyShow} v-fo disabled={scope.row.sftsdjqx == '1'} value={scope.row[scope.column.property]}
onInput={(val) => { scope.row[scope.column.property] = val }}
onFocus={() => { this.itemShowFalse(); scope.row.djyyShow = true; }}></el-input>
<el-input placeholder="登记原因模板" v-show={!scope.row.djyyShow} v-fo disabled={scope.row.sftsdjqx == '1'} value={scope.row[scope.column.property]}
onInput={(val) => { scope.row[scope.column.property] = val }}
onFocus={() => { this.itemShowFalse(); scope.row.djyyShow = true; }}></el-input>
</div>
)
}
},
......@@ -161,12 +184,41 @@ export default {
djqx: {
handler: function (newValue) {
this.tableData = _.cloneDeep(newValue)
this.addIndexes()
},
deep: true
}
},
methods: {
// 添加索引
addIndexes (data = this.tableData, isAdd = true) {
data.forEach((item, index) => {
if (index == 0) {
item.nodecodeShow = true
item.nodenameShow = false
item.djyyShow = false
} else {
item.nodecodeShow = false
item.nodenameShow = false
item.djyyShow = false
}
if (isAdd) {
item.index = index + 1
}
})
},
itemShowFalse () {
this.tableData.forEach((item, index) => {
item.nodecodeShow = true
item.nodenameShow = false
item.djyyShow = false
})
},
handleAdd () {
this.$nextTick(() => {
let container = this.$el.querySelector('.el-table__body-wrapper');
container.scrollTop = container.scrollHeight;
})
let code = this.tableData.slice(-1)[0].nodecode
let codeQ = code.slice(0, 6)
let len = ''
......@@ -185,6 +237,7 @@ export default {
sfqydjyymb: '0'
}
)
this.addIndexes()
this.key++
},
handleMinus (index, row) {
......@@ -203,9 +256,13 @@ export default {
// 上移下移
moveUpward (index, row) {
upward(index, this.tableData)
this.key++
console.log(this.tableData);
},
moveDown (index, row) {
down(index, this.tableData)
this.key++
console.log(this.tableData);
}
}
}
......
......@@ -240,12 +240,15 @@ export default {
this.getSqdjywDetail(obj.bsmSqyw)
},
getDjqxValue (val) {
console.log(val, 'valvalvalvalval');
if (_.isEqual(val.djqx, this.subData.djqx)) {
this.subData.djqx = val.djqx
this.btnDisabled = val.btnDisabled
}
},
getClgzValue (val) {
if (_.isEqual(val, this.subData.clxx)) {
this.subData.clxx = val
}
},
// 单元状态设定
getDyztsdValue (val) {
......