| | |
| | | :before-open="beforeOpen" :page.sync="page" @search-change="searchChange" @search-reset="searchReset" |
| | | @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" |
| | | @refresh-change="refreshChange" @on-load="onLoad"> |
| | | <!-- <template slot="menuLeft"> --> |
| | | <!-- <el-button type="danger" size="small" plain icon="el-icon-delete" v-if="permission.household_delete" |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | <el-button type="success" size="small" plain v-if="permission.household_import" |
| | | icon="el-icon-upload2" @click="handleImport">导入 |
| | | </el-button> |
| | | <el-button type="warning" size="small" plain v-if="permission.household_export" |
| | | icon="el-icon-download" @click="handleExport">导出 |
| | | </el-button> --> |
| | | <!-- </template> --> |
| | | <template slot="menuLeft"> |
| | | <el-button type="danger" size="small" plain icon="el-icon-delete" v-if="permission.household_delete" |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | <el-button type="success" size="small" plain v-if="permission.household_import" icon="el-icon-upload2" |
| | | @click="handleImport">导入 |
| | | </el-button> |
| | | <el-button type="warning" size="small" plain v-if="permission.household_export" icon="el-icon-download" |
| | | @click="handleExport">导出 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{row, size}" slot="menu"> |
| | | <el-button :size="size" type="text" icon="el-icon-circle-plus-outline" v-if="permission.household_manager" |
| | |
| | | {{ labelDispose(row.householdLabelList) }} |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog title="用户角色配置" append-to-body :visible.sync="roleBox" width="345px" center> |
| | | |
| | | <el-tree :data="roleGrantList" show-checkbox check-strictly default-expand-all node-key="id" ref="treeRole" |
| | | :default-checked-keys="roleTreeObj" :props="props"> |
| | | </el-tree> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button size="small" @click="roleBox = false">取 消</el-button> |
| | | <el-button size="small" type="primary" @click="submitRole">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <el-dialog title="标签管理" append-to-body :visible.sync="labelFlag" center width="600px"> |
| | | <div v-for="(item, index) in labelData " :key="index"> |
| | | <el-row> |
| | |
| | | </div> |
| | | </el-collapse-item> |
| | | </el-collapse> |
| | | |
| | | |
| | | |
| | | <div class="grid-container2" v-else> |
| | | <div class="grid-item" :style="{ backgroundColor: getColor(item2.color) }" |
| | | v-for="( item2, index2 ) in item.children " @click="changLabel(item2)" :key="index2"> |
| | |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <el-dialog title="用户数据导入" append-to-body :visible.sync="excelBox" width="555px"> |
| | | <el-dialog title="住户数据导入" append-to-body :visible.sync="excelBox" width="555px"> |
| | | <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter"> |
| | | <template slot="excelTemplate"> |
| | | <el-button size="small" type="primary" @click="handleTemplate"> |
| | |
| | | }, |
| | | data: [], |
| | | |
| | | excelForm: {}, |
| | | excelForm: { |
| | | }, |
| | | labelForm: {}, |
| | | labelOption: { |
| | | submitBtn: false, |
| | |
| | | res: 'data' |
| | | }, |
| | | tip: '请上传 .xls,.xlsx 标准格式文件', |
| | | action: "/api/blade-system/user/import-user" |
| | | action: "/api/blade-household/household/import-household" |
| | | }, |
| | | { |
| | | label: "数据覆盖", |
| | |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | 'form.cardType': { |
| | | handler(newData) { |
| | | let idCardColumn = this.findObject( |
| | |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | 'form.healthStatus': { |
| | | handler(newData) { |
| | | let diseaseNameColumn = this.findObject( |
| | |
| | | } else { |
| | | diseaseNameColumn.disabled = true |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | 'excelForm.isCovered'() { |
| | | if (this.excelForm.isCovered !== '') { |
| | | const column = this.findObject(this.excelOption.column, "excelFile") |
| | | column.action = `/api/blade-household/household/import-household?isCovered=${this.excelForm.isCovered}` |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userInfo", "permission"]), |
| | |
| | | return (data) => { |
| | | return setLabelColor(data) |
| | | } |
| | | } |
| | | }, |
| | | ids() { |
| | | let ids = [] |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | }, |
| | | mounted() { }, |
| | | methods: { |
| | |
| | | }, |
| | | uploadAfter(res, done, loading, column) { |
| | | this.excelBox = false |
| | | this.refreshChange() |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: res |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | done() |
| | | }, |
| | | handleExport() { |
| | |
| | | }) |
| | | }, |
| | | handleTemplate() { |
| | | exportBlob(`/api/blade-system/user/export-template?${this.website.tokenHeader}=${getToken()}`).then(res => { |
| | | exportBlob(`/api/blade-household/household/export-template?${this.website.tokenHeader}=${getToken()}`).then(res => { |
| | | downloadXls(res.data, "住户数据模板.xlsx") |
| | | }) |
| | | }, |