--no commit message
Showing
3 changed files
with
131 additions
and
259 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,20 +5,20 @@ | ... | @@ -5,20 +5,20 @@ |
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' | ||
18 | export default { | ||
19 | components: { | ||
20 | addTdyt | ||
21 | }, | ||
22 | computed: { | 22 | computed: { |
23 | ...mapGetters(["dictData"]), | 23 | ...mapGetters(["dictData"]), |
24 | }, | 24 | }, |
... | @@ -26,59 +26,85 @@ | ... | @@ -26,59 +26,85 @@ |
26 | tableData: { | 26 | tableData: { |
27 | type: Array, | 27 | type: Array, |
28 | default: function () { | 28 | default: function () { |
29 | return [] | 29 | return []; |
30 | } | ||
31 | }, | 30 | }, |
32 | }, | 31 | }, |
33 | data () { | 32 | }, |
33 | data() { | ||
34 | return { | 34 | return { |
35 | key: 0, | 35 | key: 0, |
36 | dataIndex: 0, | 36 | newdata: { |
37 | dialog: false, | 37 | yt: "", |
38 | isaddupdate: false, | 38 | qssj: "", |
39 | showButton: this.$route.query.viewtype ? false : true, | 39 | jssj: "", |
40 | details: {}, | 40 | syqx: "", |
41 | }, | ||
41 | tableDataList: [], | 42 | tableDataList: [], |
42 | InformationTable: [ | 43 | InformationTable: [ |
43 | { | 44 | { |
44 | width: '50', | 45 | width: "50", |
45 | renderHeader: (h, scope) => { | 46 | renderHeader: (h, scope) => { |
46 | return <div> { | 47 | return ( |
47 | this.$route.query.viewtype == 1 ? '序号' : <i class="el-icon-plus pointer" onClick={() => { this.addClick() }}></i> | 48 | <div> |
48 | } | 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> |
61 | ); | ||
50 | }, | 62 | }, |
51 | render: (h, scope) => { | 63 | render: (h, scope) => { |
52 | return ( | 64 | return ( |
53 | <div> | 65 | <div> |
54 | { | 66 | {this.$route.query.viewtype == 1 ? ( |
55 | this.$route.query.viewtype == 1 ? <span>{scope.$index + 1}</span> : | 67 | <span>{scope.$index + 1}</span> |
56 | <i class="el-icon-minus pointer" onClick={() => { this.deleClick(scope.$index, scope.row) }}></i> | 68 | ) : ( |
57 | } | 69 | <i |
70 | class="el-icon-minus pointer" | ||
71 | onClick={() => { | ||
72 | this.deleClick(scope.$index, scope.row); | ||
73 | }} | ||
74 | ></i> | ||
75 | )} | ||
58 | </div> | 76 | </div> |
59 | ) | 77 | ); |
60 | } | 78 | }, |
61 | }, | 79 | }, |
62 | { | 80 | { |
63 | label: '土地用途', | 81 | label: "土地用途", |
64 | align: 'center', | 82 | align: "center", |
65 | render: (h, scope) => { | 83 | render: (h, scope) => { |
66 | return ( | 84 | return ( |
67 | <el-select value={scope.row.yt} | 85 | <el-select |
68 | onChange={(val) => { scope.row.yt = val }} clearable> | 86 | value={scope.row.yt} |
69 | { | 87 | onChange={(val) => { |
70 | this.dictData['tdyt'].map(option => { | 88 | scope.row.yt = val; |
89 | }} | ||
90 | clearable | ||
91 | onblur={() => { | ||
92 | this.addrow(scope); | ||
93 | }} | ||
94 | > | ||
95 | {this.dictData["tdyt"].map((option) => { | ||
71 | return ( | 96 | return ( |
72 | <el-option label={option.dname} value={option.dcode}></el-option> | 97 | <el-option |
73 | ) | 98 | label={option.dname} |
74 | }) | 99 | value={option.dcode} |
75 | } | 100 | ></el-option> |
101 | ); | ||
102 | })} | ||
76 | </el-select> | 103 | </el-select> |
77 | ) | 104 | ); |
78 | } | 105 | }, |
79 | }, | 106 | }, |
80 | { | 107 | { |
81 | prop: "sqrmc", | ||
82 | label: "土地使用起始时间", | 108 | label: "土地使用起始时间", |
83 | render: (h, scope) => { | 109 | render: (h, scope) => { |
84 | return ( | 110 | return ( |
... | @@ -86,12 +112,15 @@ | ... | @@ -86,12 +112,15 @@ |
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 | } | 121 | }, |
92 | }, | 122 | }, |
93 | { | 123 | { |
94 | prop: "zjzl", | ||
95 | label: "土地使用结束时间", | 124 | label: "土地使用结束时间", |
96 | render: (h, scope) => { | 125 | render: (h, scope) => { |
97 | return ( | 126 | return ( |
... | @@ -99,120 +128,80 @@ | ... | @@ -99,120 +128,80 @@ |
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 | } | 137 | }, |
105 | }, | 138 | }, |
106 | { | 139 | { |
107 | prop: "zjh", | ||
108 | label: "土地使用期限", | 140 | label: "土地使用期限", |
109 | render: (h, scope) => { | 141 | render: (h, scope) => { |
110 | return <el-input v-model={scope.row.syqx} ></el-input> | 142 | return ( |
111 | } | 143 | <el-input |
112 | } | 144 | v-model={scope.row.syqx} |
145 | onblur={() => { | ||
146 | this.addrow(scope.row); | ||
147 | }} | ||
148 | ></el-input> | ||
149 | ); | ||
150 | }, | ||
151 | }, | ||
113 | ], | 152 | ], |
114 | } | 153 | }; |
115 | }, | 154 | }, |
116 | watch: { | 155 | watch: { |
117 | tableData: { | 156 | tableData: { |
118 | handler: function (val, oldVal) { | 157 | handler: function (val, oldVal) { |
119 | console.log("什么事件111",val); | 158 | console.log("什么事件111", val); |
120 | let that = this | 159 | let that = this; |
121 | this.$nextTick(() => { | 160 | this.$nextTick(() => { |
122 | if (val.length == 0 || !val) { | 161 | if (val.length == 0 || !val) { |
123 | that.tableDataList = _.cloneDeep([{ | 162 | that.tableDataList = _.cloneDeep([ |
124 | sqrmc: '', | 163 | { |
125 | dlrzjlx: '', | 164 | yt: "", |
126 | dlrzjh: '', | 165 | qssj: "", |
127 | fr: '' | 166 | jssj: "", |
128 | }]) | 167 | syqx: "", |
168 | }, | ||
169 | ]); | ||
129 | } else { | 170 | } else { |
130 | that.tableDataList = _.cloneDeep(val) | 171 | that.tableDataList = _.cloneDeep(val); |
131 | } | 172 | } |
132 | }) | 173 | }); |
133 | }, | 174 | }, |
134 | immediate: true, | 175 | immediate: true, |
135 | deep: true | 176 | deep: true, |
136 | }, | 177 | }, |
137 | // gyfs: { | ||
138 | // handler (newVal, oldValue) { | ||
139 | // console.log("什么事件222",newVal); | ||
140 | // let dataList = _.cloneDeep(this.InformationTable) | ||
141 | // let dataList = _.cloneDeep(this.InformationTable) | ||
142 | // if (newVal == 0) { | ||
143 | // // this.column = _.cloneDeep(dataList).slice(1, dataList.length) | ||
144 | // this.column = _.cloneDeep(dataList) | ||
145 | |||
146 | // } else if ((newVal == '1' || newVal == '3')) { | ||
147 | // this.column = dataList | ||
148 | // } else { | ||
149 | // this.column = _.cloneDeep(dataList) | ||
150 | // } | ||
151 | // }, | ||
152 | // immediate: true | ||
153 | // } | ||
154 | }, | 178 | }, |
155 | methods: { | 179 | methods: { |
156 | // 新增提交事件 | 180 | // 修改事件 |
157 | handleupdateDetail (value) { | 181 | addrow() { |
158 | console.log("什么事件33",this.tableData); | 182 | this.$emit("upDateTdytxxList", this.tableDataList); |
159 | if (this.isaddupdate) { | ||
160 | if (!_.isEqual(value, this.tableData)) { | ||
161 | this.tableDataList[this.tableDataList.length] = _.cloneDeep(value); | ||
162 | this.$emit('upDateQlrxxList', this.tableDataList) | ||
163 | } | ||
164 | } else { | ||
165 | if (!_.isEqual(value, this.tableData)) { | ||
166 | this.tableDataList[this.dataIndex] = _.cloneDeep(value); | ||
167 | this.$emit('upDateQlrxxList', this.tableDataList) | ||
168 | } | ||
169 | } | ||
170 | this.key++ | ||
171 | }, | 183 | }, |
172 | // 新增 | 184 | // 新增 |
173 | addClick () { | 185 | addClick() { |
174 | if (this.gyfs == '0' && this.tableDataList.length > 0) { | 186 | this.tableDataList[this.tableDataList.length] = _.cloneDeep(this.newdata); |
175 | this.$message.warning("1") | 187 | this.$emit("upDateTdytxxList", this.tableDataList); |
176 | } else { | ||
177 | this.dialog = true | ||
178 | this.isaddupdate = true | ||
179 | } | ||
180 | }, | 188 | }, |
181 | 189 | ||
182 | // 删除 | 190 | // 删除 |
183 | deleClick (index, row) { | 191 | deleClick(index, row) { |
184 | this.$confirm('确定要删除吗, 是否继续?', '提示', { | 192 | console.log("删除"); |
185 | confirmButtonText: '确定', | 193 | this.$confirm("确定要删除吗, 是否继续?", "提示", { |
186 | cancelButtonText: '取消', | 194 | confirmButtonText: "确定", |
187 | type: 'warning' | 195 | cancelButtonText: "取消", |
188 | }).then(() => { | 196 | type: "warning", |
189 | this.tableData.splice(index, 1) | 197 | }) |
190 | }).catch(() => { | 198 | .then(() => { |
191 | }); | 199 | this.tableData.splice(index, 1); |
200 | }) | ||
201 | .catch(() => {}); | ||
192 | }, | 202 | }, |
193 | // 修改 | 203 | }, |
194 | editClick (index, row) { | 204 | }; |
195 | // popupDialog("申请人信息", "workflow/components/addQlr", { | ||
196 | // showButton: this.$route.query.viewtype ? false : true, | ||
197 | // dataIndex :index, | ||
198 | // details :row,/[^\d]/g | ||
199 | // isaddupdate :false | ||
200 | // }); | ||
201 | this.dataIndex = index | ||
202 | this.dialog = true | ||
203 | this.details = row | ||
204 | this.isaddupdate = false | ||
205 | }, | ||
206 | queryViewClick (index, row) { | ||
207 | // popupDialog("申请人信息", "workflow/components/addQlr", { | ||
208 | // showButton: this.$route.query.viewtype ? false : true, | ||
209 | // details: row, | ||
210 | // }); | ||
211 | this.dialog = true | ||
212 | this.details = row | ||
213 | } | ||
214 | } | ||
215 | } | ||
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