style:样式
Showing
2 changed files
with
39 additions
and
53 deletions
| ... | @@ -16,9 +16,10 @@ | ... | @@ -16,9 +16,10 @@ |
| 16 | <slot></slot> | 16 | <slot></slot> |
| 17 | </div> | 17 | </div> |
| 18 | <div slot="footer" class="dialog_footer" v-if="isButton"> | 18 | <div slot="footer" class="dialog_footer" v-if="isButton"> |
| 19 | <el-button @click="closeDialog" v-if="isReset">取消</el-button> | 19 | <btn nativeType="cz" @click="closeDialog" v-if="isReset">取消</btn> |
| 20 | <el-button type="primary" plain @click="submitForm" v-if="isSave" :disabled="btnDisabled" :loading="saveloding"> | 20 | <btn nativeType="cx" type="primary" plain @click="submitForm" v-if="isSave" :disabled="btnDisabled" |
| 21 | {{ saveButton }}</el-button> | 21 | :loading="saveloding"> |
| 22 | {{ saveButton }}</btn> | ||
| 22 | </div> | 23 | </div> |
| 23 | </el-dialog> | 24 | </el-dialog> |
| 24 | </template> | 25 | </template> | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <!-- 编辑 --> | 2 | <!-- 编辑 --> |
| 3 | <dialogBox | 3 | <dialogBox submitForm="submitForm" class="tableClass" @closeDialog="closeDialog" @submitForm="handleSubmit" |
| 4 | submitForm="submitForm" | 4 | width="60%" v-model="myValue" :isMain="true" :isSave="details.ISENABLE == 1" title="字典信息"> |
| 5 | class="tableClass" | ||
| 6 | @closeDialog="closeDialog" | ||
| 7 | @submitForm="handleSubmit" | ||
| 8 | width="60%" | ||
| 9 | v-model="myValue" | ||
| 10 | :isMain="true" | ||
| 11 | :isButton="false" | ||
| 12 | :isSave="details.ISENABLE == 1" | ||
| 13 | title="字典信息" | ||
| 14 | > | ||
| 15 | <div class="editDialogBox-box "> | 5 | <div class="editDialogBox-box "> |
| 16 | <el-form :model="ruleForm" ref="ruleForm" label-width="100px"> | 6 | <el-form :model="ruleForm" ref="ruleForm" label-width="100px"> |
| 17 | <el-row :gutter="20"> | 7 | <el-row :gutter="20"> |
| ... | @@ -27,17 +17,8 @@ | ... | @@ -27,17 +17,8 @@ |
| 27 | </el-col> | 17 | </el-col> |
| 28 | </el-row> | 18 | </el-row> |
| 29 | </el-form> | 19 | </el-form> |
| 30 | <lb-table | 20 | <lb-table :column="column" class="loadingtext" :heightNum="600" :key="key" :expand-row-keys="keyList" |
| 31 | :column="column" | 21 | row-key="dictid" :tree-props="{ children: 'children' }" :pagination="false" :data="tableData"> |
| 32 | class="loadingtext" | ||
| 33 | :heightNum="600" | ||
| 34 | :key="key" | ||
| 35 | :expand-row-keys="keyList" | ||
| 36 | row-key="dictid" | ||
| 37 | :tree-props="{ children: 'children' }" | ||
| 38 | :pagination="false" | ||
| 39 | :data="tableData" | ||
| 40 | > | ||
| 41 | </lb-table> | 22 | </lb-table> |
| 42 | </div> | 23 | </div> |
| 43 | </dialogBox> | 24 | </dialogBox> |
| ... | @@ -60,7 +41,7 @@ export default { | ... | @@ -60,7 +41,7 @@ export default { |
| 60 | default: {}, | 41 | default: {}, |
| 61 | }, | 42 | }, |
| 62 | }, | 43 | }, |
| 63 | data() { | 44 | data () { |
| 64 | return { | 45 | return { |
| 65 | key: 0, | 46 | key: 0, |
| 66 | myValue: this.value, | 47 | myValue: this.value, |
| ... | @@ -258,7 +239,7 @@ export default { | ... | @@ -258,7 +239,7 @@ export default { |
| 258 | }, | 239 | }, |
| 259 | }, | 240 | }, |
| 260 | { | 241 | { |
| 261 | width: "150", | 242 | width: "100", |
| 262 | label: "操作", | 243 | label: "操作", |
| 263 | render: (h, scope) => { | 244 | render: (h, scope) => { |
| 264 | return ( | 245 | return ( |
| ... | @@ -282,16 +263,16 @@ export default { | ... | @@ -282,16 +263,16 @@ export default { |
| 282 | 删除 | 263 | 删除 |
| 283 | </el-button> | 264 | </el-button> |
| 284 | </div> | 265 | </div> |
| 285 | ); | 266 | ) |
| 286 | }, | 267 | } |
| 287 | }, | 268 | } |
| 288 | ], | 269 | ], |
| 289 | tableData: [], | 270 | tableData: [] |
| 290 | }; | 271 | } |
| 291 | }, | 272 | }, |
| 292 | watch: { | 273 | watch: { |
| 293 | value(val) { | 274 | value (val) { |
| 294 | this.myValue = val; | 275 | this.myValue = val |
| 295 | }, | 276 | }, |
| 296 | "details.dictid": { | 277 | "details.dictid": { |
| 297 | handler: function (newValue) { | 278 | handler: function (newValue) { |
| ... | @@ -302,10 +283,10 @@ export default { | ... | @@ -302,10 +283,10 @@ export default { |
| 302 | this.tableData = result ? result : []; | 283 | this.tableData = result ? result : []; |
| 303 | this.tableData.forEach((item, index) => { | 284 | this.tableData.forEach((item, index) => { |
| 304 | item.index = index + 1; | 285 | item.index = index + 1; |
| 305 | }); | 286 | }) |
| 306 | }); | 287 | }) |
| 307 | }, | 288 | }, |
| 308 | immediate: true, | 289 | immediate: true |
| 309 | }, | 290 | }, |
| 310 | details: { | 291 | details: { |
| 311 | handler: function (newValue) { | 292 | handler: function (newValue) { |
| ... | @@ -323,7 +304,7 @@ export default { | ... | @@ -323,7 +304,7 @@ export default { |
| 323 | }, | 304 | }, |
| 324 | methods: { | 305 | methods: { |
| 325 | // 添加索引 | 306 | // 添加索引 |
| 326 | addIndexes(data = this.tableData, isAdd = true) { | 307 | addIndexes (data = this.tableData, isAdd = true) { |
| 327 | data.forEach((item, index) => { | 308 | data.forEach((item, index) => { |
| 328 | if (index == 0) { | 309 | if (index == 0) { |
| 329 | item.codeShow = true; | 310 | item.codeShow = true; |
| ... | @@ -344,7 +325,7 @@ export default { | ... | @@ -344,7 +325,7 @@ export default { |
| 344 | } | 325 | } |
| 345 | }); | 326 | }); |
| 346 | }, | 327 | }, |
| 347 | itemShowFalse() { | 328 | itemShowFalse () { |
| 348 | this.tableData.forEach((item, index) => { | 329 | this.tableData.forEach((item, index) => { |
| 349 | item.codeShow = false; | 330 | item.codeShow = false; |
| 350 | item.nameShow = false; | 331 | item.nameShow = false; |
| ... | @@ -352,7 +333,7 @@ export default { | ... | @@ -352,7 +333,7 @@ export default { |
| 352 | item.normnameShow = false; | 333 | item.normnameShow = false; |
| 353 | }); | 334 | }); |
| 354 | }, | 335 | }, |
| 355 | handleMinus(index, row) { | 336 | handleMinus (index, row) { |
| 356 | this.$confirm("此操作将永久删除, 是否继续?", "提示", { | 337 | this.$confirm("此操作将永久删除, 是否继续?", "提示", { |
| 357 | confirmButtonText: "确定", | 338 | confirmButtonText: "确定", |
| 358 | cancelButtonText: "取消", | 339 | cancelButtonText: "取消", |
| ... | @@ -372,7 +353,7 @@ export default { | ... | @@ -372,7 +353,7 @@ export default { |
| 372 | }); | 353 | }); |
| 373 | }); | 354 | }); |
| 374 | }, | 355 | }, |
| 375 | handleSubmit() { | 356 | handleSubmit () { |
| 376 | editDictNode({ | 357 | editDictNode({ |
| 377 | dictid: this.details.rowData.dictid, | 358 | dictid: this.details.rowData.dictid, |
| 378 | typeid: this.details.rowData.typeid, | 359 | typeid: this.details.rowData.typeid, |
| ... | @@ -387,11 +368,11 @@ export default { | ... | @@ -387,11 +368,11 @@ export default { |
| 387 | } | 368 | } |
| 388 | }); | 369 | }); |
| 389 | }, | 370 | }, |
| 390 | closeDialog() { | 371 | closeDialog () { |
| 391 | this.$emit("input", false); | 372 | this.$emit("input", false); |
| 392 | }, | 373 | }, |
| 393 | // 增加下级 | 374 | // 增加下级 |
| 394 | handleAddSubordinate(row) { | 375 | handleAddSubordinate (row) { |
| 395 | if (!row.children) { | 376 | if (!row.children) { |
| 396 | row.children = []; | 377 | row.children = []; |
| 397 | } | 378 | } |
| ... | @@ -408,7 +389,7 @@ export default { | ... | @@ -408,7 +389,7 @@ export default { |
| 408 | this.keyList.push(row.dictid); | 389 | this.keyList.push(row.dictid); |
| 409 | }, | 390 | }, |
| 410 | // 增加 | 391 | // 增加 |
| 411 | handleAdd() { | 392 | handleAdd () { |
| 412 | this.$nextTick(() => { | 393 | this.$nextTick(() => { |
| 413 | let container = this.$el.querySelector(".el-table__body-wrapper"); | 394 | let container = this.$el.querySelector(".el-table__body-wrapper"); |
| 414 | container.scrollTop = container.scrollHeight; | 395 | container.scrollTop = container.scrollHeight; |
| ... | @@ -426,13 +407,13 @@ export default { | ... | @@ -426,13 +407,13 @@ export default { |
| 426 | this.key++; | 407 | this.key++; |
| 427 | }, | 408 | }, |
| 428 | // 上移下移 | 409 | // 上移下移 |
| 429 | moveUpward(index, row) { | 410 | moveUpward (index, row) { |
| 430 | realMove(row.dictid, "UP", this.tableData); | 411 | realMove(row.dictid, "UP", this.tableData); |
| 431 | this.key++; | 412 | this.key++; |
| 432 | let id = findParents(this.tableData, row.dictid); | 413 | let id = findParents(this.tableData, row.dictid); |
| 433 | this.keyList = id; | 414 | this.keyList = id; |
| 434 | }, | 415 | }, |
| 435 | moveDown(index, row) { | 416 | moveDown (index, row) { |
| 436 | realMove(row.dictid, "DOWN", this.tableData); | 417 | realMove(row.dictid, "DOWN", this.tableData); |
| 437 | this.key++; | 418 | this.key++; |
| 438 | let id = findParents(this.tableData, row.dictid); | 419 | let id = findParents(this.tableData, row.dictid); |
| ... | @@ -452,19 +433,23 @@ export default { | ... | @@ -452,19 +433,23 @@ export default { |
| 452 | /deep/.el-radio__label { | 433 | /deep/.el-radio__label { |
| 453 | display: block; | 434 | display: block; |
| 454 | } | 435 | } |
| 455 | /deep/.el-form-item__label{ | 436 | |
| 456 | color:#fff; | 437 | /deep/.el-form-item__label { |
| 438 | color: #fff; | ||
| 457 | } | 439 | } |
| 458 | /deep/.el-form-item{ | 440 | |
| 459 | color:#fff; | 441 | /deep/.el-form-item { |
| 442 | color: #fff; | ||
| 460 | margin-bottom: 10px; | 443 | margin-bottom: 10px; |
| 461 | } | 444 | } |
| 445 | |||
| 462 | /deep/.el-radio-group { | 446 | /deep/.el-radio-group { |
| 463 | display: flex; | 447 | display: flex; |
| 464 | align-items: center; | 448 | align-items: center; |
| 465 | justify-content: center; | 449 | justify-content: center; |
| 466 | } | 450 | } |
| 467 | .editDialogBox-box{ | 451 | |
| 468 | margin:14px 18px 30px 18px !important | 452 | .editDialogBox-box { |
| 453 | margin: 14px 18px 30px 18px !important | ||
| 469 | } | 454 | } |
| 470 | </style> | 455 | </style> | ... | ... |
-
Please register or sign in to post a comment