03f92ffb by 任超

style:申请业务规则配置

1 parent 6cb6758a
......@@ -5,7 +5,7 @@
id="dialogBox">
<div slot="title">
<div class="dialog_title">
<b>{{ title }}</b>
<b>{{ title }}</b>
<div v-if="isFullscreen" class="dialog_full">
<i class="el-icon-rank" v-if="fullscreen" @click="handleFullscreen"></i>
<i class="el-icon-full-screen" v-else @click="handleFullscreen" />
......@@ -17,8 +17,8 @@
</div>
<div slot="footer" class="dialog_footer" v-if="isButton">
<el-button @click="closeDialog" v-if="isReset">取消</el-button>
<el-button type="primary" plain @click="submitForm" v-if="isSave" :loading="saveloding">
{{ saveButton }}</el-button>
<el-button type="primary" plain @click="submitForm" v-if="isSave" :disabled="btnDisabled" :loading="saveloding">
{{ saveButton }}</el-button>
</div>
</el-dialog>
</template>
......@@ -62,9 +62,9 @@ export default {
type: Boolean,
default: false,
},
loadingText: {
type: String,
default: '拼命加载中',
btnDisabled: {
type: Boolean,
default: false
}
},
data () {
......
......@@ -15,7 +15,6 @@ Vue.directive("theme", theme)
Vue.directive('fo', {
inserted (el, binding, vnode) {
// 聚焦元素
el.querySelector('input').focus()
}
})
......
......@@ -24,7 +24,7 @@
</template>
<script>
import { mapGetters } from 'vuex'
import { judgeSort, realMove, findParents } from '@/utils/operation'
import { realMove, findParents } from '@/utils/operation'
export default {
props: {
ruleForm: {
......@@ -130,7 +130,7 @@ export default {
<el-select disabled={scope.row.sfggcl == '1'} value={scope.row[scope.column.property]}
onChange={(val) => { scope.row[scope.column.property] = val }} clearable>
{
this.subData['djqx'].map(option => {
this.dictData['A40'].map(option => {
return (
<el-option label={option.nodename} value={option.nodecode}></el-option>
)
......@@ -146,8 +146,8 @@ export default {
render: (h, scope) => {
return (
<div>
<el-button type='text' disabled={scope.row.isTop} onClick={() => { this.moveUpward(scope.$index, scope.row) }}>上移</el-button>
<el-button type='text' disabled={scope.row.isBottom} onClick={() => { this.moveDown(scope.$index, scope.row) }}>下移</el-button >
<el-button type='text' disabled={scope.$index == 0} onClick={() => { this.moveUpward(scope.$index, scope.row) }}>上移</el-button>
<el-button type='text' disabled={(scope.$index + 1) == this.tableData.length} onClick={() => { this.moveDown(scope.$index, scope.row) }}>下移</el-button >
</div>
)
}
......@@ -159,13 +159,15 @@ export default {
watch: {
tableData: {
handler (newValue, oldValue) {
this.$emit('updateValue', newValue)
if (!_.isEqual(newValue, this.subData.clxx)) {
this.$emit('updateValue', newValue)
}
},
deep: true
},
subData: {
handler: function (newValue) {
this.tableData = judgeSort(newValue.clxx)
this.tableData = _.cloneDeep(newValue.clxx)
},
deep: true
},
......
......@@ -26,15 +26,15 @@
import { judgeSort, realMove, findParents } from '@/utils/operation'
export default {
props: {
djqxList: {
type: Array, default: () => {
return []
}
},
ruleForm: {
type: Object, default: () => {
return {}
}
},
djqx: {
type: Array, default: () => {
return []
}
}
},
data () {
......@@ -126,8 +126,8 @@ export default {
render: (h, scope) => {
return (
<div>
<el-button type='text' disabled={scope.row.isTop} onClick={() => { this.moveUpward(scope.$index, scope.row) }}>上移</el-button>
<el-button type='text' disabled={scope.row.isBottom} onClick={() => { this.moveDown(scope.$index, scope.row) }}>下移</el-button >
<el-button type='text' disabled={scope.$index == 0} onClick={() => { this.moveUpward(scope.$index, scope.row) }}>上移</el-button>
<el-button type='text' disabled={(scope.$index + 1) == this.tableData.length} onClick={() => { this.moveDown(scope.$index, scope.row) }}>下移</el-button >
</div>
)
}
......@@ -137,16 +137,31 @@ export default {
}
},
watch: {
djqxList: {
handler: function (newValue) {
this.tableData = judgeSort(newValue)
},
deep: true,
immediate: true
},
tableData: {
handler (newValue, oldValue) {
this.$emit('updateValue', newValue)
let that = this
if (!_.isEqual(newValue, this.djqx)) {
let temp = newValue.some((item, index, array) => {
return item.repeat;
})
if (temp) {
that.$emit('updateValue', {
djqx: newValue,
btnDisabled: true
})
} else {
that.$emit('updateValue', {
djqx: newValue,
btnDisabled: false
})
}
}
},
deep: true
},
djqx: {
handler: function (newValue) {
this.tableData = _.cloneDeep(newValue)
},
deep: true
}
......
<template>
<dialogBox title="申请业务规则配置" @submitForm="submitForm" @closeDialog="closeDialog" v-model="myValue">
<dialogBox title="申请业务规则配置" @submitForm="submitForm" @closeDialog="closeDialog" v-model="myValue"
:btnDisabled="btnDisabled">
<ul class="edit-title-list" v-if="titleList.length > 0">
<li v-for="(item, index) in titleList" @click="handleTitleSelct(item, index)" :key="index"
:class="{ active: index == tn }">{{
......@@ -113,8 +114,8 @@
</el-col>
</el-row>
</el-form>
<djqxsd v-show="n == 1" :djqxList="subData.djqx" :ruleForm="ruleForm" @updateValue="getDjqxValue" />
<clgzsd v-show="n == 2" :ruleForm="ruleForm" :subData="subData" @updateValue="getClValue" />
<djqxsd v-show="n == 1" :ruleForm="ruleForm" :djqx="subData.djqx" @updateValue="getDjqxValue" />
<clgzsd v-show="n == 2" :ruleForm="ruleForm" :subData="subData" @updateValue="getClgzValue" />
<dyztsd :ruleForm="ruleForm" :subData="subData" v-show="n == 3" @updateValue="getDyztsdValue" />
</div>
</div>
......@@ -155,7 +156,9 @@ export default {
},
data () {
return {
djqx: [],
myValue: this.value,
btnDisabled: false,
tn: 0,
titleList: [],
imgUploadUrl: fileController.uploadUrl(),
......@@ -228,9 +231,11 @@ export default {
this.getSqdjywDetail(obj.bsmSqyw)
},
getDjqxValue (val) {
this.subData.djqx = val
if (val.clxx) this.subData.djqx = val.djqx
this.btnDisabled = val.btnDisabled
console.log(this.btnDisabled);
},
getClValue (val) {
getClgzValue (val) {
this.subData.clxx = val
},
// 单元状态设定
......@@ -281,13 +286,12 @@ export default {
message: '上传成功',
type: 'success',
})
console.log(res);
} else {
this.loading = false
this.$message.error(res.message)
}
}
},
}
};
</script>
<style scoped lang="scss">
......