style:字典
Showing
3 changed files
with
23 additions
and
52 deletions
| ... | @@ -52,7 +52,7 @@ export function realMove (bsmDict, operate, data) { | ... | @@ -52,7 +52,7 @@ export function realMove (bsmDict, operate, data) { |
| 52 | if (arr.length) { | 52 | if (arr.length) { |
| 53 | let flag = false; | 53 | let flag = false; |
| 54 | for (let i in arr) { | 54 | for (let i in arr) { |
| 55 | if (arr[i].bsmDict == bsmDict) { | 55 | if (arr[i].dictid == bsmDict) { |
| 56 | if (operate === "UP") { | 56 | if (operate === "UP") { |
| 57 | arr[i] = arr.splice(i - 1, 1, arr[i])[0]; | 57 | arr[i] = arr.splice(i - 1, 1, arr[i])[0]; |
| 58 | } else if (operate === "DOWN") { | 58 | } else if (operate === "DOWN") { |
| ... | @@ -111,8 +111,8 @@ export function down (index, data) { | ... | @@ -111,8 +111,8 @@ export function down (index, data) { |
| 111 | } | 111 | } |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | export function timeFormat(date,end) { | 114 | export function timeFormat (date, end) { |
| 115 | if (!date || typeof(date) === "string") { | 115 | if (!date || typeof (date) === "string") { |
| 116 | this.error("参数异常,请检查..."); | 116 | this.error("参数异常,请检查..."); |
| 117 | } | 117 | } |
| 118 | var y = date.getFullYear(); //年 | 118 | var y = date.getFullYear(); //年 |
| ... | @@ -120,20 +120,20 @@ export function timeFormat(date,end) { | ... | @@ -120,20 +120,20 @@ export function timeFormat(date,end) { |
| 120 | var d = date.getDate(); //日 | 120 | var d = date.getDate(); //日 |
| 121 | if (end) { | 121 | if (end) { |
| 122 | return y + "/" + m + "/" + d + ' 23:59:59'; | 122 | return y + "/" + m + "/" + d + ' 23:59:59'; |
| 123 | }else{ | 123 | } else { |
| 124 | return y + "/" + m + "/" + d + ' 00:00:00'; | 124 | return y + "/" + m + "/" + d + ' 00:00:00'; |
| 125 | } | 125 | } |
| 126 | } | 126 | } |
| 127 | export function getFirstDayOfSeason (d) { | 127 | export function getFirstDayOfSeason (d) { |
| 128 | let date = d || new Date() | 128 | let date = d || new Date() |
| 129 | var month = date.getMonth(); | 129 | var month = date.getMonth(); |
| 130 | if(month <3 ){ | 130 | if (month < 3) { |
| 131 | date.setMonth(0); | 131 | date.setMonth(0); |
| 132 | }else if(2 < month && month < 6){ | 132 | } else if (2 < month && month < 6) { |
| 133 | date.setMonth(3); | 133 | date.setMonth(3); |
| 134 | }else if(5 < month && month < 9){ | 134 | } else if (5 < month && month < 9) { |
| 135 | date.setMonth(6); | 135 | date.setMonth(6); |
| 136 | }else if(8 < month && month < 11){ | 136 | } else if (8 < month && month < 11) { |
| 137 | date.setMonth(9); | 137 | date.setMonth(9); |
| 138 | } | 138 | } |
| 139 | date.setDate(1); | 139 | date.setDate(1); | ... | ... |
| 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" title="字典信息"> |
| 5 | class="tableClass" | ||
| 6 | @closeDialog="closeDialog" | ||
| 7 | @submitForm="handleSubmit" | ||
| 8 | width="60%" | ||
| 9 | v-model="myValue" | ||
| 10 | :isMain="true" | ||
| 11 | title="字典信息" | ||
| 12 | > | ||
| 13 | <div class="editDialogBox-box "> | 5 | <div class="editDialogBox-box "> |
| 14 | <el-form :model="ruleForm" ref="ruleForm" label-width="100px"> | 6 | <el-form :model="ruleForm" ref="ruleForm" label-width="100px"> |
| 15 | <el-row :gutter="20"> | 7 | <el-row :gutter="20"> |
| ... | @@ -25,17 +17,9 @@ | ... | @@ -25,17 +17,9 @@ |
| 25 | </el-col> | 17 | </el-col> |
| 26 | </el-row> | 18 | </el-row> |
| 27 | </el-form> | 19 | </el-form> |
| 28 | <lb-table | 20 | <lb-table :column="column" class="loadingtext opacity-input" :heightNum="600" :key="key" |
| 29 | :column="column" | 21 | :expand-row-keys="keyList" row-key="dictid" :tree-props="{ children: 'children' }" :pagination="false" |
| 30 | class="loadingtext opacity-input" | 22 | :data="tableData"> |
| 31 | :heightNum="600" | ||
| 32 | :key="key" | ||
| 33 | :expand-row-keys="keyList" | ||
| 34 | row-key="dictid" | ||
| 35 | :tree-props="{ children: 'children' }" | ||
| 36 | :pagination="false" | ||
| 37 | :data="tableData" | ||
| 38 | > | ||
| 39 | </lb-table> | 23 | </lb-table> |
| 40 | </div> | 24 | </div> |
| 41 | </dialogBox> | 25 | </dialogBox> |
| ... | @@ -249,6 +233,7 @@ export default { | ... | @@ -249,6 +233,7 @@ export default { |
| 249 | this.tableData.forEach((item, index) => { | 233 | this.tableData.forEach((item, index) => { |
| 250 | item.index = index + 1; | 234 | item.index = index + 1; |
| 251 | }) | 235 | }) |
| 236 | this.tableData = judgeSort(this.tableData) | ||
| 252 | }) | 237 | }) |
| 253 | }, | 238 | }, |
| 254 | immediate: true | 239 | immediate: true |
| ... | @@ -374,15 +359,15 @@ export default { | ... | @@ -374,15 +359,15 @@ export default { |
| 374 | // 上移下移 | 359 | // 上移下移 |
| 375 | moveUpward (index, row) { | 360 | moveUpward (index, row) { |
| 376 | realMove(row.dictid, "UP", this.tableData); | 361 | realMove(row.dictid, "UP", this.tableData); |
| 377 | this.key++; | ||
| 378 | let id = findParents(this.tableData, row.dictid); | 362 | let id = findParents(this.tableData, row.dictid); |
| 379 | this.keyList = id; | 363 | this.keyList = id; |
| 364 | this.key++; | ||
| 380 | }, | 365 | }, |
| 381 | moveDown (index, row) { | 366 | moveDown (index, row) { |
| 382 | realMove(row.dictid, "DOWN", this.tableData); | 367 | realMove(row.dictid, "DOWN", this.tableData); |
| 383 | this.key++; | ||
| 384 | let id = findParents(this.tableData, row.dictid); | 368 | let id = findParents(this.tableData, row.dictid); |
| 385 | this.keyList = id; | 369 | this.keyList = id; |
| 370 | this.key++; | ||
| 386 | }, | 371 | }, |
| 387 | }, | 372 | }, |
| 388 | }; | 373 | }; |
| ... | @@ -413,11 +398,13 @@ export default { | ... | @@ -413,11 +398,13 @@ export default { |
| 413 | align-items: center; | 398 | align-items: center; |
| 414 | justify-content: center; | 399 | justify-content: center; |
| 415 | } | 400 | } |
| 416 | .editDialogBox-box{ | 401 | |
| 417 | margin:14px 18px 30px 18px !important | 402 | .editDialogBox-box { |
| 403 | margin: 14px 18px 30px 18px !important | ||
| 418 | } | 404 | } |
| 419 | .opacity-input{ | 405 | |
| 420 | /deep/ .el-input__inner{ | 406 | .opacity-input { |
| 407 | /deep/ .el-input__inner { | ||
| 421 | background-color: transparent; | 408 | background-color: transparent; |
| 422 | border: 1px solid #458ACF; | 409 | border: 1px solid #458ACF; |
| 423 | } | 410 | } | ... | ... |
| ... | @@ -29,25 +29,9 @@ class data extends filter { | ... | @@ -29,25 +29,9 @@ class data extends filter { |
| 29 | { | 29 | { |
| 30 | prop: "DNAME", | 30 | prop: "DNAME", |
| 31 | label: "字典类型名称", | 31 | label: "字典类型名称", |
| 32 | }, | 32 | } |
| 33 | // { | ||
| 34 | // label: "是否允许修改", | ||
| 35 | // width: '150', | ||
| 36 | // render: (h, scope) => { | ||
| 37 | // return ( | ||
| 38 | // <div> | ||
| 39 | // { | ||
| 40 | // scope.row.ISENABLE == '1' ? | ||
| 41 | // <div class='allow'>允许</div> : | ||
| 42 | // <div class='prohibit'>禁止</div> | ||
| 43 | // } | ||
| 44 | // </div> | ||
| 45 | // ) | ||
| 46 | // } | ||
| 47 | // } | ||
| 48 | ] | 33 | ] |
| 49 | } | 34 | } |
| 50 | |||
| 51 | } | 35 | } |
| 52 | let datas = new data() | 36 | let datas = new data() |
| 53 | export { | 37 | export { | ... | ... |
-
Please register or sign in to post a comment