284e9724 by 任超

style:申请业务规则配置

1 parent 976be9b6
1 import request from '@/utils/request' 1 import request from '@/utils/request'
2 /* 2 /*
3 系统管理-申请业务规则API 3 系统管理
4 申请业务规则API-根据条件进行列表查询
4 */ 5 */
5 // 申请业务规则API-根据条件进行列表查询
6 export function getSysSqdjywBysearch (data) { 6 export function getSysSqdjywBysearch (data) {
7 return request({ 7 return request({
8 url: '/system/sysSqdjyw/getSysSqdjywBysearch', 8 url: '/system/sysSqdjyw/getSysSqdjywBysearch',
...@@ -29,3 +29,13 @@ export function getSqdjywDetail (bsmSqyw) { ...@@ -29,3 +29,13 @@ export function getSqdjywDetail (bsmSqyw) {
29 method: 'get' 29 method: 'get'
30 }) 30 })
31 } 31 }
32 /*
33 保存登记业务信息-申请业务规则
34 */
35 export function saveSqdjyw (data) {
36 return request({
37 url: '/system/sysSqdjyw/saveSqdjyw',
38 method: 'post',
39 data
40 })
41 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -43,14 +43,14 @@ export function upward (index, data) { ...@@ -43,14 +43,14 @@ export function upward (index, data) {
43 data.splice(index, 0, upData); 43 data.splice(index, 0, upData);
44 } else { 44 } else {
45 Message({ 45 Message({
46 message: '已经是第一条,上移失败', 46 message: '已经是第一条,上移失败'
47 }); 47 });
48 } 48 }
49 } 49 }
50 export function down (index, data) { 50 export function down (index, data) {
51 if ((index + 1) == data.length) { 51 if ((index + 1) == data.length) {
52 Message({ 52 Message({
53 message: '已经是最后一条,下移失败', 53 message: '已经是最后一条,下移失败'
54 }); 54 });
55 } else { 55 } else {
56 let downData = data[index + 1]; 56 let downData = data[index + 1];
......
...@@ -151,8 +151,8 @@ export default { ...@@ -151,8 +151,8 @@ export default {
151 render: (h, scope) => { 151 render: (h, scope) => {
152 return ( 152 return (
153 <div> 153 <div>
154 <el-button type='text' disabled={scope.$index == 0} onClick={() => { this.moveUpward(scope.$index, scope.row) }}>上移</el-button> 154 <el-button type='text' disabled={scope.row.isTop} onClick={() => { this.moveUpward(scope.$index, scope.row) }}>上移</el-button>
155 <el-button type='text' disabled={(scope.$index + 1) == this.tableData.length} onClick={() => { this.moveDown(scope.$index, scope.row) }}>下移</el-button > 155 <el-button type='text' disabled={scope.row.isBottom} onClick={() => { this.moveDown(scope.$index, scope.row) }}>下移</el-button >
156 </div > 156 </div >
157 ) 157 )
158 } 158 }
...@@ -180,7 +180,7 @@ export default { ...@@ -180,7 +180,7 @@ export default {
180 }, 180 },
181 details: { 181 details: {
182 handler: function (newValue) { 182 handler: function (newValue) {
183 this.tableData = _.cloneDeep(newValue.dataList) 183 this.tableData = this.judgeSort(_.cloneDeep(newValue.dataList))
184 if (newValue.isenable == 2) { 184 if (newValue.isenable == 2) {
185 this.column = this.columns.slice(0, 3) 185 this.column = this.columns.slice(0, 3)
186 } else { 186 } else {
...@@ -193,6 +193,18 @@ export default { ...@@ -193,6 +193,18 @@ export default {
193 } 193 }
194 }, 194 },
195 methods: { 195 methods: {
196 judgeSort (arr) {
197 if (arr.length) {
198 for (let i in arr) {
199 arr[i]["isTop"] = false;
200 arr[i]["isBottom"] = false;
201 arr[i] == arr[0] && (arr[i].isTop = true);
202 arr[i] == arr[arr.length - 1] && (arr[i].isBottom = true);
203 arr[i].children && arr[i].children.length && this.judgeSort(arr[i].children)
204 }
205 }
206 return arr
207 },
196 // 添加索引 208 // 添加索引
197 addIndexes () { 209 addIndexes () {
198 this.tableData.forEach((item, index) => { 210 this.tableData.forEach((item, index) => {
......
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
3 --> 3 -->
4 <template> 4 <template>
5 <div class='该组件名称'> 5 <div class='该组件名称'>
6 <el-form :model="ruleForm" :rules="rules" label-width="135px"> 6 <el-form :model="ruleForm" :rules="rules">
7 <el-row :gutter="20"> 7 <el-row>
8 <el-col :span="8"> 8 <el-col :span="5">
9 <el-form-item label="登记业务编码" prop="djywbm"> 9 <el-form-item label="登记业务编码">
10 <el-input v-model="ruleForm.djywbm"></el-input> 10 {{ ruleForm.djywbm }}
11 </el-form-item> 11 </el-form-item>
12 </el-col> 12 </el-col>
13 <el-col :span="16"> 13 <el-col :span="12">
14 <el-form-item label="登记业务名称" prop="djywmc"> 14 <el-form-item label="登记业务名称">
15 <el-input v-model="ruleForm.djywmc"></el-input> 15 {{ ruleForm.djywmc }}
16 </el-form-item> 16 </el-form-item>
17 </el-col> 17 </el-col>
18 </el-row> 18 </el-row>
...@@ -25,13 +25,14 @@ ...@@ -25,13 +25,14 @@
25 <script> 25 <script>
26 import { upward, down } from '@/utils/operation' 26 import { upward, down } from '@/utils/operation'
27 export default { 27 export default {
28 props: {
29 ruleForm: {
30 type: Object, default: {}
31 }
32 },
28 data () { 33 data () {
29 return { 34 return {
30 key: 0, 35 key: 0,
31 ruleForm: {
32 djywbm: '',
33 djywmc: ''
34 },
35 cllxOptions: [ 36 cllxOptions: [
36 { 37 {
37 name: '买卖', 38 name: '买卖',
......
...@@ -60,7 +60,7 @@ export default { ...@@ -60,7 +60,7 @@ export default {
60 type: 'index' 60 type: 'index'
61 }, 61 },
62 { 62 {
63 prop: 'djywbm', 63 prop: 'nodecode',
64 width: '100', 64 width: '100',
65 label: '登记情形编码', 65 label: '登记情形编码',
66 render: (h, scope) => { 66 render: (h, scope) => {
...@@ -71,7 +71,7 @@ export default { ...@@ -71,7 +71,7 @@ export default {
71 } 71 }
72 }, 72 },
73 { 73 {
74 prop: 'djywmc', 74 prop: 'nodename',
75 label: '登记情形名称', 75 label: '登记情形名称',
76 render: (h, scope) => { 76 render: (h, scope) => {
77 return ( 77 return (
...@@ -134,7 +134,6 @@ export default { ...@@ -134,7 +134,6 @@ export default {
134 djqxList: { 134 djqxList: {
135 handler: function (newValue) { 135 handler: function (newValue) {
136 this.tableData = newValue 136 this.tableData = newValue
137 console.log(this.tableData, 'this.tableDatathis.tableDatathis.tableData');
138 }, 137 },
139 deep: true, 138 deep: true,
140 immediate: true 139 immediate: true
...@@ -150,11 +149,11 @@ export default { ...@@ -150,11 +149,11 @@ export default {
150 handleAdd () { 149 handleAdd () {
151 this.tableData.push( 150 this.tableData.push(
152 { 151 {
153 djqxmc: '', 152 nodecode: '',
154 djqxbm: '', 153 nodename: '',
155 djyymb: '', 154 enabled: '1',
156 sfqymb: 0, 155 djyy: '',
157 sfqy: 0 156 sfqydjyymb: '1'
158 } 157 }
159 ) 158 )
160 this.key++ 159 this.key++
......
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
3 --> 3 -->
4 <template> 4 <template>
5 <div class='该组件名称'> 5 <div class='该组件名称'>
6 <el-form :model="ruleForm" :rules="rules" label-width="135px"> 6 <el-form :model="ruleForm" :rules="rules">
7 <el-row :gutter="20"> 7 <el-row>
8 <el-col :span="8"> 8 <el-col :span="5">
9 <el-form-item label="登记业务编码" prop="djywbm"> 9 <el-form-item label="登记业务编码">
10 <el-input v-model="ruleForm.djywbm"></el-input> 10 {{ ruleForm.djywbm }}
11 </el-form-item> 11 </el-form-item>
12 </el-col> 12 </el-col>
13 <el-col :span="16"> 13 <el-col :span="12">
14 <el-form-item label="登记业务名称" prop="djywmc"> 14 <el-form-item label="登记业务名称">
15 <el-input v-model="ruleForm.djywmc"></el-input> 15 {{ ruleForm.djywmc }}
16 </el-form-item> 16 </el-form-item>
17 </el-col> 17 </el-col>
18 </el-row> 18 </el-row>
...@@ -47,12 +47,13 @@ ...@@ -47,12 +47,13 @@
47 </template> 47 </template>
48 <script> 48 <script>
49 export default { 49 export default {
50 data () { 50 props: {
51 return {
52 ruleForm: { 51 ruleForm: {
53 djywbm: '', 52 type: Object, default: {}
54 djywmc: '' 53 }
55 }, 54 },
55 data () {
56 return {
56 rules: { 57 rules: {
57 djywbm: [ 58 djywbm: [
58 { required: true, message: '登记业务编码', trigger: 'blur' }, 59 { required: true, message: '登记业务编码', trigger: 'blur' },
......
1 <template> 1 <template>
2 <dialogBox title="申请业务规则配置" @submitForm="submitForm" @closeDialog="closeDialog" v-model="value"> 2 <dialogBox title="申请业务规则配置" @submitForm="submitForm" @closeDialog="closeDialog" v-model="myValue"
3 :saveloding="saveloding">
3 <ul class="edit-title-list" v-if="titleList.length > 0"> 4 <ul class="edit-title-list" v-if="titleList.length > 0">
4 <li v-for="(item, index) in titleList" @click="handleTitleSelct(item, index)" :key="index" 5 <li v-for="(item, index) in titleList" @click="handleTitleSelct(item, index)" :key="index"
5 :class="{ active: index == tn }">{{ 6 :class="{ active: index == tn }">{{
...@@ -13,7 +14,7 @@ ...@@ -13,7 +14,7 @@
13 }}</li> 14 }}</li>
14 </ul> 15 </ul>
15 <div class="sqywgz-edit-right"> 16 <div class="sqywgz-edit-right">
16 <el-form :model="ruleForm" v-if="n == 0" :rules="rules" label-width="135px" ref="ruleForm"> 17 <el-form :model="ruleForm" v-show="n == 0" :rules="rules" label-width="135px" ref="ruleForm">
17 <el-row> 18 <el-row>
18 <el-col :span="8"> 19 <el-col :span="8">
19 <el-form-item label="权利类型编码"> 20 <el-form-item label="权利类型编码">
...@@ -83,7 +84,7 @@ ...@@ -83,7 +84,7 @@
83 </el-row> 84 </el-row>
84 <el-row> 85 <el-row>
85 <el-col :span="8"> 86 <el-col :span="8">
86 <el-form-item label="登记情形及材料" prop="djqxcl"> 87 <el-form-item label="登记情形及材料">
87 <el-input v-model="ruleForm.djqxcl" placeholder="仅支持execl文件导入"></el-input> 88 <el-input v-model="ruleForm.djqxcl" placeholder="仅支持execl文件导入"></el-input>
88 </el-form-item> 89 </el-form-item>
89 </el-col> 90 </el-col>
...@@ -113,9 +114,9 @@ ...@@ -113,9 +114,9 @@
113 </el-col> 114 </el-col>
114 </el-row> 115 </el-row>
115 </el-form> 116 </el-form>
116 <djqxsd v-else-if="n == 1" :djqxList="djqxList" :ruleForm="ruleForm" @updateValue="getValue" /> 117 <djqxsd v-show="n == 1" :djqxList="djqxList" :ruleForm="ruleForm" @updateValue="getDjqxValue" />
117 <clgzsd v-else-if="n == 2" @updateValue="getClValue" /> 118 <clgzsd v-show="n == 2" :ruleForm="ruleForm" @updateValue="getClValue" />
118 <dyztsd v-else /> 119 <dyztsd :ruleForm="ruleForm" v-show="n == 3" />
119 </div> 120 </div>
120 </div> 121 </div>
121 </dialogBox> 122 </dialogBox>
...@@ -126,7 +127,7 @@ import fileController from '@/api/fileController' ...@@ -126,7 +127,7 @@ import fileController from '@/api/fileController'
126 import djqxsd from './djqxsd.vue' 127 import djqxsd from './djqxsd.vue'
127 import clgzsd from './clgzsd.vue' 128 import clgzsd from './clgzsd.vue'
128 import dyztsd from './dyztsd.vue' 129 import dyztsd from './dyztsd.vue'
129 import { getSqdjywDetail } from '@/api/system' 130 import { getSqdjywDetail, saveSqdjyw } from '@/api/system'
130 export default { 131 export default {
131 components: { 132 components: {
132 djqxsd, 133 djqxsd,
...@@ -140,9 +141,11 @@ export default { ...@@ -140,9 +141,11 @@ export default {
140 } 141 }
141 }, 142 },
142 watch: { 143 watch: {
144 value (val) {
145 this.myValue = val
146 },
143 detailList: { 147 detailList: {
144 handler: function (newValue) { 148 handler: function (newValue) {
145 console.log(newValue, 'detailListdetailListdetailListdetailList');
146 this.titleList = newValue 149 this.titleList = newValue
147 this.getSqdjywDetail(newValue[0].bsmSqyw) 150 this.getSqdjywDetail(newValue[0].bsmSqyw)
148 }, 151 },
...@@ -151,6 +154,8 @@ export default { ...@@ -151,6 +154,8 @@ export default {
151 }, 154 },
152 data () { 155 data () {
153 return { 156 return {
157 myValue: this.value,
158 saveloding: false,
154 djqxList: [], 159 djqxList: [],
155 tn: 0, 160 tn: 0,
156 titleList: [], 161 titleList: [],
...@@ -205,6 +210,11 @@ export default { ...@@ -205,6 +210,11 @@ export default {
205 djyymb: [ 210 djyymb: [
206 { required: true, message: '请输入登记原因模板', trigger: 'blur' }, 211 { required: true, message: '请输入登记原因模板', trigger: 'blur' },
207 ], 212 ],
213 },
214 // 表单提交
215 subData: {
216 djqx: [],
217 ywDetail: {}
208 } 218 }
209 }; 219 };
210 }, 220 },
...@@ -214,6 +224,7 @@ export default { ...@@ -214,6 +224,7 @@ export default {
214 let { ywDetail, djqx } = res.result 224 let { ywDetail, djqx } = res.result
215 this.djqxList = djqx 225 this.djqxList = djqx
216 this.ruleForm = ywDetail 226 this.ruleForm = ywDetail
227 this.subData.djqx = djqx
217 }) 228 })
218 }, 229 },
219 handleTitleSelct (obj, index) { 230 handleTitleSelct (obj, index) {
...@@ -221,16 +232,22 @@ export default { ...@@ -221,16 +232,22 @@ export default {
221 this.tn = index 232 this.tn = index
222 this.getSqdjywDetail(obj.bsmSqyw) 233 this.getSqdjywDetail(obj.bsmSqyw)
223 }, 234 },
224 getValue (val) { 235 getDjqxValue (val) {
225 console.log(val); 236 this.subData.djqx = val
226 }, 237 },
227 getClValue (val) { 238 getClValue (val) {
228 console.log(val); 239 console.log(val);
229 }, 240 },
230 submitForm () { 241 submitForm () {
231 this.$refs['ruleForm'].validate(async (valid) => { 242 this.$refs['ruleForm'].validate(async (valid) => {
243 let that = this
232 if (valid) { 244 if (valid) {
233 this.$emit('input', false) 245 that.saveloding = true
246 this.subData.ywDetail = this.ruleForm
247 saveSqdjyw(this.subData).then(res => {
248 that.saveloding = false
249 that.$emit('input', false)
250 })
234 } else { 251 } else {
235 this.$message('请检查表单完整性') 252 this.$message('请检查表单完整性')
236 return false; 253 return false;
......