Commit cc570313 by crushh

update: dist

parent e9b8a31a
...@@ -23,7 +23,12 @@ module.exports = { ...@@ -23,7 +23,12 @@ module.exports = {
plugins: ["vue", "prettier"], plugins: ["vue", "prettier"],
// add your custom rules here // add your custom rules here
rules: { rules: {
"prettier/prettier": "error", "prettier/prettier": [
"error",
{
"endOfLine": "auto"
},
],
// allow async-await // allow async-await
"generator-star-spacing": "off", "generator-star-spacing": "off",
"no-console": process.env.NODE_ENV === "production" ? 2 : 0, "no-console": process.env.NODE_ENV === "production" ? 2 : 0,
......
...@@ -8,5 +8,6 @@ ...@@ -8,5 +8,6 @@
"bracketSpacing": true, "bracketSpacing": true,
"insertPragma": false, "insertPragma": false,
"jsxBracketSameLine": true, "jsxBracketSameLine": true,
"proseWrap": "preserve" "proseWrap": "preserve",
"endOfLine":"auto"
} }
...@@ -56,6 +56,13 @@ module.exports = { ...@@ -56,6 +56,13 @@ module.exports = {
pathRewrite: { pathRewrite: {
'^/haoban-app-daily-three-web': '' '^/haoban-app-daily-three-web': ''
} }
},
'/haoban-task-manage-web/': {
target: 'https://www.gicdev.com/haoban-task-manage-web/',
changeOrigin: true,
pathRewrite: {
'^/haoban-task-manage-web': ''
}
} }
} }
} }
...@@ -33,15 +33,15 @@ ...@@ -33,15 +33,15 @@
<el-button type="danger" @click="multDel">批量删除</el-button><el-button :loading="loadingBtn" type="primary" @click="exportExcel"><i class="iconfont icon-icon_yunxiazai p-r-6"></i>导出</el-button> <el-button type="danger" @click="multDel">批量删除</el-button><el-button :loading="loadingBtn" type="primary" @click="exportExcel"><i class="iconfont icon-icon_yunxiazai p-r-6"></i>导出</el-button>
</div> </div>
</div> </div>
<el-table class="select-table" ref="multipleTable" v-loading="loading" :data="tableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }" @selection-change="handleSelectionChange"> <el-table class="select-table" ref="multipleTable" :key="tableRefresh" v-loading="loading" :data="tableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="45"> </el-table-column> <el-table-column type="selection" width="45" :class-name="selectRadio == 1 ? 'cell-disabled' : 'font-size-zero'"> </el-table-column>
<el-table-column width="25"> <el-table-column width="25">
<template slot="header"> <template slot="header">
<el-dropdown style="line-height: 10px; padding: 0; margin-left: -15px; transform: translateY(4px); -webkit-transform: translateY(4px);" @command="handleCommand" placement="bottom-start"> <el-dropdown style="line-height: 10px; padding: 0; margin-left: -15px; transform: translateY(4px); -webkit-transform: translateY(4px);" placement="bottom-start">
<span class="el-dropdown-link"><i class="iconfont icongengduo"></i> </span> <span class="el-dropdown-link"><i class="iconfont icongengduo"></i> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="0"><span :style="{ color: selectRadio == 0 ? '#2f54eb' : '#606266' }">选择当页</span></el-dropdown-item> <el-dropdown-item> <el-checkbox v-model="selectRadio" :true-label="0" :false-label="2" @change="handleCommand">选择当页</el-checkbox></el-dropdown-item>
<el-dropdown-item command="1"><span :style="{ color: selectRadio == 1 ? '#2f54eb' : '#606266' }">选择全部</span></el-dropdown-item> <el-dropdown-item> <el-checkbox v-model="selectRadio" :true-label="1" :false-label="2" @change="handleCommand">选择全部</el-checkbox></el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</template> </template>
...@@ -117,14 +117,15 @@ export default { ...@@ -117,14 +117,15 @@ export default {
dateRange: [] dateRange: []
}, },
loading: false, loading: false,
selectRadio: 0, // 选择当页/选择全部 selectRadio: 2, // 选择当页/选择全部
tableData: [], tableData: [],
multipleSelection: [], multipleSelection: [],
// 分页参数 // 分页参数
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
total: 0, total: 0,
loadingBtn: false loadingBtn: false,
tableRefresh: false
}; };
}, },
computed: {}, computed: {},
...@@ -142,6 +143,14 @@ export default { ...@@ -142,6 +143,14 @@ export default {
*/ */
handleCommand(command) { handleCommand(command) {
this.selectRadio = command; this.selectRadio = command;
this.tableRefresh = !this.tableRefresh;
if (command == 1 || command == 0) {
this.$nextTick(() => {
this.$refs.multipleTable.toggleAllSelection();
});
} else if (command == 2) {
this.$refs.multipleTable.clearSelection();
}
}, },
/** /**
* 返回 的 brandId * 返回 的 brandId
...@@ -187,7 +196,6 @@ export default { ...@@ -187,7 +196,6 @@ export default {
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
/** /**
* 删除选的部门 * 删除选的部门
*/ */
...@@ -313,7 +321,7 @@ export default { ...@@ -313,7 +321,7 @@ export default {
const that = this; const that = this;
that.currentPage = 1; that.currentPage = 1;
that.pageSize = val; that.pageSize = val;
that.getTableList(); that.getTableList(this.selectRadio);
}, },
/** /**
...@@ -324,7 +332,7 @@ export default { ...@@ -324,7 +332,7 @@ export default {
const that = this; const that = this;
that.currentPage = val; that.currentPage = val;
// let fullPath = that.$route.fullPath; // let fullPath = that.$route.fullPath;
that.getTableList(); that.getTableList(this.selectRadio);
}, },
/** /**
...@@ -370,6 +378,13 @@ export default { ...@@ -370,6 +378,13 @@ export default {
if (resData.errorCode == 1) { if (resData.errorCode == 1) {
that.tableData = resData.result.list || []; that.tableData = resData.result.list || [];
that.total = resData.result.pageInfo.total; that.total = resData.result.pageInfo.total;
if (val == 1) {
this.$nextTick(() => {
this.$refs.multipleTable.toggleAllSelection();
});
} else {
this.selectRadio = 2;
}
return false; return false;
} }
errMsg.errorMsg(resData); errMsg.errorMsg(resData);
......
...@@ -163,7 +163,7 @@ export default { ...@@ -163,7 +163,7 @@ export default {
* 导出 * 导出
*/ */
exportExcel: _debounce(function() { exportExcel: _debounce(function() {
window.open('/haoban-manage3-web/staff-export'); window.open(`/haoban-manage3-web/staff-export?departmentId=${this.departObj.departmentId}`);
}, 300), }, 300),
/** /**
......
...@@ -11,13 +11,17 @@ ...@@ -11,13 +11,17 @@
<div class="app-detail-wrap"> <div class="app-detail-wrap">
<div class="app-detail-pane border-box p-20"> <div class="app-detail-pane border-box p-20">
<div class="m-b-20"> <div class="m-b-20">
<el-checkbox class="w-195" v-model="myCustomData.wmOrderShow">展示微盟商城订单</el-checkbox> <el-checkbox class="w-195" v-model="myCustomData.wmOrderShow" :true-label="1" :false-label="0">展示微盟商城订单</el-checkbox>
<div class="font-14 color-909399 set-tip-item">注:保存勾选项后,顾客详情 - 消费记录中将展示微盟商城交易成功的订单</div> <div class="font-14 color-909399 set-tip-item">注:保存勾选项后,顾客详情 - 消费记录中将展示微盟商城交易成功的订单</div>
</div> </div>
<div class="m-b-20"> <div class="m-b-20">
<el-checkbox class="w-195" v-model="myCustomData.damoOrderShow">展示达摩商城订单</el-checkbox> <el-checkbox class="w-195" v-model="myCustomData.damoOrderShow" :true-label="1" :false-label="0">展示达摩商城订单</el-checkbox>
<div class="font-14 color-909399 set-tip-item">注:保存勾选项后,顾客详情 - 消费记录中将展示达摩商城交易成功的订单</div> <div class="font-14 color-909399 set-tip-item">注:保存勾选项后,顾客详情 - 消费记录中将展示达摩商城交易成功的订单</div>
</div> </div>
<div class="m-b-20">
<el-checkbox class="w-195" v-model="myCustomData.damoOrderShow" :true-label="1" :false-label="0">展示积分商城订单</el-checkbox>
<div class="font-14 color-909399 set-tip-item">注:保存勾选项后,顾客详情 - 消费记录中将展示GIC积分商城交易成功的订单</div>
</div>
<div class="m-t-46 m-l-25"> <div class="m-t-46 m-l-25">
<el-button type="primary" :loading="loading" @click="submit('showFlag')" :disabled="$store.state.wxEnterpriseType">保 存</el-button> <el-button type="primary" :loading="loading" @click="submit('showFlag')" :disabled="$store.state.wxEnterpriseType">保 存</el-button>
</div> </div>
...@@ -58,8 +62,8 @@ export default { ...@@ -58,8 +62,8 @@ export default {
activeGroup: this.activeGroupId, // 商户(品牌) groupId activeGroup: this.activeGroupId, // 商户(品牌) groupId
wxEnterpriseRelatedId: JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId, wxEnterpriseRelatedId: JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId,
myCustomData: { myCustomData: {
wmOrderShow: false, wmOrderShow: 0,
damoOrderShow: false damoOrderShow: 0
}, },
loading: false loading: false
}; };
...@@ -82,8 +86,8 @@ export default { ...@@ -82,8 +86,8 @@ export default {
let para = { let para = {
enterpriseId: that.brandId, enterpriseId: that.brandId,
wxEnterpriseRelatedId: that.wxEnterpriseRelatedId, wxEnterpriseRelatedId: that.wxEnterpriseRelatedId,
wmOrderShow: that.myCustomData.wmOrderShow ? 1 : 0, wmOrderShow: that.myCustomData.wmOrderShow,
damoOrderShow: that.myCustomData.damoOrderShow ? 1 : 0 damoOrderShow: that.myCustomData.damoOrderShow
}; };
const url = '/haoban-app-customer-web/customer/save-consume-setting'; const url = '/haoban-app-customer-web/customer/save-consume-setting';
postRequest(url, para) postRequest(url, para)
...@@ -120,8 +124,6 @@ export default { ...@@ -120,8 +124,6 @@ export default {
let resData = res.data; let resData = res.data;
if (resData.errorCode == 1) { if (resData.errorCode == 1) {
if (!!resData.result) { if (!!resData.result) {
resData.result.wmOrderShow = resData.result.wmOrderShow == 1 ? true : false;
resData.result.damoOrderShow = resData.result.damoOrderShow == 1 ? true : false;
that.myCustomData = resData.result; that.myCustomData = resData.result;
} }
return; return;
......
...@@ -17,15 +17,15 @@ ...@@ -17,15 +17,15 @@
<el-button class="m-l-10" type="primary" :loading="loadingBtn" @click="exportExcel"><i class="iconfont icon-icon_yunxiazai p-r-6"></i>导出</el-button> <el-button class="m-l-10" type="primary" :loading="loadingBtn" @click="exportExcel"><i class="iconfont icon-icon_yunxiazai p-r-6"></i>导出</el-button>
</div> </div>
</div> </div>
<el-table class="select-table" ref="multipleTable" v-loading="loading" :data="tableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }" @selection-change="handleSelectionChange"> <el-table class="select-table" ref="multipleTable" :key="tableRefresh" v-loading="loading" :data="tableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="45"> </el-table-column> <el-table-column type="selection" width="45" :class-name="selectRadio == 1 ? 'cell-disabled' : 'font-size-zero'"> </el-table-column>
<el-table-column width="25"> <el-table-column width="25">
<template slot="header"> <template slot="header">
<el-dropdown style="line-height: 10px; padding: 0; margin-left: -15px; transform: translateY(4px); -webkit-transform: translateY(4px);" @command="handleCommand" placement="bottom-start"> <el-dropdown style="line-height: 10px; padding: 0; margin-left: -15px; transform: translateY(4px); -webkit-transform: translateY(4px);" placement="bottom-start">
<span class="el-dropdown-link"><i class="iconfont icongengduo"></i> </span> <span class="el-dropdown-link"><i class="iconfont icongengduo"></i> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="0"><span :style="{ color: selectRadio == 0 ? '#2f54eb' : '#606266' }">选择当页</span></el-dropdown-item> <el-dropdown-item> <el-checkbox v-model="selectRadio" :true-label="0" :false-label="2" @change="handleCommand">选择当页</el-checkbox></el-dropdown-item>
<el-dropdown-item command="1"><span :style="{ color: selectRadio == 1 ? '#2f54eb' : '#606266' }">选择全部</span></el-dropdown-item> <el-dropdown-item> <el-checkbox v-model="selectRadio" :true-label="1" :false-label="2" @change="handleCommand">选择全部</el-checkbox></el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</template> </template>
...@@ -233,7 +233,7 @@ export default { ...@@ -233,7 +233,7 @@ export default {
activeId: '2', // 详情头部选中 id activeId: '2', // 详情头部选中 id
activeBrand: this.brandId, // 品牌 id activeBrand: this.brandId, // 品牌 id
loadingBtn: false, loadingBtn: false,
selectRadio: 0, // 0:选择当页; 1:选择全部 selectRadio: 2, // 0:选择当页; 1:选择全部
showDialog: false, // 删除弹窗参数 showDialog: false, // 删除弹窗参数
// 条件 // 条件
conditionObj: { conditionObj: {
...@@ -304,7 +304,8 @@ export default { ...@@ -304,7 +304,8 @@ export default {
const end = new Date(); const end = new Date();
return time.getTime() < end.getTime() - 3600 * 1000 * 24 * 365 || time.getTime() > end.getTime(); return time.getTime() < end.getTime() - 3600 * 1000 * 24 * 365 || time.getTime() > end.getTime();
} }
} },
tableRefresh: false
}; };
}, },
computed: {}, computed: {},
...@@ -420,6 +421,14 @@ export default { ...@@ -420,6 +421,14 @@ export default {
*/ */
handleCommand(command) { handleCommand(command) {
this.selectRadio = command; this.selectRadio = command;
this.tableRefresh = !this.tableRefresh;
if (command == 1 || command == 0) {
this.$nextTick(() => {
this.$refs.multipleTable.toggleAllSelection();
})
} else if (command == 2) {
this.$refs.multipleTable.clearSelection();
}
}, },
/** /**
* 表格选择 * 表格选择
...@@ -427,7 +436,6 @@ export default { ...@@ -427,7 +436,6 @@ export default {
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
/** /**
* 批量删除 * 批量删除
*/ */
...@@ -486,7 +494,7 @@ export default { ...@@ -486,7 +494,7 @@ export default {
const that = this; const that = this;
that.currentPage = 1; that.currentPage = 1;
that.pageSize = val; that.pageSize = val;
that.getTableList(); that.getTableList(this.selectRadio);
}, },
/** /**
...@@ -496,7 +504,7 @@ export default { ...@@ -496,7 +504,7 @@ export default {
handleCurrentChange(val) { handleCurrentChange(val) {
const that = this; const that = this;
that.currentPage = val; that.currentPage = val;
that.getTableList(); that.getTableList(this.selectRadio);
}, },
changeSelect(val) { changeSelect(val) {
const that = this; const that = this;
...@@ -609,6 +617,13 @@ export default { ...@@ -609,6 +617,13 @@ export default {
} }
that.tableData = resData.result.list || []; that.tableData = resData.result.list || [];
that.total = resData.result.pageInfo.total; that.total = resData.result.pageInfo.total;
if (val == 1) {
this.$nextTick(() => {
this.$refs.multipleTable.toggleAllSelection();
});
} else {
this.selectRadio = 2;
}
return; return;
} }
errMsg.errorMsg(resData); errMsg.errorMsg(resData);
......
...@@ -34,14 +34,14 @@ ...@@ -34,14 +34,14 @@
</div> </div>
<el-table class="select-table" ref="multipleTable" :key="tableRefresh" v-loading="loading" :data="tableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }" @selection-change="handleSelectionChange"> <el-table class="select-table" ref="multipleTable" :key="tableRefresh" v-loading="loading" :data="tableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="45"> </el-table-column> <el-table-column type="selection" width="45" :class-name="selectRadio == 1 ? 'cell-disabled' : 'font-size-zero'"> </el-table-column>
<el-table-column width="25"> <el-table-column width="25">
<template slot="header"> <template slot="header">
<el-dropdown style="line-height: 10px; padding: 0; margin-left: -15px; transform: translateY(4px); -webkit-transform: translateY(4px);" @command="handleCommand" placement="bottom-start"> <el-dropdown style="line-height: 10px; padding: 0; margin-left: -15px; transform: translateY(4px); -webkit-transform: translateY(4px);" placement="bottom-start">
<span class="el-dropdown-link"><i class="iconfont icongengduo"></i> </span> <span class="el-dropdown-link"><i class="iconfont icongengduo"></i> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="0"><span :style="{ color: selectRadio == 0 ? '#2f54eb' : '#606266' }">选择当页</span></el-dropdown-item> <el-dropdown-item> <el-checkbox v-model="selectRadio" :true-label="0" :false-label="2" @change="handleCommand">选择当页</el-checkbox></el-dropdown-item>
<el-dropdown-item command="1"><span :style="{ color: selectRadio == 1 ? '#2f54eb' : '#606266' }">选择全部</span></el-dropdown-item> <el-dropdown-item> <el-checkbox v-model="selectRadio" :true-label="1" :false-label="2" @change="handleCommand">选择全部</el-checkbox></el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</template> </template>
...@@ -120,7 +120,7 @@ export default { ...@@ -120,7 +120,7 @@ export default {
storeType: '', storeType: '',
dateRange: [] dateRange: []
}, },
selectRadio: 0, // 选择当页/选择全部 selectRadio: 2, // 0 选择当页/ 1 选择全部/ 2 都不选
loading: false, loading: false,
tableData: [], tableData: [],
multipleSelection: [], multipleSelection: [],
...@@ -150,6 +150,13 @@ export default { ...@@ -150,6 +150,13 @@ export default {
handleCommand(command) { handleCommand(command) {
this.selectRadio = command; this.selectRadio = command;
this.tableRefresh = !this.tableRefresh; this.tableRefresh = !this.tableRefresh;
if (command == 1 || command == 0) {
this.$nextTick(() => {
this.$refs.multipleTable.toggleAllSelection();
});
} else if (command == 2) {
this.$refs.multipleTable.clearSelection();
}
}, },
/** /**
...@@ -188,7 +195,6 @@ export default { ...@@ -188,7 +195,6 @@ export default {
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
/** /**
* 删除选的部门 * 删除选的部门
*/ */
...@@ -245,7 +251,7 @@ export default { ...@@ -245,7 +251,7 @@ export default {
enterpriseId: that.activeBrand, // 品牌 id enterpriseId: that.activeBrand, // 品牌 id
delTaskStatus: obj.delOptFlag, // 0:仅删除逾期任务,1:删除所有待完成任务 delTaskStatus: obj.delOptFlag, // 0:仅删除逾期任务,1:删除所有待完成任务
reason: obj.reason, // 备注 reason: obj.reason, // 备注
isAll: that.selectRadio // 1:当页,2:所有 isAll: that.selectRadio // 0:当页,1:所有
// taskType: 1 //0不良评价,1话务任务 // taskType: 1 //0不良评价,1话务任务
}; };
postRequest('/haoban-app-tel-task-three-web/task/batch-del-store-task-list', para) postRequest('/haoban-app-tel-task-three-web/task/batch-del-store-task-list', para)
...@@ -329,7 +335,7 @@ export default { ...@@ -329,7 +335,7 @@ export default {
const that = this; const that = this;
that.currentPage = 1; that.currentPage = 1;
that.pageSize = val; that.pageSize = val;
that.getTableList(); that.getTableList(this.selectRadio);
}, },
/** /**
...@@ -340,7 +346,7 @@ export default { ...@@ -340,7 +346,7 @@ export default {
const that = this; const that = this;
that.currentPage = val; that.currentPage = val;
// let fullPath = that.$route.fullPath; // let fullPath = that.$route.fullPath;
that.getTableList(); that.getTableList(this.selectRadio);
}, },
/** /**
...@@ -359,16 +365,6 @@ export default { ...@@ -359,16 +365,6 @@ export default {
}, },
/** /**
* 处理已选部门
*/
handleSelectedList(group) {
let that = this;
// type: 1:员工,2:部门,3:门店;
that.conditionObj.storeGroup = group;
that.getTableList();
},
/**
* 查看详情 * 查看详情
*/ */
toDetail(index, row) { toDetail(index, row) {
...@@ -380,6 +376,7 @@ export default { ...@@ -380,6 +376,7 @@ export default {
* 获取列表数据 * 获取列表数据
*/ */
getTableList(val) { getTableList(val) {
console.log(this.selectRadio);
const that = this; const that = this;
that.loading = true; that.loading = true;
let storeGroups = []; let storeGroups = [];
...@@ -407,7 +404,13 @@ export default { ...@@ -407,7 +404,13 @@ export default {
if (resData.errorCode == 1) { if (resData.errorCode == 1) {
that.tableData = resData.result.list || []; that.tableData = resData.result.list || [];
that.total = resData.result.pageInfo.total; that.total = resData.result.pageInfo.total;
return false; if (val == 1) {
this.$nextTick(() => {
this.$refs.multipleTable.toggleAllSelection();
});
} else {
this.selectRadio = 2;
}
} }
errMsg.errorMsg(resData); errMsg.errorMsg(resData);
}) })
......
...@@ -23,15 +23,15 @@ import taskViewDetail from '@/components/app/taskViewDetail.vue'; ...@@ -23,15 +23,15 @@ import taskViewDetail from '@/components/app/taskViewDetail.vue';
<el-button type="danger" @click="multDel">批量删除</el-button><el-button :loading="loadingBtn" type="primary" @click="exportExcel"><i class="iconfont icon-icon_yunxiazai p-r-6"></i>导出</el-button> <el-button type="danger" @click="multDel">批量删除</el-button><el-button :loading="loadingBtn" type="primary" @click="exportExcel"><i class="iconfont icon-icon_yunxiazai p-r-6"></i>导出</el-button>
</div> </div>
</div> </div>
<el-table class="select-table" ref="multipleTable" v-loading="loading" :data="tableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }" @selection-change="handleSelectionChange"> <el-table class="select-table" ref="multipleTable" :key="tableRefresh" v-loading="loading" :data="tableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="45"> </el-table-column> <el-table-column type="selection" width="45" :class-name="selectRadio == 1 ? 'cell-disabled' : 'font-size-zero'"> </el-table-column>
<el-table-column width="25"> <el-table-column width="25">
<template slot="header"> <template slot="header">
<el-dropdown style="line-height: 10px; padding: 0; margin-left: -15px; transform: translateY(4px); -webkit-transform: translateY(4px);" @command="handleCommand" placement="bottom-start"> <el-dropdown style="line-height: 10px; padding: 0; margin-left: -15px; transform: translateY(4px); -webkit-transform: translateY(4px);" placement="bottom-start">
<span class="el-dropdown-link"><i class="iconfont icongengduo"></i> </span> <span class="el-dropdown-link"><i class="iconfont icongengduo"></i> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="0"><span :style="{ color: selectRadio == 0 ? '#2f54eb' : '#606266' }">选择当页</span></el-dropdown-item> <el-dropdown-item> <el-checkbox v-model="selectRadio" :true-label="0" :false-label="2" @change="handleCommand">选择当页</el-checkbox></el-dropdown-item>
<el-dropdown-item command="1"><span :style="{ color: selectRadio == 1 ? '#2f54eb' : '#606266' }">选择全部</span></el-dropdown-item> <el-dropdown-item> <el-checkbox v-model="selectRadio" :true-label="1" :false-label="2" @change="handleCommand">选择全部</el-checkbox></el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</template> </template>
...@@ -111,7 +111,7 @@ export default { ...@@ -111,7 +111,7 @@ export default {
dateRange: [] dateRange: []
}, },
loading: false, loading: false,
selectRadio: 0, // 选择当页/选择全部 selectRadio: 2, // 选择当页/选择全部
tableData: [ tableData: [
// { // {
// storeName: '2016-05-03', // storeName: '2016-05-03',
...@@ -130,7 +130,8 @@ export default { ...@@ -130,7 +130,8 @@ export default {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
total: 0, total: 0,
loadingBtn: false loadingBtn: false,
tableRefresh: false
}; };
}, },
computed: {}, computed: {},
...@@ -157,6 +158,14 @@ export default { ...@@ -157,6 +158,14 @@ export default {
*/ */
handleCommand(command) { handleCommand(command) {
this.selectRadio = command; this.selectRadio = command;
this.tableRefresh = !this.tableRefresh;
if (command == 1 || command == 0) {
this.$nextTick(() => {
this.$refs.multipleTable.toggleAllSelection();
});
} else if (command == 2) {
this.$refs.multipleTable.clearSelection();
}
}, },
/** /**
* 返回 的 brandId * 返回 的 brandId
...@@ -348,7 +357,7 @@ export default { ...@@ -348,7 +357,7 @@ export default {
const that = this; const that = this;
that.currentPage = 1; that.currentPage = 1;
that.pageSize = val; that.pageSize = val;
that.getTableList(); that.getTableList(this.selectRadio);
}, },
/** /**
...@@ -359,7 +368,7 @@ export default { ...@@ -359,7 +368,7 @@ export default {
const that = this; const that = this;
that.currentPage = val; that.currentPage = val;
// let fullPath = that.$route.fullPath; // let fullPath = that.$route.fullPath;
that.getTableList(); that.getTableList(this.selectRadio);
}, },
/** /**
...@@ -427,7 +436,13 @@ export default { ...@@ -427,7 +436,13 @@ export default {
if (resData.errorCode == 1) { if (resData.errorCode == 1) {
that.tableData = resData.result.list || []; that.tableData = resData.result.list || [];
that.total = resData.result.pageInfo.total; that.total = resData.result.pageInfo.total;
return false; if (val == 1) {
this.$nextTick(() => {
this.$refs.multipleTable.toggleAllSelection();
});
} else {
this.selectRadio = 2;
}
} }
errMsg.errorMsg(resData); errMsg.errorMsg(resData);
}) })
......
...@@ -81851,3 +81851,11 @@ ...@@ -81851,3 +81851,11 @@
margin: 0 auto; margin: 0 auto;
border-radius: 18px; border-radius: 18px;
} }
.cell-disabled {
pointer-events: none;
opacity: 0.8;
font-size: 0;
}
.font-size-zero{
font-size: 0;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment