From 097dc89285c543f5239bd6de564924b80e6d394b Mon Sep 17 00:00:00 2001 From: jiangyy Date: Tue, 27 Jul 2021 17:02:03 +0800 Subject: [PATCH] footbar --- epmet-oper-web/src/assets/img/footbar_bc1.png | Bin 0 -> 4064 bytes .../src/js/columns/productConfig/footBar.js | 27 +- .../src/views/components/CTable.vue | 6 + .../src/views/components/CTableNoPage.vue | 86 ++++-- .../productConfig/footbar/FootbarEdit.vue | 80 +++++- .../productConfig/footbar/FootbarList.vue | 163 +++++++++--- .../productConfig/footbar/FootbarMode.vue | 245 ++++++++++++++++++ 7 files changed, 526 insertions(+), 81 deletions(-) create mode 100644 epmet-oper-web/src/assets/img/footbar_bc1.png create mode 100644 epmet-oper-web/src/views/modules/productConfig/footbar/FootbarMode.vue diff --git a/epmet-oper-web/src/assets/img/footbar_bc1.png b/epmet-oper-web/src/assets/img/footbar_bc1.png new file mode 100644 index 0000000000000000000000000000000000000000..4275634da09c9d64365fbdf0082c6738a3557c9d GIT binary patch literal 4064 zcmd5<`9G9vA0A6F6vke*8cT6x$)3G4VJ0SFgdCBOY?T~K)+k$ttdUT%4~?u@GD3A| zkbRkH7&4aZjBPCM-SK&S&gcCL-s^|&bA7Mty1&o!+|NBfOtdN5@HpE^HV6cA9BG6w zgFu*|fM>BXfr{>|9s(BzZ!^P-khh(}GY|;lb5moBOF-QJFYtIgfk5c*?)-K17OZ! z23Q~iED!*b!5lCF;2?A8g3Q?1*kKF=z*ta00E_}U2!Mw_AYcxd2J#0l0%n2?7zh9| zz&fZP04z|!C}4rz16w!s4<;uk!3Kf~07QV9nHk`KI{PpD{P}ZkZf<^lesOVe;lBWU zd3kwtbrn>AwSTa(vI4H49*_f(Mx$-~g9CEd9*A38TL)zGAAt6d01iN>(?Q+d-Uj3l zySuvw9FPP4KLoUUdwU1<-vpc~(Ehs~w1>(eIn;r22%HuE8917x2WDt<2m>P%^O2)0 ztWY*KcJ^b(IXJnvU@&eTUOs+)0Rch56DNg)MMOkJ#l%jXhKq|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*O bpTs^3YUYTZba3(8Up?{?8u9j`{iFW?e^!KY literal 0 HcmV?d00001 diff --git a/epmet-oper-web/src/js/columns/productConfig/footBar.js b/epmet-oper-web/src/js/columns/productConfig/footBar.js index feacc05..7706114 100644 --- a/epmet-oper-web/src/js/columns/productConfig/footBar.js +++ b/epmet-oper-web/src/js/columns/productConfig/footBar.js @@ -32,8 +32,8 @@ export default { block: 100, width: 120, tableType: 'image', - imgWidth: '50px', - imgHeight: '50px' + imgWidth: '40px', + imgHeight: '40px' }, { key: 'selectedIconPath', @@ -43,8 +43,19 @@ export default { block: true, width: 100, tableType: 'image', - imgWidth: '50px', - imgHeight: '50px' + imgWidth: '40px', + imgHeight: '40px' + }, + { + key: 'floatIconPath', + title: '浮起图标', + display: ['formA', 'formU', 'table', 'model'], + fixed: false, + block: true, + width: 100, + tableType: 'image', + imgWidth: '40px', + imgHeight: '40px' }, { key: 'display', @@ -97,8 +108,8 @@ export default { block: 100, width: 120, tableType: 'image', - imgWidth: '50px', - imgHeight: '50px' + imgWidth: '40px', + imgHeight: '40px' }, { key: 'selectedIconPath', @@ -108,8 +119,8 @@ export default { block: true, width: 100, tableType: 'image', - imgWidth: '50px', - imgHeight: '50px' + imgWidth: '40px', + imgHeight: '40px' }, { key: 'display', diff --git a/epmet-oper-web/src/views/components/CTable.vue b/epmet-oper-web/src/views/components/CTable.vue index fb62aad..2de9e79 100644 --- a/epmet-oper-web/src/views/components/CTable.vue +++ b/epmet-oper-web/src/views/components/CTable.vue @@ -270,6 +270,7 @@ export default { this.url, this.table.params, (data, rspMsg) => { + if (data) { this.total = data.total this.tableData = data.list @@ -287,7 +288,9 @@ export default { } } + this.loading = false + }, (rspMsg, data) => { this.$message.error(rspMsg) @@ -387,6 +390,9 @@ export default { // 解决表格错位 doLayout () { this.$refs['table'].doLayout() + }, + getTableData () { + return this.tableData } } } diff --git a/epmet-oper-web/src/views/components/CTableNoPage.vue b/epmet-oper-web/src/views/components/CTableNoPage.vue index 425327e..86720f1 100644 --- a/epmet-oper-web/src/views/components/CTableNoPage.vue +++ b/epmet-oper-web/src/views/components/CTableNoPage.vue @@ -127,6 +127,7 @@ import CDialog from './CDialog' import { mapGetters } from 'vuex' +import { requestPost } from "@/js/dai/request"; export default { components: { CDialog }, data () { @@ -234,7 +235,7 @@ export default { render () { this.loadData() }, - loadData () { + async loadData () { this.$refs.table.doLayout() // 解决表格错位 this.templateRadio = '' this.loading = true @@ -245,37 +246,66 @@ export default { }) Object.assign(this.table.params, this.params) // 获取数据 - window.app.ajax.post( - this.url, - this.table.params, - (data, rspMsg) => { - if (data) { - this.tableData = data - console.log(this.filterParams) - if (this.filterParams.length > 0) { - - this.filterParams.forEach(paramItem => { - const key = this.filterParams[0].key - const value = this.filterParams[0].value - - this.tableData = this.tableData.filter(item => { - // console.log(item[key]) - // console.log(item[key].indexOf(value)) - return item[key].indexOf(value) != -1 - - }) + + const { data, code, rspMsg } = await requestPost(this.url, this.table.params) + if (code === 0) { + if (data) { + this.tableData = data + // console.log("this.filterParams", this.filterParams) + if (this.filterParams.length > 0) { + + this.filterParams.forEach(paramItem => { + const key = this.filterParams[0].key + const value = this.filterParams[0].value + + this.tableData = this.tableData.filter(item => { + // console.log(item[key]) + // console.log(item[key].indexOf(value)) + return item[key].indexOf(value) != -1 + }) + }) - } } - this.loading = false - }, - (rspMsg, data) => { - this.$message.error(rspMsg) - - this.loading = false } - ) + this.loading = false + } else { + this.$message.error(rspMsg) + + this.loading = false + } + + // await window.app.ajax.post( + // this.url, + // this.table.params, + // (data, rspMsg) => { + // if (data) { + // this.tableData = data + // console.log("this.filterParams", this.filterParams) + // if (this.filterParams.length > 0) { + + // this.filterParams.forEach(paramItem => { + // const key = this.filterParams[0].key + // const value = this.filterParams[0].value + + // this.tableData = this.tableData.filter(item => { + // // console.log(item[key]) + // // console.log(item[key].indexOf(value)) + // return item[key].indexOf(value) != -1 + + // }) + // }) + + // } + // } + // // console.log(this.tableData) + // this.loading = false + + // }, + // (rspMsg, data) => { + + // } + // ) }, handleClearSelection () { // 清空选择 diff --git a/epmet-oper-web/src/views/modules/productConfig/footbar/FootbarEdit.vue b/epmet-oper-web/src/views/modules/productConfig/footbar/FootbarEdit.vue index e0aa095..a75e1af 100644 --- a/epmet-oper-web/src/views/modules/productConfig/footbar/FootbarEdit.vue +++ b/epmet-oper-web/src/views/modules/productConfig/footbar/FootbarEdit.vue @@ -80,7 +80,7 @@ label="默认图标">
@@ -93,7 +93,7 @@ :before-upload="beforeImgUpload"> @@ -108,7 +108,7 @@ label="默认选中图标">
@@ -120,12 +120,14 @@ :show-file-list="false" :on-success="function (res, file) { return handleImgSuccess(res, file, 'sel')}" :before-upload="beforeImgUpload"> + + style="width:50px;height:50px"> + + 恢复默认 + + +
+ +
+ + +
+ 恢复默认 +
+