Merge branch 'dev' of http://yun.pashanhoo.com:9090/bdc/bdcdj-web into dev
Showing
4 changed files
with
297 additions
and
9 deletions
1 | <!-- | ||
2 | * @Description: | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-09-14 10:53:42 | ||
5 | --> | ||
6 | <template> | ||
7 | <div> | ||
8 | <div class="fieldcheck"> | ||
9 | <div class="left"> | ||
10 | <div class="header"> | ||
11 | <el-checkbox | ||
12 | class="check" | ||
13 | :indeterminate="isIndeterminate" | ||
14 | v-model="checkAll" | ||
15 | @change="handleCheckAllChange">待选合集</el-checkbox> | ||
16 | <div class="num">/</div> | ||
17 | </div> | ||
18 | <el-checkbox-group | ||
19 | class="concent" | ||
20 | v-model="checkedCities" | ||
21 | @change="handleCheckedCitiesChange"> | ||
22 | <el-checkbox | ||
23 | v-for="city in cities" | ||
24 | :label="city.name" | ||
25 | :key="city.name">{{ city.despriction }}({{ city.name }})</el-checkbox> | ||
26 | </el-checkbox-group> | ||
27 | </div> | ||
28 | <div class="right"> | ||
29 | <el-table | ||
30 | class="tablelist" | ||
31 | :data="datalist" | ||
32 | ref="listTable" | ||
33 | |||
34 | :key="key" | ||
35 | row-key="bsmMb" | ||
36 | :pagination="false" | ||
37 | :header-cell-style="{ 'text-align': 'center' }" | ||
38 | :heightNumSetting="true" | ||
39 | :minHeight="150" | ||
40 | height="590" | ||
41 | style="width: 100%"> | ||
42 | <el-table-column label="字段" prop="name" min-width="100"> | ||
43 | </el-table-column> | ||
44 | |||
45 | <el-table-column | ||
46 | label="字段名称" | ||
47 | prop="desprictionor" | ||
48 | min-width="100"> | ||
49 | </el-table-column> | ||
50 | <el-table-column label="字段别名" min-width="100"> | ||
51 | <template slot-scope="scope"> | ||
52 | <el-input | ||
53 | v-model="scope.row.despriction" | ||
54 | placeholder="请输入内容" | ||
55 | @input="sumTime(scope.$index, scope.row.tdsyqx)"> | ||
56 | ></el-input> | ||
57 | </template> | ||
58 | </el-table-column> | ||
59 | </el-table> | ||
60 | </div> | ||
61 | </div> | ||
62 | <div class="btn"> | ||
63 | <el-button @click="$popupCacel">取消</el-button> | ||
64 | <el-button type="primary" @click="submitForm" plain>确定</el-button> | ||
65 | </div> | ||
66 | </div> | ||
67 | </template> | ||
68 | |||
69 | <script> | ||
70 | import Sortable from 'sortablejs' | ||
71 | import { getFieldList, getFieldListByQlxx, save } from "@/api/SysDjbFieldDO"; | ||
72 | export default { | ||
73 | props: { | ||
74 | formData: { | ||
75 | type: Object, | ||
76 | default: () => { }, | ||
77 | }, | ||
78 | }, | ||
79 | data () { | ||
80 | return { | ||
81 | checkAll: false, | ||
82 | sortable: null, | ||
83 | checkedCities: [], | ||
84 | cities: [], | ||
85 | datalist: [], | ||
86 | tablelist: [], | ||
87 | key: 0, | ||
88 | isIndeterminate: true, | ||
89 | }; | ||
90 | }, | ||
91 | mounted () { | ||
92 | this.generateData() | ||
93 | }, | ||
94 | beforeDestroy () { | ||
95 | if (this.sortable) { | ||
96 | this.sortable.destroy(); | ||
97 | } | ||
98 | }, | ||
99 | watch: { | ||
100 | key: { | ||
101 | handler (newName, oldName) { | ||
102 | this.initSort() | ||
103 | } | ||
104 | } | ||
105 | }, | ||
106 | methods: { | ||
107 | changeIndex (array, index1, index2) { | ||
108 | array[index1] = array.splice(index2, 1, array[index1])[0]; | ||
109 | }, | ||
110 | initSort () { | ||
111 | const el = this.$refs.listTable.$el.querySelectorAll( | ||
112 | ".el-table__body-wrapper > table > tbody" | ||
113 | )[0]; | ||
114 | |||
115 | this.sortable = new Sortable(el, { | ||
116 | ghostClass: "sortable-ghost", | ||
117 | setData: function (dataTransfer) { | ||
118 | dataTransfer.setData("Text", ""); | ||
119 | }, | ||
120 | onEnd: (evt) => { | ||
121 | // 其他排序逻辑 | ||
122 | // const targetRow = this.datalist.splice(evt.oldIndex, 1)[0] | ||
123 | // this.datalist.splice(evt.newIndex, 0, targetRow); | ||
124 | } | ||
125 | }) | ||
126 | }, | ||
127 | /** | ||
128 | * @description: 初始数据集 | ||
129 | * @author: renchao | ||
130 | */ | ||
131 | generateData () { | ||
132 | let that = this | ||
133 | getFieldList({ qllx: this.formData.qllx }).then((res) => { | ||
134 | if (res.code === 200) { | ||
135 | let listss = res.result; | ||
136 | listss.forEach((item, index) => { | ||
137 | that.cities.push({ | ||
138 | name: item.name, | ||
139 | despriction: item.despriction, | ||
140 | desprictionor: item.despriction, | ||
141 | }); | ||
142 | }); | ||
143 | |||
144 | getFieldListByQlxx({ qllx: this.formData.qllx }).then((res) => { | ||
145 | if (res.code === 200) { | ||
146 | let listss = res.result; | ||
147 | listss.forEach((item, index) => { | ||
148 | that.tablelist.push({ | ||
149 | name: item.name, | ||
150 | despriction: item.despriction, | ||
151 | desprictionor: item.despriction, | ||
152 | }); | ||
153 | that.$nextTick(() => { | ||
154 | that.datalist = this.tablelist | ||
155 | that.checkedCities.push(item.name); | ||
156 | }) | ||
157 | }) | ||
158 | that.initSort() | ||
159 | } | ||
160 | }); | ||
161 | } | ||
162 | }); | ||
163 | }, | ||
164 | handleCheckAllChange (val) { | ||
165 | let checkedlist = [] | ||
166 | let orlist = [] | ||
167 | checkedlist = val ? this.cities : []; | ||
168 | this.isIndeterminate = false; | ||
169 | console.log("this.checkedCities", this.checkedCities); | ||
170 | let lists = []; | ||
171 | this.cities.forEach((item, index) => { | ||
172 | |||
173 | checkedlist.forEach((el) => { | ||
174 | orlist.push(el.name) | ||
175 | if (item.name == el.name) { | ||
176 | lists.push(this.cities[index]); | ||
177 | } | ||
178 | }); | ||
179 | }); | ||
180 | this.checkedCities = orlist | ||
181 | this.tablelist = lists; | ||
182 | this.datalist = this.tablelist | ||
183 | // 其他排序逻辑 | ||
184 | this.initSort() | ||
185 | }, | ||
186 | handleCheckedCitiesChange (value) { | ||
187 | console.log("value", value, this.checkedCities); | ||
188 | let checkedCount = value.length; | ||
189 | this.checkAll = checkedCount === this.cities.length; | ||
190 | this.isIndeterminate = | ||
191 | checkedCount > 0 && checkedCount < this.cities.length; | ||
192 | let lists = []; | ||
193 | this.cities.forEach((item, index) => { | ||
194 | this.checkedCities.forEach((el) => { | ||
195 | if (item.name == el) { | ||
196 | console.log("1"); | ||
197 | lists.push(this.cities[index]); | ||
198 | } | ||
199 | }); | ||
200 | }); | ||
201 | this.tablelist = lists; | ||
202 | this.datalist = this.tablelist | ||
203 | // 其他排序逻辑 | ||
204 | this.initSort() | ||
205 | }, | ||
206 | submitForm () { | ||
207 | save(this.formData.bsmMb, this.datalist).then((res) => { | ||
208 | if (res.code == 200) { | ||
209 | this.$popupCacel(); | ||
210 | this.$message({ | ||
211 | message: "保存成功", | ||
212 | type: "success", | ||
213 | }); | ||
214 | } else { | ||
215 | this.$message({ | ||
216 | message: "保存失败", | ||
217 | type: "error", | ||
218 | }); | ||
219 | } | ||
220 | }); | ||
221 | }, | ||
222 | }, | ||
223 | }; | ||
224 | </script> | ||
225 | <style scoped lang="scss"> | ||
226 | @import "~@/styles/mixin.scss"; | ||
227 | @import "~@/styles/dialogBoxheader.scss"; | ||
228 | .fieldcheck { | ||
229 | width: 100%; | ||
230 | height: 650px; | ||
231 | display: flex; | ||
232 | justify-content: space-between; | ||
233 | .left, | ||
234 | .right { | ||
235 | width: 47%; | ||
236 | height: 650px; | ||
237 | border: 1px solid rgb(230, 230, 230); | ||
238 | } | ||
239 | .left { | ||
240 | .header { | ||
241 | width: 100%; | ||
242 | height: 50px; | ||
243 | line-height: 50px; | ||
244 | background-color: rgba(243, 242, 242, 0.897); | ||
245 | display: flex; | ||
246 | justify-content: space-around; | ||
247 | align-items:center .check { | ||
248 | height: 20px; | ||
249 | margin: auto; | ||
250 | } | ||
251 | .num { | ||
252 | height: 20px; | ||
253 | } | ||
254 | } | ||
255 | .concent { | ||
256 | padding: 10px; | ||
257 | width: 100%; | ||
258 | display: inline-block; | ||
259 | padding-left: 20px; | ||
260 | overflow-x: hidden; | ||
261 | height: 600px; | ||
262 | .el-checkbox { | ||
263 | width: 100%; | ||
264 | padding: 10px; | ||
265 | } | ||
266 | .el-checkbox:hover { | ||
267 | padding: 10px; | ||
268 | background-color: rgba(243, 242, 242, 0.897); | ||
269 | } | ||
270 | } | ||
271 | } | ||
272 | .right { | ||
273 | .header { | ||
274 | width: 100%; | ||
275 | height: 50px; | ||
276 | line-height: 50px; | ||
277 | background-color: rgba(243, 242, 242, 0.897); | ||
278 | } | ||
279 | .tablelist { | ||
280 | margin-top: 10px; | ||
281 | height: 680px; | ||
282 | } | ||
283 | } | ||
284 | } | ||
285 | .btn { | ||
286 | margin-top: 10px; | ||
287 | width: 100%; | ||
288 | text-align: center; | ||
289 | } | ||
290 | </style> |
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-04-11 13:53:12 | 4 | * @LastEditTime: 2023-09-14 10:51:36 |
5 | */ | 5 | */ |
6 | import filter from '@/utils/filter.js' | 6 | import filter from '@/utils/filter.js' |
7 | let vm = null | 7 | let vm = null |
... | @@ -61,11 +61,11 @@ class data extends filter { | ... | @@ -61,11 +61,11 @@ class data extends filter { |
61 | }, | 61 | }, |
62 | { | 62 | { |
63 | label: '操作', | 63 | label: '操作', |
64 | width: '160', | 64 | width: '130', |
65 | render: (h, scope) => { | 65 | render: (h, scope) => { |
66 | return ( | 66 | return ( |
67 | <div> | 67 | <div> |
68 | <el-button type="text" icon="el-icon-edit-outline" onClick={() => { vm.djbdisposition(scope.row) }}>配置</el-button> | 68 | <el-button type="text" icon="el-icon-edit-outline" onClick={() => { vm.djbdisposition(scope.row) }}>配置</el-button> |
69 | <el-button type="text" icon="el-icon-edit-outline" onClick={() => { vm.editClick(scope.row) }}>修改</el-button> | 69 | <el-button type="text" icon="el-icon-edit-outline" onClick={() => { vm.editClick(scope.row) }}>修改</el-button> |
70 | </div> | 70 | </div> |
71 | ) | 71 | ) | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-08-09 10:09:12 | 4 | * @LastEditTime: 2023-09-14 10:02:08 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div class="from-clues"> | 7 | <div class="from-clues"> |
... | @@ -89,8 +89,8 @@ | ... | @@ -89,8 +89,8 @@ |
89 | editClick (row) { | 89 | editClick (row) { |
90 | this.$popupDialog("其他及附记模板", "system/qtjfjmb/components/editDialog", row, '60%') | 90 | this.$popupDialog("其他及附记模板", "system/qtjfjmb/components/editDialog", row, '60%') |
91 | }, | 91 | }, |
92 | djbdisposition(row){ | 92 | djbdisposition (row) { |
93 | this.$popupDialog("配置登记簿打印字段", "system/qtjfjmb/components/djbdisposition", row, '60%') | 93 | this.$popupDialog("配置登记簿打印字段", "system/qtjfjmb/components/djbdispositions", row, '70%') |
94 | } | 94 | } |
95 | } | 95 | } |
96 | } | 96 | } | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-09-13 17:08:53 | 4 | * @LastEditTime: 2023-09-14 10:12:23 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div class="clmlmx-box"> | 7 | <div class="clmlmx-box"> |
... | @@ -141,7 +141,6 @@ | ... | @@ -141,7 +141,6 @@ |
141 | mounted () { | 141 | mounted () { |
142 | this.initSort() | 142 | this.initSort() |
143 | this.tableData = _.cloneDeep(this.formData.data) | 143 | this.tableData = _.cloneDeep(this.formData.data) |
144 | console.log(this.formData.bsmCompany); | ||
145 | }, | 144 | }, |
146 | beforeDestroy () { | 145 | beforeDestroy () { |
147 | if (this.sortable) { | 146 | if (this.sortable) { |
... | @@ -185,7 +184,6 @@ | ... | @@ -185,7 +184,6 @@ |
185 | * @author: renchao | 184 | * @author: renchao |
186 | */ | 185 | */ |
187 | handleDelete (index, row) { | 186 | handleDelete (index, row) { |
188 | let that = this | ||
189 | this.$confirm('此操作将永久删除该 是否继续?', '提示', { | 187 | this.$confirm('此操作将永久删除该 是否继续?', '提示', { |
190 | confirmButtonText: '确定', | 188 | confirmButtonText: '确定', |
191 | cancelButtonText: '取消', | 189 | cancelButtonText: '取消', | ... | ... |
-
Please register or sign in to post a comment