--no commit message
Showing
3 changed files
with
177 additions
and
305 deletions
... | @@ -224,8 +224,7 @@ | ... | @@ -224,8 +224,7 @@ |
224 | </div> | 224 | </div> |
225 | <tdytTable | 225 | <tdytTable |
226 | :tableData="ruleForm.tdytqxList" | 226 | :tableData="ruleForm.tdytqxList" |
227 | @upDateQlrxxList="upDateTdytxxList" | 227 | @upDateTdytxxList="upDateTdytxxList" |
228 | :viewtype="$route.query.viewtype" | ||
229 | /> | 228 | /> |
230 | <div class="slxx_title title-block"> | 229 | <div class="slxx_title title-block"> |
231 | 权利人信息 | 230 | 权利人信息 |
... | @@ -263,7 +262,7 @@ | ... | @@ -263,7 +262,7 @@ |
263 | </el-col> | 262 | </el-col> |
264 | </el-row> | 263 | </el-row> |
265 | <qlrCommonTable | 264 | <qlrCommonTable |
266 | :tableData="ruleForm.qlrList" | 265 | :tableData="ruleForm.qlrData" |
267 | @upDateQlrxxList="upDateQlrxxList" | 266 | @upDateQlrxxList="upDateQlrxxList" |
268 | :key="key" | 267 | :key="key" |
269 | :viewtype="$route.query.viewtype" | 268 | :viewtype="$route.query.viewtype" |
... | @@ -341,14 +340,14 @@ export default { | ... | @@ -341,14 +340,14 @@ export default { |
341 | }, | 340 | }, |
342 | // 更新土地用途信息 | 341 | // 更新土地用途信息 |
343 | upDateTdytxxList(val) { | 342 | upDateTdytxxList(val) { |
344 | console.log("VAL",val); | 343 | console.log("VALlllll",val); |
345 | this.ruleForm.tdytqxList && (this.ruleForm.tdytqxList = _.cloneDeep(val)); | 344 | this.ruleForm.tdytqxList && (this.ruleForm.tdytqxList = _.cloneDeep(val)); |
346 | this.key++; | 345 | this.key++; |
347 | }, | 346 | }, |
348 | // 更新权利人信息 | 347 | // 更新权利人信息 |
349 | upDateQlrxxList(val) { | 348 | upDateQlrxxList(val) { |
350 | this.ruleForm.qlrList && (this.ruleForm.qlrList = _.cloneDeep(val)); | 349 | this.ruleForm.qlrData && (this.ruleForm.qlrData = _.cloneDeep(val)); |
351 | this.czrOptions = this.ruleForm.qlrList; | 350 | this.czrOptions = this.ruleForm.qlrData; |
352 | this.key++; | 351 | this.key++; |
353 | }, | 352 | }, |
354 | // 更新义务人信息 | 353 | // 更新义务人信息 |
... | @@ -358,7 +357,7 @@ export default { | ... | @@ -358,7 +357,7 @@ export default { |
358 | }, | 357 | }, |
359 | onSubmit() { | 358 | onSubmit() { |
360 | console.log("this.ruleForm大信息",this.ruleForm); | 359 | console.log("this.ruleForm大信息",this.ruleForm); |
361 | if (this.ruleForm.qlrList.length == 0) { | 360 | if (this.ruleForm.qlrData.length == 0) { |
362 | this.$message({ | 361 | this.$message({ |
363 | showClose: true, | 362 | showClose: true, |
364 | message: "请确认权利人信息", | 363 | message: "请确认权利人信息", |
... | @@ -368,7 +367,7 @@ export default { | ... | @@ -368,7 +367,7 @@ export default { |
368 | } | 367 | } |
369 | 368 | ||
370 | if (this.ruleForm.qlxx.gyfs == "0") { | 369 | if (this.ruleForm.qlxx.gyfs == "0") { |
371 | if (this.ruleForm.qlrList.length > 1) { | 370 | if (this.ruleForm.qlrData.length > 1) { |
372 | this.$message({ | 371 | this.$message({ |
373 | showClose: true, | 372 | showClose: true, |
374 | message: "共有方式:单独所有,权利人只能是一个人", | 373 | message: "共有方式:单独所有,权利人只能是一个人", |
... | @@ -376,17 +375,17 @@ export default { | ... | @@ -376,17 +375,17 @@ export default { |
376 | }); | 375 | }); |
377 | return false; | 376 | return false; |
378 | } | 377 | } |
379 | this.ruleForm.qlrList[0].sfczr = "1"; | 378 | this.ruleForm.qlrData[0].sfczr = "1"; |
380 | } | 379 | } |
381 | if (this.ruleForm.qlxx.gyfs == "1") { | 380 | if (this.ruleForm.qlxx.gyfs == "1") { |
382 | //是否分别持证 | 381 | //是否分别持证 |
383 | if (this.ruleForm.qlxx.sqfbcz == "1") { | 382 | if (this.ruleForm.qlxx.sqfbcz == "1") { |
384 | //是 | 383 | //是 |
385 | this.ruleForm.qlrList.forEach((item, index) => { | 384 | this.ruleForm.qlrData.forEach((item, index) => { |
386 | item.sfczr = "1"; | 385 | item.sfczr = "1"; |
387 | }); | 386 | }); |
388 | } else { | 387 | } else { |
389 | this.ruleForm.qlrList.forEach((item, index) => { | 388 | this.ruleForm.qlrData.forEach((item, index) => { |
390 | if (item.zjh == this.ruleForm.czr) { | 389 | if (item.zjh == this.ruleForm.czr) { |
391 | item.sfczr = "1"; | 390 | item.sfczr = "1"; |
392 | } else { | 391 | } else { | ... | ... |
1 | <!-- | ||
2 | * @Description: | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-05-17 10:39:47 | ||
5 | --> | ||
6 | <template> | ||
7 | <dialogBox title="土地用途信息" width="60%" isMain v-model="myValue" :isFullscreen="false" @submitForm="submitForm" | ||
8 | @closeDialog="closeDialog" :isButton="showButton"> | ||
9 | <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="138px"> | ||
10 | <el-row> | ||
11 | <el-col :span="12"> | ||
12 | <el-form-item label="土地用途" prop="tdyt"> | ||
13 | <el-input v-model="ruleForm.tdyt"></el-input> | ||
14 | </el-form-item> | ||
15 | </el-col> | ||
16 | <el-col :span="12"> | ||
17 | <el-form-item label="土地使用权限" prop="syqx"> | ||
18 | <el-input v-model="ruleForm.syqx"></el-input> | ||
19 | </el-form-item> | ||
20 | </el-col> | ||
21 | </el-row> | ||
22 | <el-row> | ||
23 | <el-col :span="12"> | ||
24 | <el-form-item label="土地使用结束时间" prop="jssj"> | ||
25 | <el-date-picker | ||
26 | v-model="ruleForm.jssj" | ||
27 | type="daterange" | ||
28 | range-separator="至" | ||
29 | start-placeholder="开始日期" | ||
30 | end-placeholder="结束日期" | ||
31 | value-format="yyyy-MM-dd">> | ||
32 | </el-date-picker> | ||
33 | </el-form-item> | ||
34 | </el-col> | ||
35 | <el-col :span="12"> | ||
36 | <el-form-item label="土地使用起止时间" prop="qzsj"> | ||
37 | <el-date-picker | ||
38 | v-model="ruleForm.qzsj" | ||
39 | type="daterange" | ||
40 | range-separator="至" | ||
41 | start-placeholder="开始日期" | ||
42 | end-placeholder="结束日期" | ||
43 | value-format="yyyy-MM-dd">> | ||
44 | </el-date-picker> | ||
45 | </el-form-item> | ||
46 | </el-col> | ||
47 | </el-row> | ||
48 | </el-form> | ||
49 | </dialogBox> | ||
50 | </template>z x addTdyt | ||
51 | <script> | ||
52 | import { mapGetters } from "vuex"; | ||
53 | export default { | ||
54 | props: { | ||
55 | value: { type: Boolean, default: false }, | ||
56 | details: { type: Object, default: {} }, | ||
57 | showButton: { type: Boolean, default: false } | ||
58 | }, | ||
59 | data () { | ||
60 | return { | ||
61 | myValue: this.value, | ||
62 | ruleForm: { | ||
63 | tdyt:"", | ||
64 | syqx:"", | ||
65 | jssj:"", | ||
66 | qzsj:"" | ||
67 | }, | ||
68 | rules: { | ||
69 | tdyt: [{ required: true, message: "土地用途", trigger: "blur" }], | ||
70 | syqx: [{ required: true, message: "土地使用权限", trigger: "blur" }], | ||
71 | jssj: [{ required: true, message: "土地使用结束时间", trigger: "blur" }], | ||
72 | qzsj: [{ required: true, message: "土地使用起止时间", trigger: "blur" }], | ||
73 | }, | ||
74 | }; | ||
75 | }, | ||
76 | watch: { | ||
77 | value (val) { | ||
78 | console.log("val",val); | ||
79 | this.myValue = _.cloneDeep(val); | ||
80 | }, | ||
81 | details: { | ||
82 | handler: function (val, oldVal) { | ||
83 | console.log("val2",val); | ||
84 | this.ruleForm = val; | ||
85 | }, | ||
86 | deep: true, | ||
87 | }, | ||
88 | }, | ||
89 | methods: { | ||
90 | closeDialog () { | ||
91 | this.$emit("input", false); | ||
92 | this.$refs["ruleForm"].resetFields(); | ||
93 | }, | ||
94 | submitForm () { | ||
95 | console.log("this.ruleForm",this.ruleForm); | ||
96 | this.$refs.ruleForm.validate((valid) => { | ||
97 | if (valid) { | ||
98 | this.$emit("input", false); | ||
99 | this.$emit("updateDetail", _.cloneDeep(this.ruleForm)); | ||
100 | } else { | ||
101 | return false; | ||
102 | } | ||
103 | }); | ||
104 | }, | ||
105 | }, | ||
106 | }; | ||
107 | </script> | ||
108 | <style scoped lang="scss"> | ||
109 | @import "~@/styles/dialogBoxheader.scss"; | ||
110 | .submit-button { | ||
111 | text-align: center; | ||
112 | height: 52px; | ||
113 | padding-top: 10px; | ||
114 | background-color: #fff; | ||
115 | } | ||
116 | </style> |
... | @@ -5,214 +5,203 @@ | ... | @@ -5,214 +5,203 @@ |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div> | 7 | <div> |
8 | <lb-table :column="InformationTable" :pagination="false" :key="key" :heightNumSetting="true" :minHeight="150" | 8 | <lb-table |
9 | :data="tableDataList"> | 9 | :column="InformationTable" |
10 | :pagination="false" | ||
11 | :key="key" | ||
12 | :heightNumSetting="true" | ||
13 | :minHeight="150" | ||
14 | :data="tableDataList" | ||
15 | > | ||
10 | </lb-table> | 16 | </lb-table> |
11 | <addTdyt v-model="dialog" :details="details" :showButton="showButton" @updateDetail="handleupdateDetail" /> | ||
12 | </div> | 17 | </div> |
13 | </template> | 18 | </template> |
14 | <script> | 19 | <script> |
15 | import { mapGetters } from 'vuex' | 20 | import { mapGetters } from "vuex"; |
16 | import { getIdCardInfo } from '@/utils/operation.js' | 21 | export default { |
17 | import addTdyt from './dialog/addTdyt.vue' | 22 | computed: { |
18 | export default { | 23 | ...mapGetters(["dictData"]), |
19 | components: { | 24 | }, |
20 | addTdyt | 25 | props: { |
21 | }, | 26 | tableData: { |
22 | computed: { | 27 | type: Array, |
23 | ...mapGetters(["dictData"]), | 28 | default: function () { |
24 | }, | 29 | return []; |
25 | props: { | ||
26 | tableData: { | ||
27 | type: Array, | ||
28 | default: function () { | ||
29 | return [] | ||
30 | } | ||
31 | }, | 30 | }, |
32 | }, | 31 | }, |
33 | data () { | 32 | }, |
34 | return { | 33 | data() { |
35 | key: 0, | 34 | return { |
36 | dataIndex: 0, | 35 | key: 0, |
37 | dialog: false, | 36 | newdata: { |
38 | isaddupdate: false, | 37 | yt: "", |
39 | showButton: this.$route.query.viewtype ? false : true, | 38 | qssj: "", |
40 | details: {}, | 39 | jssj: "", |
41 | tableDataList: [], | 40 | syqx: "", |
42 | InformationTable: [ | 41 | }, |
43 | { | 42 | tableDataList: [], |
44 | width: '50', | 43 | InformationTable: [ |
45 | renderHeader: (h, scope) => { | 44 | { |
46 | return <div> { | 45 | width: "50", |
47 | this.$route.query.viewtype == 1 ? '序号' : <i class="el-icon-plus pointer" onClick={() => { this.addClick() }}></i> | 46 | renderHeader: (h, scope) => { |
48 | } | 47 | return ( |
48 | <div> | ||
49 | {" "} | ||
50 | {this.$route.query.viewtype == 1 ? ( | ||
51 | "序号" | ||
52 | ) : ( | ||
53 | <i | ||
54 | class="el-icon-plus pointer" | ||
55 | onClick={() => { | ||
56 | this.addClick(); | ||
57 | }} | ||
58 | ></i> | ||
59 | )} | ||
49 | </div> | 60 | </div> |
50 | }, | 61 | ); |
51 | render: (h, scope) => { | ||
52 | return ( | ||
53 | <div> | ||
54 | { | ||
55 | this.$route.query.viewtype == 1 ? <span>{scope.$index + 1}</span> : | ||
56 | <i class="el-icon-minus pointer" onClick={() => { this.deleClick(scope.$index, scope.row) }}></i> | ||
57 | } | ||
58 | </div> | ||
59 | ) | ||
60 | } | ||
61 | }, | 62 | }, |
62 | { | 63 | render: (h, scope) => { |
63 | label: '土地用途', | ||
64 | align: 'center', | ||
65 | render: (h, scope) => { | ||
66 | return ( | 64 | return ( |
67 | <el-select value={scope.row.yt} | 65 | <div> |
68 | onChange={(val) => { scope.row.yt = val }} clearable> | 66 | {this.$route.query.viewtype == 1 ? ( |
69 | { | 67 | <span>{scope.$index + 1}</span> |
70 | this.dictData['tdyt'].map(option => { | 68 | ) : ( |
71 | return ( | 69 | <i |
72 | <el-option label={option.dname} value={option.dcode}></el-option> | 70 | class="el-icon-minus pointer" |
73 | ) | 71 | onClick={() => { |
74 | }) | 72 | this.deleClick(scope.$index, scope.row); |
75 | } | 73 | }} |
74 | ></i> | ||
75 | )} | ||
76 | </div> | ||
77 | ); | ||
78 | }, | ||
79 | }, | ||
80 | { | ||
81 | label: "土地用途", | ||
82 | align: "center", | ||
83 | render: (h, scope) => { | ||
84 | return ( | ||
85 | <el-select | ||
86 | value={scope.row.yt} | ||
87 | onChange={(val) => { | ||
88 | scope.row.yt = val; | ||
89 | }} | ||
90 | clearable | ||
91 | onblur={() => { | ||
92 | this.addrow(scope); | ||
93 | }} | ||
94 | > | ||
95 | {this.dictData["tdyt"].map((option) => { | ||
96 | return ( | ||
97 | <el-option | ||
98 | label={option.dname} | ||
99 | value={option.dcode} | ||
100 | ></el-option> | ||
101 | ); | ||
102 | })} | ||
76 | </el-select> | 103 | </el-select> |
77 | ) | 104 | ); |
78 | } | 105 | }, |
79 | }, | 106 | }, |
80 | { | 107 | { |
81 | prop: "sqrmc", | 108 | label: "土地使用起始时间", |
82 | label: "土地使用起始时间", | 109 | render: (h, scope) => { |
83 | render: (h, scope) => { | ||
84 | return ( | 110 | return ( |
85 | <el-date-picker | 111 | <el-date-picker |
86 | v-model={scope.row.qssj} | 112 | v-model={scope.row.qssj} |
87 | type="date" | 113 | type="date" |
88 | placeholder="选择日期" | 114 | placeholder="选择日期" |
115 | value-format="yyyy-MM-dd" | ||
116 | onblur={() => { | ||
117 | this.addrow(scope.row); | ||
118 | }} | ||
89 | ></el-date-picker> | 119 | ></el-date-picker> |
90 | ); | 120 | ); |
91 | } | ||
92 | }, | 121 | }, |
93 | { | 122 | }, |
94 | prop: "zjzl", | 123 | { |
95 | label: "土地使用结束时间", | 124 | label: "土地使用结束时间", |
96 | render: (h, scope) => { | 125 | render: (h, scope) => { |
97 | return ( | 126 | return ( |
98 | <el-date-picker | 127 | <el-date-picker |
99 | v-model={scope.row.jssj} | 128 | v-model={scope.row.jssj} |
100 | type="date" | 129 | type="date" |
101 | placeholder="选择日期" | 130 | placeholder="选择日期" |
131 | value-format="yyyy-MM-dd" | ||
132 | onblur={() => { | ||
133 | this.addrow(scope.row); | ||
134 | }} | ||
102 | ></el-date-picker> | 135 | ></el-date-picker> |
103 | ); | 136 | ); |
104 | } | ||
105 | }, | 137 | }, |
106 | { | ||
107 | prop: "zjh", | ||
108 | label: "土地使用期限", | ||
109 | render: (h, scope) => { | ||
110 | return <el-input v-model={scope.row.syqx} ></el-input> | ||
111 | } | ||
112 | } | ||
113 | ], | ||
114 | } | ||
115 | }, | ||
116 | watch: { | ||
117 | tableData: { | ||
118 | handler: function (val, oldVal) { | ||
119 | console.log("什么事件111",val); | ||
120 | let that = this | ||
121 | this.$nextTick(() => { | ||
122 | if (val.length == 0 || !val) { | ||
123 | that.tableDataList = _.cloneDeep([{ | ||
124 | sqrmc: '', | ||
125 | dlrzjlx: '', | ||
126 | dlrzjh: '', | ||
127 | fr: '' | ||
128 | }]) | ||
129 | } else { | ||
130 | that.tableDataList = _.cloneDeep(val) | ||
131 | } | ||
132 | }) | ||
133 | }, | 138 | }, |
134 | immediate: true, | 139 | { |
135 | deep: true | 140 | label: "土地使用期限", |
136 | }, | 141 | render: (h, scope) => { |
137 | // gyfs: { | 142 | return ( |
138 | // handler (newVal, oldValue) { | 143 | <el-input |
139 | // console.log("什么事件222",newVal); | 144 | v-model={scope.row.syqx} |
140 | // let dataList = _.cloneDeep(this.InformationTable) | 145 | onblur={() => { |
141 | // let dataList = _.cloneDeep(this.InformationTable) | 146 | this.addrow(scope.row); |
142 | // if (newVal == 0) { | 147 | }} |
143 | // // this.column = _.cloneDeep(dataList).slice(1, dataList.length) | 148 | ></el-input> |
144 | // this.column = _.cloneDeep(dataList) | 149 | ); |
145 | 150 | }, | |
146 | // } else if ((newVal == '1' || newVal == '3')) { | 151 | }, |
147 | // this.column = dataList | 152 | ], |
148 | // } else { | 153 | }; |
149 | // this.column = _.cloneDeep(dataList) | 154 | }, |
150 | // } | 155 | watch: { |
151 | // }, | 156 | tableData: { |
152 | // immediate: true | 157 | handler: function (val, oldVal) { |
153 | // } | 158 | console.log("什么事件111", val); |
154 | }, | 159 | let that = this; |
155 | methods: { | 160 | this.$nextTick(() => { |
156 | // 新增提交事件 | 161 | if (val.length == 0 || !val) { |
157 | handleupdateDetail (value) { | 162 | that.tableDataList = _.cloneDeep([ |
158 | console.log("什么事件33",this.tableData); | 163 | { |
159 | if (this.isaddupdate) { | 164 | yt: "", |
160 | if (!_.isEqual(value, this.tableData)) { | 165 | qssj: "", |
161 | this.tableDataList[this.tableDataList.length] = _.cloneDeep(value); | 166 | jssj: "", |
162 | this.$emit('upDateQlrxxList', this.tableDataList) | 167 | syqx: "", |
163 | } | 168 | }, |
164 | } else { | 169 | ]); |
165 | if (!_.isEqual(value, this.tableData)) { | 170 | } else { |
166 | this.tableDataList[this.dataIndex] = _.cloneDeep(value); | 171 | that.tableDataList = _.cloneDeep(val); |
167 | this.$emit('upDateQlrxxList', this.tableDataList) | ||
168 | } | 172 | } |
169 | } | ||
170 | this.key++ | ||
171 | }, | ||
172 | // 新增 | ||
173 | addClick () { | ||
174 | if (this.gyfs == '0' && this.tableDataList.length > 0) { | ||
175 | this.$message.warning("1") | ||
176 | } else { | ||
177 | this.dialog = true | ||
178 | this.isaddupdate = true | ||
179 | } | ||
180 | }, | ||
181 | |||
182 | // 删除 | ||
183 | deleClick (index, row) { | ||
184 | this.$confirm('确定要删除吗, 是否继续?', '提示', { | ||
185 | confirmButtonText: '确定', | ||
186 | cancelButtonText: '取消', | ||
187 | type: 'warning' | ||
188 | }).then(() => { | ||
189 | this.tableData.splice(index, 1) | ||
190 | }).catch(() => { | ||
191 | }); | 173 | }); |
192 | }, | 174 | }, |
193 | // 修改 | 175 | immediate: true, |
194 | editClick (index, row) { | 176 | deep: true, |
195 | // popupDialog("申请人信息", "workflow/components/addQlr", { | 177 | }, |
196 | // showButton: this.$route.query.viewtype ? false : true, | 178 | }, |
197 | // dataIndex :index, | 179 | methods: { |
198 | // details :row,/[^\d]/g | 180 | // 修改事件 |
199 | // isaddupdate :false | 181 | addrow() { |
200 | // }); | 182 | this.$emit("upDateTdytxxList", this.tableDataList); |
201 | this.dataIndex = index | 183 | }, |
202 | this.dialog = true | 184 | // 新增 |
203 | this.details = row | 185 | addClick() { |
204 | this.isaddupdate = false | 186 | this.tableDataList[this.tableDataList.length] = _.cloneDeep(this.newdata); |
205 | }, | 187 | this.$emit("upDateTdytxxList", this.tableDataList); |
206 | queryViewClick (index, row) { | 188 | }, |
207 | // popupDialog("申请人信息", "workflow/components/addQlr", { | 189 | |
208 | // showButton: this.$route.query.viewtype ? false : true, | 190 | // 删除 |
209 | // details: row, | 191 | deleClick(index, row) { |
210 | // }); | 192 | console.log("删除"); |
211 | this.dialog = true | 193 | this.$confirm("确定要删除吗, 是否继续?", "提示", { |
212 | this.details = row | 194 | confirmButtonText: "确定", |
213 | } | 195 | cancelButtonText: "取消", |
214 | } | 196 | type: "warning", |
215 | } | 197 | }) |
198 | .then(() => { | ||
199 | this.tableData.splice(index, 1); | ||
200 | }) | ||
201 | .catch(() => {}); | ||
202 | }, | ||
203 | }, | ||
204 | }; | ||
216 | </script> | 205 | </script> |
217 | <style scoped lang="scss"> | 206 | <style scoped lang="scss"> |
218 | .el-input { | 207 | .el-input { | ... | ... |
-
Please register or sign in to post a comment