36176622 by renchao@pashanhoo.com

style:table组件完成

1 parent baaf0b60
1 { 1 {
2 "TITLE": "不动产登记系统", 2 "TITLE": "不动产登记系统",
3 "SERVERAPI": "/bdcdj", 3 "SERVERAPI": "/bdcdj-th",
4 "IDCARDURL": "http://127.0.0.1:33088/function=get_idcard&readnew=0" 4 "IDCARDURL": "http://127.0.0.1:33088/function=get_idcard&readnew=0"
5 } 5 }
......
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
4 * @Author: sakuya 4 * @Author: sakuya
5 * @Date: 2021年6月10日10:04:07 5 * @Date: 2021年6月10日10:04:07
6 * @LastEditors: Please set LastEditors 6 * @LastEditors: Please set LastEditors
7 * @LastEditTime: 2023-06-29 11:14:11 7 * @LastEditTime: 2023-07-05 10:39:17
8 --> 8 -->
9 9
10 <template> 10 <template>
11 <el-select ref="select" v-model="defaultValue" :size="size" :clearable="clearable" :multiple="multiple" :collapse-tags="collapseTags" 11 <el-select ref="select" v-model="defaultValue" :size="size" :clearable="clearable" :multiple="multiple" :collapse-tags="collapseTags"
12 :collapse-tags-tooltip="collapseTagsTooltip" :filterable="filterable" :placeholder="placeholder" :disabled="disabled" :filter-method="filterMethod" 12 :collapse-tags-tooltip="collapseTagsTooltip" :filterable="filterable" :placeholder="placeholder" :disabled="disabled"
13 @remove-tag="removeTag" @visible-change="visibleChange" @clear="clear"> 13 @remove-tag="removeTag" @visible-change="visibleChange" @clear="clear">
14 <template #empty> 14 <template #empty>
15 <div class="sc-table-select__table" :style="{width: tableWidth+'px'}" v-loading="loading"> 15 <div class="sc-table-select__table" :style="{width: tableWidth+'px'}" v-loading="loading">
...@@ -19,14 +19,10 @@ ...@@ -19,14 +19,10 @@
19 <el-table ref="table" :data="tableData" :height="245" :highlight-current-row="!multiple" @row-click="click" @select="select" @select-all="selectAll"> 19 <el-table ref="table" :data="tableData" :height="245" :highlight-current-row="!multiple" @row-click="click" @select="select" @select-all="selectAll">
20 <el-table-column v-if="multiple" type="selection" width="45"></el-table-column> 20 <el-table-column v-if="multiple" type="selection" width="45"></el-table-column>
21 <el-table-column v-else type="index" width="45"> 21 <el-table-column v-else type="index" width="45">
22 <template #default="scope"><span>{{scope.$index+(currentPage - 1) * pageSize + 1}}</span></template> 22 <template #default="scope"><span>{{scope.$index +1 }}</span></template>
23 </el-table-column> 23 </el-table-column>
24 <slot></slot> 24 <slot></slot>
25 </el-table> 25 </el-table>
26 <div class="sc-table-select__page">
27 <el-pagination small background layout="prev, pager, next" :total="total" :page-size="pageSize" v-model:currentPage="currentPage"
28 @current-change="reload"></el-pagination>
29 </div>
30 </div> 26 </div>
31 </template> 27 </template>
32 </el-select> 28 </el-select>
...@@ -48,29 +44,23 @@ ...@@ -48,29 +44,23 @@
48 disabled: { type: Boolean, default: false }, 44 disabled: { type: Boolean, default: false },
49 tableWidth: { type: Number, default: 400 }, 45 tableWidth: { type: Number, default: 400 },
50 mode: { type: String, default: "popover" }, 46 mode: { type: String, default: "popover" },
51 props: { type: Object, default: () => { } } 47 props: { type: Object, default: () => { } },
48 // 表格数据
49 tableData: { type: Array, default: () => { [] } },
52 }, 50 },
53 data () { 51 data () {
54 return { 52 return {
55 loading: false, 53 loading: false,
56 keyword: null, 54 keyword: null,
57 defaultValue: [], 55 defaultValue: [],
58 tableData: [],
59 pageSize: config.pageSize,
60 total: 0,
61 currentPage: 1,
62 defaultProps: { 56 defaultProps: {
63 label: config.props.label, 57 label: config.props.label,
64 value: config.props.value, 58 value: config.props.value
65 page: config.request.page,
66 pageSize: config.request.pageSize,
67 keyword: config.request.keyword
68 }, 59 },
69 formData: {} 60 formData: {}
70 } 61 }
71 }, 62 },
72 computed: { 63 computed: {
73
74 }, 64 },
75 watch: { 65 watch: {
76 modelValue: { 66 modelValue: {
...@@ -90,8 +80,6 @@ ...@@ -90,8 +80,6 @@
90 //表格显示隐藏回调 80 //表格显示隐藏回调
91 visibleChange (visible) { 81 visibleChange (visible) {
92 if (visible) { 82 if (visible) {
93 this.currentPage = 1
94 this.keyword = null
95 this.formData = {} 83 this.formData = {}
96 this.getData() 84 this.getData()
97 } else { 85 } else {
...@@ -100,58 +88,24 @@ ...@@ -100,58 +88,24 @@
100 }, 88 },
101 //获取表格数据 89 //获取表格数据
102 async getData () { 90 async getData () {
103 this.loading = true;
104 var reqData = {
105 [this.defaultProps.page]: this.currentPage,
106 [this.defaultProps.pageSize]: this.pageSize,
107 [this.defaultProps.keyword]: this.keyword
108 }
109 Object.assign(reqData, this.formData)
110 // var res = await this.apiObj.get(reqData);
111 let res = {
112 code: 200,
113 data: {
114 total: 2, rows: [
115 {
116 user: 11111111111,
117 id: 111111111111
118 },
119 {
120 user: 2222222222222,
121 id: 22222222222
122 }
123 ]
124 },
125 message: ""
126 }
127 var parseData = config.parseData(res)
128 this.tableData = parseData.rows;
129 this.total = parseData.total;
130 this.loading = false;
131 //表格默认赋值 91 //表格默认赋值
132 this.$nextTick(() => { 92 if (this.multiple) {
133 if (this.multiple) { 93 this.defaultValue.forEach(row => {
134 this.defaultValue.forEach(row => { 94 var setrow = this.tableData.filter(item => item[this.defaultProps.value] === row[this.defaultProps.value])
135 var setrow = this.tableData.filter(item => item[this.defaultProps.value] === row[this.defaultProps.value]) 95 if (setrow.length > 0) {
136 if (setrow.length > 0) { 96 this.$refs.table.toggleRowSelection(setrow[0], true);
137 this.$refs.table.toggleRowSelection(setrow[0], true); 97 }
138 } 98 })
139 }) 99 } else {
140 } else { 100 if (this.defaultValue) {
141 var setrow = this.tableData.filter(item => item[this.defaultProps.value] === this.defaultValue[this.defaultProps.value]) 101 var setrow = this.tableData.filter(item => item[this.defaultProps.value] === this.defaultValue[this.defaultProps.value])
142 this.$refs.table.setCurrentRow(setrow[0]); 102 // this.$refs.table.setCurrentRow(setrow[0]);
143 } 103 }
144 this.$refs.table.setScrollTop(0) 104 }
145 }) 105 // this.$refs.table.setScrollTop(0)
146 }, 106 },
147 //插糟表单提交 107 //插糟表单提交
148 formSubmit () { 108 formSubmit () {
149 this.currentPage = 1
150 this.keyword = null
151 this.getData()
152 },
153 //分页刷新表格
154 reload () {
155 this.getData() 109 this.getData()
156 }, 110 },
157 //自动模拟options赋值 111 //自动模拟options赋值
...@@ -162,7 +116,9 @@ ...@@ -162,7 +116,9 @@
162 item.currentLabel = item.value[this.defaultProps.label] 116 item.currentLabel = item.value[this.defaultProps.label]
163 }) 117 })
164 } else { 118 } else {
165 this.$refs.select.selectedLabel = this.defaultValue[this.defaultProps.label] 119 if (this.defaultValue) {
120 this.$refs.select.selectedLabel = this.defaultValue[this.defaultProps.label]
121 }
166 } 122 }
167 }) 123 })
168 }, 124 },
...@@ -207,6 +163,7 @@ ...@@ -207,6 +163,7 @@
207 this.defaultValue = row 163 this.defaultValue = row
208 this.$refs.select.blur() 164 this.$refs.select.blur()
209 this.autoCurrentLabel() 165 this.autoCurrentLabel()
166 this.$refs.table.setCurrentRow(row);
210 this.$emit('update:modelValue', this.defaultValue); 167 this.$emit('update:modelValue', this.defaultValue);
211 this.$emit('change', this.defaultValue); 168 this.$emit('change', this.defaultValue);
212 } 169 }
...@@ -225,14 +182,6 @@ ...@@ -225,14 +182,6 @@
225 findRowByKey (value) { 182 findRowByKey (value) {
226 return this.tableData.find(item => item[this.defaultProps.value] === value) 183 return this.tableData.find(item => item[this.defaultProps.value] === value)
227 }, 184 },
228 filterMethod (keyword) {
229 if (!keyword) {
230 this.keyword = null;
231 return false;
232 }
233 this.keyword = keyword;
234 this.getData()
235 },
236 // 触发select隐藏 185 // 触发select隐藏
237 blur () { 186 blur () {
238 this.$refs.select.blur(); 187 this.$refs.select.blur();
...@@ -244,7 +193,6 @@ ...@@ -244,7 +193,6 @@
244 } 193 }
245 } 194 }
246 </script> 195 </script>
247
248 <style scoped> 196 <style scoped>
249 .sc-table-select__table { 197 .sc-table-select__table {
250 padding: 12px; 198 padding: 12px;
......
1 /* 1 /*
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-06-29 11:05:49 4 * @LastEditTime: 2023-07-05 09:48:23
5 */ 5 */
6 //表格选择器配置 6 //表格选择器配置
7 7
...@@ -9,17 +9,12 @@ export default { ...@@ -9,17 +9,12 @@ export default {
9 pageSize: 10, //表格每一页条数 9 pageSize: 10, //表格每一页条数
10 parseData: function (res) { 10 parseData: function (res) {
11 return { 11 return {
12 data: res.data, 12 data: res.data
13 rows: res.data.rows, //分析行数据字段结构
14 total: res.data.total, //分析总数字段结构
15 msg: res.message, //分析描述字段结构
16 code: res.code //分析状态字段结构
17 } 13 }
18 }, 14 },
19 request: { 15 request: {
20 page: 'page', //规定当前分页字段 16 page: 'page', //规定当前分页字段
21 pageSize: 'pageSize', //规定一页条数字段 17 pageSize: 'pageSize', //规定一页条数字段
22 keyword: 'keyword' //规定搜索字段
23 }, 18 },
24 props: { 19 props: {
25 label: 'label', //映射label显示字段 20 label: 'label', //映射label显示字段
......
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-06-25 15:52:42 4 * @LastEditTime: 2023-07-05 10:05:46
5 --> 5 -->
6 <template> 6 <template>
7 <!-- 受理信息 --> 7 <!-- 受理信息 -->
...@@ -13,8 +13,7 @@ ...@@ -13,8 +13,7 @@
13 ref="ruleForm" 13 ref="ruleForm"
14 :label-position="flag ? 'top' : ''" 14 :label-position="flag ? 'top' : ''"
15 :inline="flag" 15 :inline="flag"
16 label-width="145px" 16 label-width="145px">
17 >
18 <div class="slxx_con" v-if="isShow" :class="flag ? 'formMarginBot0' : ''"> 17 <div class="slxx_con" v-if="isShow" :class="flag ? 'formMarginBot0' : ''">
19 <div class="slxx_title title-block"> 18 <div class="slxx_title title-block">
20 补录信息 19 补录信息
...@@ -39,17 +38,35 @@ ...@@ -39,17 +38,35 @@
39 </el-row> 38 </el-row>
40 <div class="slxx_title title-block"> 39 <div class="slxx_title title-block">
41 抵押不动产情况 40 抵押不动产情况
42 <div> 41 <el-row :gutter="10">
43 请选择抵押不动产信息, 42 <el-col :span="8">
44 <select-table v-model="value2" :table-width="600" :props="props" @change="change"> 43 <el-form-item label="抵押不动产信息:">
45 <el-table-column prop="qllxmc" label="权利类型" width="180"></el-table-column> 44 <select-table v-model="ruleForm.ztQlxx" :table-width="550" :tableData="ztQlxxList"
46 <el-table-column prop="bdcqzh" label="不动产权证书"></el-table-column> 45 :props="props" @change="ztQlxxchange">
47 <el-table-column prop="qlrmc" label="权利人"></el-table-column> 46 <el-table-column prop="qllxmc" width="130" label="权利类型"></el-table-column>
48 <el-table-column prop="mjmc" label="面积"></el-table-column> 47 <el-table-column prop="bdcqzh" width="160" label="不动产权证书"></el-table-column>
49 <el-table-column prop="ytmc" label="用途"></el-table-column> 48 <el-table-column prop="qlrmc" label="权利人"></el-table-column>
50 <el-table-column prop="zl" label="坐落"></el-table-column> 49 <el-table-column prop="mjmc" label="面积"></el-table-column>
51 </select-table>请选择上手权利信息 50 <el-table-column prop="ytmc" label="用途"></el-table-column>
52 </div> 51 <el-table-column prop="zl" label="坐落"></el-table-column>
52 </select-table>
53 </el-form-item>
54 </el-col>
55
56 <el-col :span="8">
57 <el-form-item label="上手权利信息:">
58 <select-table v-model="ruleForm.ssQlxx" :table-width="550" :tableData="ssQlxxList"
59 :props="props" @change="ssQlxxchange">
60 <el-table-column prop="qllxmc" width="130" label="权利类型"></el-table-column>
61 <el-table-column prop="bdcqzh" width="160" label="不动产权证书"></el-table-column>
62 <el-table-column prop="qlrmc" label="权利人"></el-table-column>
63 <el-table-column prop="mjmc" label="面积"></el-table-column>
64 <el-table-column prop="ytmc" label="用途"></el-table-column>
65 <el-table-column prop="zl" label="坐落"></el-table-column>
66 </select-table>
67 </el-form-item>
68 </el-col>
69 </el-row>
53 <div class="triangle"></div> 70 <div class="triangle"></div>
54 </div> 71 </div>
55 <el-row :gutter="10" v-if="ruleForm.ztQlxx!=null"> 72 <el-row :gutter="10" v-if="ruleForm.ztQlxx!=null">
...@@ -137,8 +154,7 @@ ...@@ -137,8 +154,7 @@
137 v-for="item in djlxlist" 154 v-for="item in djlxlist"
138 :key="item.dcode" 155 :key="item.dcode"
139 :label="item.dname" 156 :label="item.dname"
140 :value="item.dcode" 157 :value="item.dcode"></el-option>
141 ></el-option>
142 </el-select> 158 </el-select>
143 </el-form-item> 159 </el-form-item>
144 </el-col> 160 </el-col>
...@@ -149,8 +165,7 @@ ...@@ -149,8 +165,7 @@
149 v-for="item in qsztlist" 165 v-for="item in qsztlist"
150 :key="item.dcode" 166 :key="item.dcode"
151 :label="item.dname" 167 :label="item.dname"
152 :value="item.dcode" 168 :value="item.dcode"></el-option>
153 ></el-option>
154 </el-select> 169 </el-select>
155 </el-form-item> 170 </el-form-item>
156 </el-col> 171 </el-col>
...@@ -199,8 +214,7 @@ ...@@ -199,8 +214,7 @@
199 v-for="item in dictData['A27']" 214 v-for="item in dictData['A27']"
200 :key="item.dcode" 215 :key="item.dcode"
201 :label="item.dname" 216 :label="item.dname"
202 :value="item.dcode" 217 :value="item.dcode"></el-option>
203 ></el-option>
204 </el-select> 218 </el-select>
205 </el-form-item> 219 </el-form-item>
206 </el-col> 220 </el-col>
...@@ -236,8 +250,7 @@ ...@@ -236,8 +250,7 @@
236 v-for="item in dictData['A6']" 250 v-for="item in dictData['A6']"
237 :key="item.dcode" 251 :key="item.dcode"
238 :label="item.dname" 252 :label="item.dname"
239 :value="item.dcode" 253 :value="item.dcode"></el-option>
240 ></el-option>
241 </el-select> 254 </el-select>
242 </el-form-item> 255 </el-form-item>
243 </el-col> 256 </el-col>
...@@ -257,15 +270,13 @@ ...@@ -257,15 +270,13 @@
257 <el-input 270 <el-input
258 v-model="ruleForm.diyaq.dymj" 271 v-model="ruleForm.diyaq.dymj"
259 style="width: 500%" 272 style="width: 500%"
260 oninput="value=value.replace(/[^\d.]/g,'')" 273 oninput="value=value.replace(/[^\d.]/g,'')"></el-input>
261 ></el-input>
262 <el-select v-model="ruleForm.diyaq.mjdw"> 274 <el-select v-model="ruleForm.diyaq.mjdw">
263 <el-option 275 <el-option
264 v-for="item in dictData['A7']" 276 v-for="item in dictData['A7']"
265 :key="item.dcode" 277 :key="item.dcode"
266 :label="item.dname" 278 :label="item.dname"
267 :value="item.dcode" 279 :value="item.dcode"></el-option>
268 ></el-option>
269 </el-select> 280 </el-select>
270 </div> 281 </div>
271 </el-form-item> 282 </el-form-item>
...@@ -276,15 +287,13 @@ ...@@ -276,15 +287,13 @@
276 <el-input 287 <el-input
277 v-model="ruleForm.diyaq.zgzqse" 288 v-model="ruleForm.diyaq.zgzqse"
278 style="width: 500%" 289 style="width: 500%"
279 oninput="value=value.replace(/[^\d.]/g,'')" 290 oninput="value=value.replace(/[^\d.]/g,'')"></el-input>
280 ></el-input>
281 <el-select v-model="ruleForm.diyaq.jedw"> 291 <el-select v-model="ruleForm.diyaq.jedw">
282 <el-option 292 <el-option
283 v-for="item in dictData['A57']" 293 v-for="item in dictData['A57']"
284 :key="item.dcode" 294 :key="item.dcode"
285 :label="item.dname" 295 :label="item.dname"
286 :value="item.dcode" 296 :value="item.dcode"></el-option>
287 ></el-option>
288 </el-select> 297 </el-select>
289 </div> 298 </div>
290 </el-form-item> 299 </el-form-item>
...@@ -295,15 +304,13 @@ ...@@ -295,15 +304,13 @@
295 <el-input 304 <el-input
296 v-model="ruleForm.diyaq.bdbzzqse" 305 v-model="ruleForm.diyaq.bdbzzqse"
297 style="width: 500%" 306 style="width: 500%"
298 oninput="value=value.replace(/[^\d.]/g,'')" 307 oninput="value=value.replace(/[^\d.]/g,'')"></el-input>
299 ></el-input>
300 <el-select v-model="ruleForm.diyaq.jedw"> 308 <el-select v-model="ruleForm.diyaq.jedw">
301 <el-option 309 <el-option
302 v-for="item in dictData['A57']" 310 v-for="item in dictData['A57']"
303 :key="item.dcode" 311 :key="item.dcode"
304 :label="item.dname" 312 :label="item.dname"
305 :value="item.dcode" 313 :value="item.dcode"></el-option>
306 ></el-option>
307 </el-select> 314 </el-select>
308 </div> 315 </div>
309 </el-form-item> 316 </el-form-item>
...@@ -394,8 +401,7 @@ ...@@ -394,8 +401,7 @@
394 :tableData="ruleForm.qlrData" 401 :tableData="ruleForm.qlrData"
395 @upDateQlrxxList="upDateQlrxxList" 402 @upDateQlrxxList="upDateQlrxxList"
396 :key="key" 403 :key="key"
397 :gyfs="ruleForm.qlxx.gyfs" 404 :gyfs="ruleForm.qlxx.gyfs" />
398 />
399 405
400 <div> 406 <div>
401 <div class="slxx_title title-block"> 407 <div class="slxx_title title-block">
...@@ -406,8 +412,7 @@ ...@@ -406,8 +412,7 @@
406 v-if="ruleForm.ywrData" 412 v-if="ruleForm.ywrData"
407 :tableData="ruleForm.ywrData" 413 :tableData="ruleForm.ywrData"
408 :key="key" 414 :key="key"
409 @upDateQlrxxList="upDateYwrxxList" 415 @upDateQlrxxList="upDateYwrxxList" />
410 />
411 </div> 416 </div>
412 </div> 417 </div>
413 <el-row class="btn"> 418 <el-row class="btn">
...@@ -419,182 +424,182 @@ ...@@ -419,182 +424,182 @@
419 </div> 424 </div>
420 </template> 425 </template>
421 <script> 426 <script>
422 import { mapGetters } from "vuex"; 427 import { mapGetters } from "vuex";
423 import { init, getSsQlxx, getZtQlxx, save } from "@/api/djbbl.js"; 428 import { init, getSsQlxx, getZtQlxx, save } from "@/api/djbbl.js";
424 import qlrCommonTable from "@/views/djbworkflow/components/qlrCommonTable"; 429 import qlrCommonTable from "@/views/djbworkflow/components/qlrCommonTable";
425 import ywrCommonTable from "@/views/djbworkflow/components/ywrCommonTable"; 430 import ywrCommonTable from "@/views/djbworkflow/components/ywrCommonTable";
426 import selectTable from "@/components/selectTable/index.vue"; 431 import selectTable from "@/components/selectTable/index.vue";
427 import tdytTable from "@/views/workflow/components/tdytTable"; 432 import tdytTable from "@/views/workflow/components/tdytTable";
428 export default { 433 export default {
429 components: { qlrCommonTable, ywrCommonTable, tdytTable, selectTable }, 434 components: { qlrCommonTable, ywrCommonTable, tdytTable, selectTable },
430 computed: { 435 computed: {
431 ...mapGetters(["dictData", "flag"]), 436 ...mapGetters(["dictData", "flag"]),
432 }, 437 },
433 data() { 438 data () {
434 return { 439 return {
435 value2: "", 440 props: {
436 props: { 441 label: "bdcqzh",
437 label: "user", 442 value: "bdcdyid"
438 value: "id",
439 keyword: "keyword",
440 },
441 //表单是否可操作
442 propsParam: this.$attrs,
443 key: 0,
444 isShow: false,
445 disabled: true,
446 czrOptions: [],
447 ruleForm: {},
448 //传递参数\
449 rules: {},
450 // 权属状态
451 qsztlist: [
452 {
453 dcode: "1",
454 dname: "现势",
455 },
456 {
457 dcode: "2",
458 dname: "历史",
459 },
460 ],
461 // 登记类型
462 djlxlist: [
463 {
464 dcode: "100",
465 dname: "首次登记",
466 },
467 {
468 dcode: "200",
469 dname: "转移登记",
470 },
471 {
472 dcode: "300",
473 dname: "变更登记",
474 },
475 {
476 dcode: "500",
477 dname: "更正登记",
478 }, 443 },
444 //表单是否可操作
445 propsParam: this.$attrs,
446 key: 0,
447 isShow: false,
448 disabled: true,
449 czrOptions: [],
450 ruleForm: {},
451 //传递参数
452 rules: {},
453 // 权属状态
454 qsztlist: [
455 {
456 dcode: "1",
457 dname: "现势",
458 },
459 {
460 dcode: "2",
461 dname: "历史",
462 },
463 ],
464 // 登记类型
465 djlxlist: [
466 {
467 dcode: "100",
468 dname: "首次登记",
469 },
470 {
471 dcode: "200",
472 dname: "转移登记",
473 },
474 {
475 dcode: "300",
476 dname: "变更登记",
477 },
478 {
479 dcode: "500",
480 dname: "更正登记",
481 },
479 482
480 { 483 {
481 dcode: "901", 484 dcode: "901",
482 dname: "补证", 485 dname: "补证",
483 }, 486 },
484 { 487 {
485 dcode: "902", 488 dcode: "902",
486 dname: "换证", 489 dname: "换证",
487 }, 490 },
488 ], 491 ],
489 ssQlxxList: [], 492 ssQlxxList: [],
490 ztQlxxList: [], 493 ztQlxxList: [],
491 }; 494 };
492 },
493 created() {
494 this.loadData();
495 },
496 mounted() {},
497 methods: {
498 loadData() {
499 this.propsParam.isEdit = this.$parent.isEdit;
500 init(this.propsParam).then((res) => {
501 if (res.code == 200) {
502 this.ruleForm = res.result;
503 this.isShow = true;
504 }
505 });
506 //获取主体信息
507 getSsQlxx({ bdcdyid: this.propsParam.bdcdyid, qllx: this.propsParam.qllx}).then((res) => {
508 if (res.code == 200) {
509 this.ssQlxxList = res.result;
510 }
511 });
512 //获取上手信息
513 getZtQlxx({bdcdyid: this.propsParam.bdcdyid}).then((res) => {
514 if (res.code == 200) {
515 this.ztQlxxList = res.result;
516 }
517 });
518 },
519 // 更新土地用途信息
520 upDateTdytxxList(val) {
521 console.log("VAL", val);
522 this.ruleForm.tdytqxList && (this.ruleForm.tdytqxList = _.cloneDeep(val));
523 this.key++;
524 }, 495 },
525 // 更新权利人信息 496 created () {
526 upDateQlrxxList(val) { 497 this.loadData();
527 console.log("val", val);
528 this.ruleForm.qlrData && (this.ruleForm.qlrData = _.cloneDeep(val));
529 console.log("this.ruleForm.qlrData", this.ruleForm.qlrData);
530 this.czrOptions = this.ruleForm.qlrData;
531 this.key++;
532 }, 498 },
533 // 更新义务人信息 499 methods: {
534 upDateYwrxxList(val) { 500 ztQlxxchange (val) {
535 this.ruleForm.ywrData && (this.ruleForm.ywrData = _.cloneDeep(val)); 501 this.ruleForm.ztQlxx = val
536 this.key++; 502 },
537 }, 503 ssQlxxchange (val) {
538 onSubmit() { 504 this.ruleForm.ssQlxx = val
539 console.log("this.ruleForm大信息", this.ruleForm); 505 },
540 if (this.ruleForm.qlrData.length == 0) { 506 loadData () {
541 this.$message({ 507 this.propsParam.isEdit = this.$parent.isEdit;
542 showClose: true, 508 init(this.propsParam).then((res) => {
543 message: "请确认权利人信息", 509 if (res.code == 200) {
544 type: "error", 510 this.ruleForm = res.result;
511 this.isShow = true;
512 }
545 }); 513 });
546 return false; 514 //获取主体信息
547 } 515 getSsQlxx({ bdcdyid: this.propsParam.bdcdyid, qllx: this.propsParam.qllx }).then((res) => {
548 516 if (res.code == 200) {
549 if (this.ruleForm.qlxx.gyfs == "0") { 517 this.ssQlxxList = res.result;
550 if (this.ruleForm.qlrData.length > 1) { 518 }
519 });
520 //获取上手信息
521 getZtQlxx({ bdcdyid: this.propsParam.bdcdyid }).then((res) => {
522 if (res.code == 200) {
523 this.ztQlxxList = res.result;
524 }
525 });
526 },
527 // 更新土地用途信息
528 upDateTdytxxList (val) {
529 this.ruleForm.tdytqxList && (this.ruleForm.tdytqxList = _.cloneDeep(val));
530 this.key++;
531 },
532 // 更新权利人信息
533 upDateQlrxxList (val) {
534 this.ruleForm.qlrData && (this.ruleForm.qlrData = _.cloneDeep(val));
535 console.log("this.ruleForm.qlrData", this.ruleForm.qlrData);
536 this.czrOptions = this.ruleForm.qlrData;
537 this.key++;
538 },
539 // 更新义务人信息
540 upDateYwrxxList (val) {
541 this.ruleForm.ywrData && (this.ruleForm.ywrData = _.cloneDeep(val));
542 this.key++;
543 },
544 onSubmit () {
545 if (this.ruleForm.qlrData.length == 0) {
551 this.$message({ 546 this.$message({
552 showClose: true, 547 showClose: true,
553 message: "共有方式:单独所有,权利人只能是一个人", 548 message: "请确认权利人信息",
554 type: "error", 549 type: "error",
555 }); 550 });
556 return false; 551 return false;
557 } 552 }
558 this.ruleForm.qlrData[0].sfczr = "1"; 553
559 } 554 if (this.ruleForm.qlxx.gyfs == "0") {
560 if (this.ruleForm.qlxx.gyfs == "1") { 555 if (this.ruleForm.qlrData.length > 1) {
561 //是否分别持证 556 this.$message({
562 if (this.ruleForm.qlxx.sqfbcz == "1") { 557 showClose: true,
563 //是 558 message: "共有方式:单独所有,权利人只能是一个人",
564 this.ruleForm.qlrData.forEach((item, index) => { 559 type: "error",
565 item.sfczr = "1"; 560 });
566 }); 561 return false;
567 } else { 562 }
568 this.ruleForm.qlrData.forEach((item, index) => { 563 this.ruleForm.qlrData[0].sfczr = "1";
569 if (item.zjh == this.ruleForm.czr) { 564 }
565 if (this.ruleForm.qlxx.gyfs == "1") {
566 //是否分别持证
567 if (this.ruleForm.qlxx.sqfbcz == "1") {
568 //是
569 this.ruleForm.qlrData.forEach((item, index) => {
570 item.sfczr = "1"; 570 item.sfczr = "1";
571 } else { 571 });
572 item.sfczr = "0"; 572 } else {
573 } 573 this.ruleForm.qlrData.forEach((item, index) => {
574 }); 574 if (item.zjh == this.ruleForm.czr) {
575 item.sfczr = "1";
576 } else {
577 item.sfczr = "0";
578 }
579 })
580 }
575 } 581 }
582 save(this.ruleForm).then((res) => {
583 if (res.code === 200) {
584 this.$message({
585 showClose: true,
586 message: "保存成功!",
587 type: "success",
588 });
589 this.$store.dispatch("user/refreshPage", true);
590 } else {
591 this.$message({
592 showClose: true,
593 message: res.message,
594 type: "error",
595 });
596 }
597 })
576 } 598 }
577 save(this.ruleForm).then((res) => { 599 }
578 if (res.code === 200) { 600 };
579 this.$message({
580 showClose: true,
581 message: "保存成功!",
582 type: "success",
583 });
584 this.$store.dispatch("user/refreshPage", true);
585 } else {
586 this.$message({
587 showClose: true,
588 message: res.message,
589 type: "error",
590 });
591 }
592 });
593 },
594 },
595 };
596 </script> 601 </script>
597 <style scoped lang="scss"> 602 <style scoped lang="scss">
598 @import "~@/styles/public.scss"; 603 @import "~@/styles/public.scss";
599 @import "~@/styles/slxx/slxx.scss"; 604 @import "~@/styles/slxx/slxx.scss";
600 </style> 605 </style>
......
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-07-04 16:08:03 4 * @LastEditTime: 2023-07-05 09:55:42
5 --> 5 -->
6 <template> 6 <template>
7 <div class="clxx"> 7 <div class="clxx">
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
67 ...mapGetters(["dictData"]) 67 ...mapGetters(["dictData"])
68 }, 68 },
69 created () { 69 created () {
70 this.ableOperation = this.$parent.currentSelectTab.ableOperation 70 this.ableOperation = this.$parent?.currentSelectTab?.ableOperation || false
71 this.clmlInitList(1) 71 this.clmlInitList(1)
72 }, 72 },
73 methods: { 73 methods: {
......
1 /* 1 /*
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-05-24 14:42:24 4 * @LastEditTime: 2023-07-05 09:58:31
5 */ 5 */
6 import { getForm } from "../flowform"; 6 import { getForm } from "../flowform";
7 import { getHomeNoticeList } from "@/api/home.js" 7 import { getHomeNoticeList } from "@/api/home.js"
...@@ -38,6 +38,7 @@ export default { ...@@ -38,6 +38,7 @@ export default {
38 for (let item of this.tabList) { 38 for (let item of this.tabList) {
39 if (item.value === tabname) { 39 if (item.value === tabname) {
40 this.currentSelectTab = item 40 this.currentSelectTab = item
41 console.log(item, 'item11111111111');
41 break; 42 break;
42 } 43 }
43 } 44 }
......