Merge branch 'dev' of http://yun.pashanhoo.com:9090/bdc/bdcdj-web into dev
Showing
3 changed files
with
19 additions
and
21 deletions
... | @@ -231,7 +231,8 @@ export default { | ... | @@ -231,7 +231,8 @@ export default { |
231 | } | 231 | } |
232 | this.loading = true | 232 | this.loading = true |
233 | this.bsmList.forEach(item=>{ | 233 | this.bsmList.forEach(item=>{ |
234 | item['bdcdyid'] = item.dyhbsm | 234 | item['bdcdyid'] = item.dyhbsm; |
235 | item['bdcdylx'] = '7'; | ||
235 | }) | 236 | }) |
236 | startBusinessFlow({ | 237 | startBusinessFlow({ |
237 | bsmSqyw: this.sqywInfo.bsmSqyw, | 238 | bsmSqyw: this.sqywInfo.bsmSqyw, | ... | ... |
... | @@ -30,9 +30,8 @@ | ... | @@ -30,9 +30,8 @@ |
30 | class="tablelist" | 30 | class="tablelist" |
31 | :data="datalist" | 31 | :data="datalist" |
32 | ref="listTable" | 32 | ref="listTable" |
33 | |||
34 | :key="key" | 33 | :key="key" |
35 | row-key="bsmMb" | 34 | row-key="name" |
36 | :pagination="false" | 35 | :pagination="false" |
37 | :header-cell-style="{ 'text-align': 'center' }" | 36 | :header-cell-style="{ 'text-align': 'center' }" |
38 | :heightNumSetting="true" | 37 | :heightNumSetting="true" |
... | @@ -108,19 +107,19 @@ | ... | @@ -108,19 +107,19 @@ |
108 | array[index1] = array.splice(index2, 1, array[index1])[0]; | 107 | array[index1] = array.splice(index2, 1, array[index1])[0]; |
109 | }, | 108 | }, |
110 | initSort () { | 109 | initSort () { |
111 | const el = this.$refs.listTable.$el.querySelectorAll( | 110 | const el = this.$refs.listTable.$el.querySelectorAll('.el-table__body-wrapper > table > tbody')[0] |
112 | ".el-table__body-wrapper > table > tbody" | 111 | // const sortable = new Sortable(el, options); |
113 | )[0]; | 112 | // 根据具体需求配置options配置项 |
114 | 113 | const sortable = new Sortable(el, { | |
115 | this.sortable = new Sortable(el, { | 114 | onEnd: (evt) => { // 监听拖动结束事件 |
116 | ghostClass: "sortable-ghost", | 115 | console.log(this) // this是当前vue上下文 |
117 | setData: function (dataTransfer) { | 116 | console.log(evt.oldIndex) // 当前行的被拖拽前的顺序 |
118 | dataTransfer.setData("Text", ""); | 117 | console.log(evt.newIndex) // 当前行的被拖拽后的顺序 |
119 | }, | 118 | // 这里就可以写我们需要传给后台的逻辑代码 |
120 | onEnd: (evt) => { | 119 | // 我们有了 evt.oldIndex 和 evt.newIndex 这两个参数做索引,我们可以根据绑定在表格上面的 data 这个 Array 找到两个相应的记录。就可以针对数据进行操作啦。 |
121 | // 其他排序逻辑 | 120 | // 下面将拖拽后的顺序进行修改 |
122 | // const targetRow = this.datalist.splice(evt.oldIndex, 1)[0] | 121 | const currRow = this.datalist.splice(evt.oldIndex, 1)[0] |
123 | // this.datalist.splice(evt.newIndex, 0, targetRow); | 122 | this.datalist.splice(evt.newIndex, 0, currRow) |
124 | } | 123 | } |
125 | }) | 124 | }) |
126 | }, | 125 | }, |
... | @@ -178,8 +177,7 @@ | ... | @@ -178,8 +177,7 @@ |
178 | }); | 177 | }); |
179 | }); | 178 | }); |
180 | this.checkedCities = orlist | 179 | this.checkedCities = orlist |
181 | this.tablelist = lists; | 180 | this.datalist = lists; |
182 | this.datalist = this.tablelist | ||
183 | // 其他排序逻辑 | 181 | // 其他排序逻辑 |
184 | this.initSort() | 182 | this.initSort() |
185 | }, | 183 | }, |
... | @@ -198,8 +196,7 @@ | ... | @@ -198,8 +196,7 @@ |
198 | } | 196 | } |
199 | }); | 197 | }); |
200 | }); | 198 | }); |
201 | this.tablelist = lists; | 199 | this.datalist = lists; |
202 | this.datalist = this.tablelist | ||
203 | // 其他排序逻辑 | 200 | // 其他排序逻辑 |
204 | this.initSort() | 201 | this.initSort() |
205 | }, | 202 | }, | ... | ... |
... | @@ -69,7 +69,7 @@ | ... | @@ -69,7 +69,7 @@ |
69 | </el-col> | 69 | </el-col> |
70 | <el-col :span="8"> | 70 | <el-col :span="8"> |
71 | <el-form-item label="坐落:"> | 71 | <el-form-item label="坐落:"> |
72 | <el-input maxlength="100" v-model="ruleForm.sldy.zl" disabled></el-input> | 72 | <el-input maxlength="100" v-model="ruleForm.sldy.zl"></el-input> |
73 | </el-form-item> | 73 | </el-form-item> |
74 | </el-col> | 74 | </el-col> |
75 | </el-row> | 75 | </el-row> | ... | ... |
-
Please register or sign in to post a comment