|
@@ -1,34 +1,19 @@
|
|
<template>
|
|
<template>
|
|
- <zj-page-template
|
|
|
|
- ref="zjpage"
|
|
|
|
- style="width: 100%;height: 100%;"
|
|
|
|
- :get-table-data="getTableData"
|
|
|
|
- :options-evens="evens"
|
|
|
|
|
|
+ <zj-page-template ref="zjpage" style="width: 100%;height: 100%;" :get-table-data="getTableData" :options-evens="evens"
|
|
:options-evens-group="selBtn(optionsEvensGroup)"
|
|
:options-evens-group="selBtn(optionsEvensGroup)"
|
|
:table-attributes="{ ...defaultTableAttributes, ...tableAttributes }"
|
|
:table-attributes="{ ...defaultTableAttributes, ...tableAttributes }"
|
|
- :table-events="{ ...defaultTableEvents, ...tableEvents }"
|
|
|
|
- :column-parsing="columnParsing"
|
|
|
|
- :reduction="reduction"
|
|
|
|
- :plan="[...plan, ...morePlan]"
|
|
|
|
- :operation="operation"
|
|
|
|
- :operation-column-width="operationColumnWidth"
|
|
|
|
- :show-table="showTable"
|
|
|
|
- :code-gather="codeGather"
|
|
|
|
- @columnWidthChange="columnWidthChange"
|
|
|
|
- @columnListChange="columnListChange"
|
|
|
|
- >
|
|
|
|
- <sel-export-column-list
|
|
|
|
- :column-list="columnList"
|
|
|
|
- @determine="exportDetermine"
|
|
|
|
- @cancel="columnList = []"
|
|
|
|
- />
|
|
|
|
|
|
+ :table-events="{ ...defaultTableEvents, ...tableEvents }" :column-parsing="columnParsing" :reduction="reduction"
|
|
|
|
+ :plan="[...plan, ...morePlan]" :operation="operation" :operation-column-width="operationColumnWidth"
|
|
|
|
+ :show-table="showTable" :code-gather="codeGather" @columnWidthChange="columnWidthChange"
|
|
|
|
+ @columnListChange="columnListChange">
|
|
|
|
+ <sel-export-column-list :column-list="columnList" @determine="exportDetermine" @cancel="columnList = []" />
|
|
<slot />
|
|
<slot />
|
|
</zj-page-template>
|
|
</zj-page-template>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
|
-import { zfireSave, zfireDel } from "@/api/user";
|
|
|
|
|
|
+import { zfireSave, zfireDel, commonDict } from "@/api/user";
|
|
import SelExportColumnList from './sel-export-column-list'
|
|
import SelExportColumnList from './sel-export-column-list'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -122,21 +107,26 @@ export default {
|
|
]
|
|
]
|
|
]
|
|
]
|
|
}
|
|
}
|
|
- // commonDict().then(res => {
|
|
|
|
- // var codeGather = {}
|
|
|
|
- // res.data.map(item => {
|
|
|
|
- // if (!codeGather[item.dictCode]) {
|
|
|
|
- // codeGather[item.dictCode] = []
|
|
|
|
- // }
|
|
|
|
- // codeGather[item.dictCode].push({
|
|
|
|
- // label: item.dictName,
|
|
|
|
- // value: item.dictValue
|
|
|
|
- // })
|
|
|
|
- // })
|
|
|
|
- // this.codeGather = codeGather
|
|
|
|
- // })
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
|
|
+
|
|
methods: {
|
|
methods: {
|
|
|
|
+ getDictCode(params) {
|
|
|
|
+
|
|
|
|
+ commonDict(params).then(res => {
|
|
|
|
+ if (res.data.length) {
|
|
|
|
+ res.data.map(item => {
|
|
|
|
+ if (!this.codeGather[params.code]) {
|
|
|
|
+ this.$set(this.codeGather,params.code,[])
|
|
|
|
+ }
|
|
|
|
+ this.$set(this.codeGather,params.code,[...this.codeGather[params.code],{
|
|
|
|
+ label: item.dictValue,
|
|
|
|
+ value: item.dictCode
|
|
|
|
+ }])
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
selBtn(arr) {
|
|
selBtn(arr) {
|
|
for (var i = 0; i < arr.length; i++) {
|
|
for (var i = 0; i < arr.length; i++) {
|
|
if (Array.isArray(arr[i])) {
|
|
if (Array.isArray(arr[i])) {
|
|
@@ -173,6 +163,12 @@ export default {
|
|
this.showTable = true
|
|
this.showTable = true
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ res.fieldBeans.forEach(k => {
|
|
|
|
+ if (k.frontCode) {
|
|
|
|
+ this.getDictCode({ code: k.frontCode })
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
return res
|
|
return res
|
|
}
|
|
}
|
|
} catch (error) {
|
|
} catch (error) {
|
|
@@ -278,12 +274,9 @@ export default {
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
@font-face {
|
|
@font-face {
|
|
font-family: "aliyun_iconfont";
|
|
font-family: "aliyun_iconfont";
|
|
- src: url("//at.alicdn.com/t/font_2075393_0cjq4n8ykvds.woff2?t=1647587689181")
|
|
|
|
- format("woff2"),
|
|
|
|
- url("//at.alicdn.com/t/font_2075393_0cjq4n8ykvds.woff?t=1647587689181")
|
|
|
|
- format("woff"),
|
|
|
|
- url("//at.alicdn.com/t/font_2075393_0cjq4n8ykvds.ttf?t=1647587689181")
|
|
|
|
- format("truetype");
|
|
|
|
|
|
+ src: url("//at.alicdn.com/t/font_2075393_0cjq4n8ykvds.woff2?t=1647587689181") format("woff2"),
|
|
|
|
+ url("//at.alicdn.com/t/font_2075393_0cjq4n8ykvds.woff?t=1647587689181") format("woff"),
|
|
|
|
+ url("//at.alicdn.com/t/font_2075393_0cjq4n8ykvds.ttf?t=1647587689181") format("truetype");
|
|
}
|
|
}
|
|
|
|
|
|
::v-deep .el-table__cell {
|
|
::v-deep .el-table__cell {
|
|
@@ -324,7 +317,7 @@ export default {
|
|
flex-direction: row;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
align-items: center;
|
|
|
|
|
|
- & > *:not(:last-child) {
|
|
|
|
|
|
+ &>*:not(:last-child) {
|
|
margin-right: 5px;
|
|
margin-right: 5px;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -334,6 +327,7 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
::v-deep .is-disabled {
|
|
::v-deep .is-disabled {
|
|
|
|
+
|
|
.el-textarea__inner,
|
|
.el-textarea__inner,
|
|
.el-input__inner {
|
|
.el-input__inner {
|
|
background-color: #fff;
|
|
background-color: #fff;
|