cf9a1215 by renchao@pashanhoo.com

style:权利人信息

1 parent aa126082
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
25 "nprogress": "0.2.0", 25 "nprogress": "0.2.0",
26 "print-js": "^1.6.0", 26 "print-js": "^1.6.0",
27 "qrcode": "^1.5.3", 27 "qrcode": "^1.5.3",
28 "sortablejs": "^1.15.0",
28 "vue": "2.6.10", 29 "vue": "2.6.10",
29 "vue-json-editor": "^1.4.3", 30 "vue-json-editor": "^1.4.3",
30 "vue-print-nb": "^1.7.5", 31 "vue-print-nb": "^1.7.5",
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
16 16
17 <el-tabs v-model="activeName" @tab-click="handleClick" class="from-clues-header"> 17 <el-tabs v-model="activeName" @tab-click="handleClick" class="from-clues-header">
18 <el-tab-pane label="基本信息" name="1"></el-tab-pane> 18 <el-tab-pane label="基本信息" name="1"></el-tab-pane>
19 <el-tab-pane label="企业信息" name="2"></el-tab-pane> 19 <el-tab-pane label="企业信息" v-if="showButton" name="2"></el-tab-pane>
20 <el-tab-pane label="银行机构" name="3"></el-tab-pane> 20 <el-tab-pane label="银行机构" v-if="showButton" name="3"></el-tab-pane>
21 </el-tabs> 21 </el-tabs>
22 22
23 <el-form 23 <el-form
......
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-09-12 14:48:12 4 * @LastEditTime: 2023-09-13 10:18:32
5 --> 5 -->
6 <template> 6 <template>
7 <div class="clmlmx-box"> 7 <div class="clmlmx-box">
8 <lb-table :column="column" :key="key" :heightNumSetting="true" :calcHeight="600" :pagination="false" :data="tableData"> 8 <div style="text-align:right">
9 <el-button type="primary" icon="el-icon-top">上移</el-button>
10 <el-button type="primary" icon="el-icon-bottom">下移</el-button>
11 </div>
12 <lb-table :column="column" :key="key" :heightNumSetting="true" :calcHeight="600"
13 :pagination="false" :data="tableData">
9 </lb-table> 14 </lb-table>
10 <div class="text-center"> 15 <div class="text-center">
11 <el-button @click="$popupCacel">取消</el-button> 16 <el-button @click="$popupCacel">取消</el-button>
...@@ -15,8 +20,9 @@ ...@@ -15,8 +20,9 @@
15 </template> 20 </template>
16 <script> 21 <script>
17 import Vue from 'vue' 22 import Vue from 'vue'
23 import Sortable from 'sortablejs'
18 import store from '@/store/index.js' 24 import store from '@/store/index.js'
19 import { InitClml, updateClml, deleteSjClml, moveClml } from "@/api/clxx.js"; 25 import { InitClml, updateClml } from "@/api/clxx.js";
20 export default { 26 export default {
21 props: { 27 props: {
22 formData: { 28 formData: {
...@@ -31,23 +37,8 @@ ...@@ -31,23 +37,8 @@
31 loading: false, 37 loading: false,
32 column: [ 38 column: [
33 { 39 {
34 width: '50', 40 label: "选择",
35 renderHeader: (h, scope) => { 41 type: 'selection'
36 return <div> {
37 !this.formData.ableOperation ? '序号' : <i class="el-icon-plus pointer" onClick={() => { this.addClick() }}></i>
38 }
39 </div>
40 },
41 render: (h, scope) => {
42 return (
43 <div>
44 {
45 !this.formData.ableOperation ? <span>{scope.$index + 1}</span> :
46 <i class="el-icon-minus pointer" onClick={() => { this.handleDelete(scope.$index, scope.row) }}></i>
47 }
48 </div>
49 )
50 }
51 }, 42 },
52 { 43 {
53 prop: "isrequired", 44 prop: "isrequired",
...@@ -104,7 +95,7 @@ ...@@ -104,7 +95,7 @@
104 width: "80", 95 width: "80",
105 render: (h, scope) => { 96 render: (h, scope) => {
106 return ( 97 return (
107 (this.formData.ableOperation && scope.row.isrequired != '1') ? 98 (this.formData.ableOperation) ?
108 <el-input value={scope.row.sjsl} onInput={(val) => { scope.row.sjsl = val }}></el-input> : <span>{ 99 <el-input value={scope.row.sjsl} onInput={(val) => { scope.row.sjsl = val }}></el-input> : <span>{
109 scope.row.sjsl 100 scope.row.sjsl
110 }</span> 101 }</span>
...@@ -112,26 +103,22 @@ ...@@ -112,26 +103,22 @@
112 } 103 }
113 }, 104 },
114 { 105 {
115 prop: "smzt",
116 label: "扫描时间", 106 label: "扫描时间",
117 width: "80", 107 width: "140",
118 render: (h, scope) => { 108 render: (h, scope) => {
119 return ( 109 return (
120 (this.formData.ableOperation && scope.row.isrequired != '1') ? 110 <span>{scope.row.sjsj}</span>
121 <el-input value={scope.row.sjsl} onInput={(val) => { scope.row.sjsl = val }}></el-input> : <span>{
122 scope.row.sjsj
123 }</span>
124 ) 111 )
125 } 112 }
126 }, 113 },
127 { 114 {
128 label: "扫描页数", 115 label: "页数",
129 width: "80", 116 width: "60",
130 render: (h, scope) => { 117 render: (h, scope) => {
131 if (scope.row.children && scope.row.children.length > 0) { 118 if (scope.row.ys && scope.row.ys > 0) {
132 return ( 119 return (
133 <div> 120 <div>
134 <span>{scope.row.children.length}</span> 121 <span>{scope.row.ys}</span>
135 </div> 122 </div>
136 ); 123 );
137 } else { 124 } else {
...@@ -151,21 +138,13 @@ ...@@ -151,21 +138,13 @@
151 <div> 138 <div>
152 <el-button 139 <el-button
153 type="text" 140 type="text"
154 disabled={scope.$index == 0 || !this.formData.ableOperation} 141 icon="el-icon-delete"
155 onClick={() => { 142 disabled={scope.row.ys == 0 || !this.formData.ableOperation}
156 this.moveUpward(scope.$index, scope.row);
157 }}
158 >
159 上移
160 </el-button>
161 <el-button
162 type="text"
163 disabled={scope.$index + 1 == this.tableData.length || !this.formData.ableOperation}
164 onClick={() => { 143 onClick={() => {
165 this.moveDown(scope.$index, scope.row); 144 this.handleDelete(scope.$index, scope.row);
166 }} 145 }}
167 > 146 >
168 下移 147 删除
169 </el-button> 148 </el-button>
170 149
171 </div > 150 </div >
...@@ -186,11 +165,10 @@ ...@@ -186,11 +165,10 @@
186 deep: true 165 deep: true
187 } 166 }
188 }, 167 },
168 mounted () {
169 this.initSort()
170 },
189 methods: { 171 methods: {
190 /**
191 * @description: handleSubmit
192 * @author: renchao
193 */
194 handleSubmit () { 172 handleSubmit () {
195 this.loading = true 173 this.loading = true
196 updateClml(this.tableData).then(res => { 174 updateClml(this.tableData).then(res => {
...@@ -238,60 +216,6 @@ ...@@ -238,60 +216,6 @@
238 }) 216 })
239 }, 217 },
240 /** 218 /**
241 * @description: 上移
242 * @param {*} index
243 * @param {*} row
244 * @author: renchao
245 */
246 moveUpward (index, row) {
247 let obj = {
248 xh: row.xh,
249 bsmSlsq: row.bsmSlsq,
250 moveDirection: "UP",
251 };
252 // 接口待调
253 moveClml(obj).then(async (res) => {
254 if (res.code == 200) {
255 let res = await this.clmlInitList()
256 if (res == 200) {
257 this.$message({
258 message: '上移成功',
259 type: 'success'
260 })
261 }
262 } else {
263 this.$message.error(res.message);
264 }
265 })
266 },
267 /**
268 * @description: 下移
269 * @param {*} index
270 * @param {*} row
271 * @author: renchao
272 */
273 moveDown (index, row) {
274 let obj = {
275 xh: row.xh,
276 bsmSlsq: row.bsmSlsq,
277 moveDirection: "DOWN",
278 }
279 // 接口待调
280 moveClml(obj).then(async (res) => {
281 if (res.code == 200) {
282 let res = await this.clmlInitList()
283 if (res == 200) {
284 this.$message({
285 message: '下移成功',
286 type: 'success'
287 })
288 }
289 } else {
290 this.$message.error(res.message);
291 }
292 })
293 },
294 /**
295 * @description: 材料目录删除 219 * @description: 材料目录删除
296 * @param {*} index 220 * @param {*} index
297 * @param {*} row 221 * @param {*} row
...@@ -308,17 +232,6 @@ ...@@ -308,17 +232,6 @@
308 cancelButtonText: '取消', 232 cancelButtonText: '取消',
309 type: 'warning' 233 type: 'warning'
310 }).then(() => { 234 }).then(() => {
311 deleteSjClml({ sjBsm: row.bsmSj }).then(async (res) => {
312 if (res.code == 200) {
313 let res = await that.clmlInitList()
314 if (res == 200) {
315 that.$message({
316 message: "删除成功",
317 type: "success"
318 })
319 }
320 }
321 })
322 }).catch(() => { 235 }).catch(() => {
323 this.$message({ 236 this.$message({
324 type: 'info', 237 type: 'info',
...@@ -326,23 +239,50 @@ ...@@ -326,23 +239,50 @@
326 }) 239 })
327 }) 240 })
328 }, 241 },
329 /** 242 initSort () {
330 * @description: 字典 243 const el = document.querySelectorAll('.el-table__body-wrapper > table > tbody')[0]
331 * @param {*} val 244 // const sortable = new Sortable(el, options);
332 * @param {*} code 245 // 根据具体需求配置options配置项
333 * @author: renchao 246 const sortable = new Sortable(el, {
334 */ 247 onEnd: (evt) => { // 监听拖动结束事件
335 dicStatus (val, code) { 248 console.log(this) // this是当前vue上下文
336 let data = store.getters.dictData[code], 249 console.log(evt.oldIndex) // 当前行的被拖拽前的顺序
337 name = "暂无"; 250 console.log(evt.newIndex) // 当前行的被拖拽后的顺序
338 if (data) { 251 // 这里就可以写我们需要传给后台的逻辑代码
339 data.map((item) => { 252 // 我们有了 evt.oldIndex 和 evt.newIndex 这两个参数做索引,我们可以根据绑定在表格上面的 data 这个 Array 找到两个相应的记录。就可以针对数据进行操作啦。
340 if (item.dcode == val) { 253 // 下面将拖拽后的顺序进行修改
341 name = item.dname; 254 const currRow = this.tableData.splice(evt.oldIndex, 1)[0]
255 this.tableData.splice(evt.newIndex, 0, currRow)
256 const newData = []
257 this.tableData.forEach((item, index) => {
258 newData[index] = {
259 id: item.id,
260 rank: index + 1
261 }
262 })
263 // 下面是将排序结果更新到数据库中,根据自己项目的逻辑进行实现即可。
264 const data = {
265 id: this.$route.params.id,
266 datas: {
267 streams: newData
268 }
342 } 269 }
343 }); 270 this.$store
344 return name; 271 .dispatch('user/setMultiSort', data)
345 } 272 .then((res) => {
273 if (res.code === 200) {
274 this.$message.success('排序修改成功')
275 // 修改成功后重新获取列表数据更新
276 this.getMultiLiveList()
277 } else {
278 this.$message.error('排序修改失败')
279 }
280 })
281 .catch((e) => {
282 console.log(e)
283 })
284 }
285 })
346 } 286 }
347 } 287 }
348 } 288 }
......