Merge remote-tracking branch 'origin/dev' into dev
¶Ô±ÈÐÂÎļþ |
| | |
| | | // æ£æµææ ¡åç©åçå¤ç½® |
| | | import request from "@/utils/request"; |
| | | |
| | | // ä¿®æ¹ |
| | | export function doProcessDeal(data) { |
| | | return request({ |
| | | url: "/processDeal/doProcessDeal", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢ |
| | | export function addProcessDeal(data) { |
| | | return request({ |
| | | url: "/processDeal/addProcessDeal", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æäº¤åå² ä¼ åid |
| | | export function submitProcessTotaldeal(data) { |
| | | return request({ |
| | | url: "/processTotaldeal/submitProcessTotaldeal", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢è¯¦æ
å页æ¥è¯¢éé¢totaldealId ä¼ ååå²çid |
| | | export function pageProcessDeal(query) { |
| | | return request({ |
| | | url: "/processDeal/pageProcessDeal", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // å®¡æ ¸ ä¼ åidåéè¿ä¸éè¿state(䏿) |
| | | export function checkProcessTotaldeal(data) { |
| | | return request({ |
| | | url: "/processTotaldeal/checkProcessTotaldeal", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æ¹å ä¼ åidåéè¿ä¸éè¿state(䏿) |
| | | export function ratifyProcessTotaldeal(data) { |
| | | return request({ |
| | | url: "/processTotaldeal/ratifyProcessTotaldeal", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //å é¤ |
| | | export function delProcessDeal(query) { |
| | | return request({ |
| | | url: "/processDeal/delProcessDeal", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="sample-disposal"> |
| | | <el-row class="title"> |
| | | <el-col :span="20" style="padding-left: 20px;text-align: left;">æ£æµææ ¡åç©åçå¤ç½®</el-col> |
| | | <el-col :span="4" style="text-align: right;"> |
| | | <!-- <el-button size="medium" type="primary" @click="handleDown" v-loading="outLoading" style="margin-right: 16px;">导åº</el-button> --> |
| | | </el-col> |
| | | </el-row> |
| | | <el-tabs type="border-card" v-model="activeName" style="height: 100%;" @tab-click="queryParams.totaldealId = ''"> |
| | | <el-tab-pane label="å¡«å" name="å¡«å" style="height: 100%;" :key="1"> |
| | | <el-button size="small" type="primary" @click="handleAdd0" style="margin-left: 20px;" |
| | | v-if="addPower">æ°å¢</el-button> |
| | | <div class="table" style="height: calc(100% - 200px)" v-if="activeName == 'å¡«å'"> |
| | | <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 290px)'" :page="page" @pagination="pagination"></lims-table> |
| | | <!-- <ValueTable ref="ValueTable0" :url="$api.processTotaldeal.pageProcessDeal" :componentData="componentData0" |
| | | :key="upIndex0" :delUrl="$api.processTotaldeal.delProcessDeal" /> --> |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="åå²è®°å½" name="åå²è®°å½" style="height: 100%;" :key="2"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">å¹´æï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker v-model="componentData.entity.month" type="month" placeholder="éæ©æ" format="yyyy-MM" |
| | | value-format="yyyy-MM" size="small" @change="refreshTable()"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">æ¥ è¯¢</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <!-- <ValueTable ref="ValueTable" :url="$api.processTotaldeal.pageProcessTotaldeal" :componentData="componentData" |
| | | :key="upIndex" /> --> |
| | | </div> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <!-- æ°å¢æ ·å --> |
| | | <el-dialog :title="title" :visible.sync="addDialogVisible" width="400px"> |
| | | <el-row> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æ ·ååç§°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="addInfo.sampleName"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æ ·åç¼å·ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="addInfo.sampleCode"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">便 ·åä½ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.sampleSupplier" size="small"> |
| | | <el-option :label="item.company" :value="item.company" v-for="(item, index) in customPageList" |
| | | :key="item.id"></el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æ°éï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="addInfo.num"></el-input> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">å¤çæ¹å¼ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="addInfo.dealMethod"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æ¶é´ï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker v-model="addInfo.dealTime" type="date" size="small" placeholder="éæ©æ¥æ" format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd" style="width: 100%;"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="addDialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitAdd" :loading="addLoading">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 详æ
/ä¸è½½/å®¡æ ¸/æ¹å --> |
| | | <el-dialog :title="title0" :visible.sync="lookDialogVisible" width="800px" :class="{ downPdf: title0 == 'ä¸è½½' }" |
| | | :modal="title0 != 'ä¸è½½'" top="5vh"> |
| | | <filePreview v-if="lookDialogVisible" :fileUrl="javaApi + '/word/' + currentInfo.url" :currentFile="{}" |
| | | style="max-height: 70vh;overflow-y: auto;" /> |
| | | <span slot="footer" class="dialog-footer" v-if="title0 == 'å®¡æ ¸' || title0 == 'æ¹å'"> |
| | | <el-button @click="submitCheck('ä¸éè¿')" :loading="noCheckLoading">ä¸éè¿</el-button> |
| | | <el-button type="primary" @click="submitCheck('éè¿')" :loading="checkLoading">é è¿</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import filePreview from "@/components/Preview/filePreview.vue"; |
| | | import { selectCustomPageList } from "@/api/system/customer"; |
| | | import { |
| | | doProcessDeal, |
| | | addProcessDeal, |
| | | submitProcessTotaldeal, |
| | | pageProcessDeal, |
| | | checkProcessTotaldeal, |
| | | ratifyProcessTotaldeal, |
| | | delProcessDeal, |
| | | } from "@/api/cnas/process/sampleDisposal"; |
| | | export default { |
| | | components: { |
| | | limsTable, |
| | | filePreview, |
| | | }, |
| | | name: "SampleDisposal", |
| | | data() { |
| | | return { |
| | | activeName: 'å¡«å', |
| | | title: 'æ°å¢', |
| | | addDialogVisible: false, |
| | | addLoading: false, |
| | | outLoading: false, |
| | | editDialogVisible: false, |
| | | lookDialogVisible: false, |
| | | title0: 'æ¥ç', |
| | | noCheckLoading: false, |
| | | checkLoading: false, |
| | | // åå²å表 |
| | | componentData: { |
| | | entity: { |
| | | month: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'desc' |
| | | } |
| | | }, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | do: [{ |
| | | id: 'handleLook', |
| | | font: 'æ¥ç', |
| | | type: 'text', |
| | | method: 'handleLook', |
| | | }, { |
| | | id: 'handleDown0', |
| | | font: 'ä¸è½½', |
| | | type: 'text', |
| | | method: 'handleDown0', |
| | | disabFun: (row, index) => { |
| | | return !row.url |
| | | } |
| | | }, |
| | | // { |
| | | // id: 'handleAdd', |
| | | // font: 'å¡«å', |
| | | // type: 'text', |
| | | // method: 'handleAdd', |
| | | // disabFun: (row, index) => { |
| | | // return row.submitState=='å·²æäº¤' |
| | | // } |
| | | // }, |
| | | { |
| | | id: 'handleSubmit', |
| | | font: 'æäº¤', |
| | | type: 'text', |
| | | method: 'handleSubmit', |
| | | disabFun: (row, index) => { |
| | | return !!row.submitState && row.submitState != 'å¾
æäº¤' |
| | | } |
| | | }, { |
| | | id: 'handleCheck', |
| | | font: 'å®¡æ ¸', |
| | | type: 'text', |
| | | method: 'handleCheck', |
| | | disabFun: (row, index) => { |
| | | return row.examineState == 'éè¿' || row.submitState == 'å¾
æäº¤' |
| | | } |
| | | }, { |
| | | id: 'handleApproval', |
| | | font: 'æ¹å', |
| | | type: 'text', |
| | | method: 'handleApproval', |
| | | disabFun: (row, index) => { |
| | | return row.ratifyState == 'éè¿' || row.submitState == 'å¾
æäº¤' |
| | | } |
| | | }], |
| | | tagField: {}, |
| | | selectField: {}, |
| | | requiredAdd: [], |
| | | requiredUp: [], |
| | | needSort: [], |
| | | inputType: '' |
| | | }, |
| | | // æ ·åå表 |
| | | componentData0: { |
| | | entity: { |
| | | totaldealId: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'desc' |
| | | } |
| | | }, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | do: [{ |
| | | id: 'handleAdd0', |
| | | font: 'ä¿®æ¹', |
| | | type: 'text', |
| | | method: 'handleAdd0' |
| | | }, { |
| | | id: 'delete', |
| | | font: 'å é¤', |
| | | type: 'text', |
| | | method: 'doDiy' |
| | | }], |
| | | tagField: {}, |
| | | selectField: {}, |
| | | requiredAdd: [], |
| | | requiredUp: [], |
| | | needSort: [], |
| | | inputType: '' |
| | | }, |
| | | upIndex0: 100, |
| | | entityCopy: {}, |
| | | upIndex: 0, |
| | | addInfo: {},//æ°å¢æ ·å |
| | | customPageList: [], |
| | | currentInfo: { |
| | | arr: [] |
| | | },//æ¥çç详æ
|
| | | outPower: false, |
| | | addPower: false, |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "æ ·ååç§°", prop: "sampleName" }, |
| | | { label: "æ ·åç¼å·", prop: "sampleCode" }, |
| | | { label: "便 ·åä½", prop: "sampleSupplier" }, |
| | | { label: "æ°é", prop: "num" }, |
| | | { label: "å¤çæ¹å¼", prop: "dealMethod" }, |
| | | { label: "æ¶é´", prop: "dealTime" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleAdd0(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | // this.entityCopy = this.HaveJson(this.componentData.entity); |
| | | this.getCustomPageList() |
| | | // this.getPower() |
| | | }, |
| | | methods: { |
| | | getPower() { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let add = false |
| | | let out = false |
| | | let submitProcessTotaldeal = false |
| | | let checkProcessTotaldeal = false |
| | | let ratifyProcessTotaldeal = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'addProcessDeal') { |
| | | add = true |
| | | } |
| | | // if (power[i].menuMethod == 'exportProcessEvaluate') { |
| | | // out = true |
| | | // } |
| | | if (power[i].menuMethod == 'submitProcessTotaldeal') { |
| | | submitProcessTotaldeal = true |
| | | } |
| | | if (power[i].menuMethod == 'checkProcessTotaldeal') { |
| | | checkProcessTotaldeal = true |
| | | } |
| | | if (power[i].menuMethod == 'ratifyProcessTotaldeal') { |
| | | ratifyProcessTotaldeal = true |
| | | } |
| | | } |
| | | if (!ratifyProcessTotaldeal) { |
| | | this.componentData.do.splice(4, 1) |
| | | } |
| | | if (!checkProcessTotaldeal) { |
| | | this.componentData.do.splice(3, 1) |
| | | } |
| | | if (!submitProcessTotaldeal) { |
| | | this.componentData.do.splice(2, 1) |
| | | } |
| | | if (!add) { |
| | | this.componentData0.do.splice(1, 1) |
| | | this.componentData0.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | }, |
| | | // è·åéæ ·åä½å表 |
| | | getCustomPageList() { |
| | | selectCustomPageList({ |
| | | current: -1, |
| | | size: -1 |
| | | }).then(res => { |
| | | this.customPageList = res.data.body.records |
| | | }).catch(err => { }); |
| | | }, |
| | | handleDown() { }, |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.page }; |
| | | delete param.total; |
| | | pageProcessDeal({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.getList(); |
| | | }, |
| | | refresh() { |
| | | this.queryParams = {}; |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | refreshTable() { |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | // å¡«å |
| | | // handleAdd(row){ |
| | | // this.componentData0.entity.totaldealId = row.id |
| | | // this.editDialogVisible = true |
| | | // }, |
| | | // æå¼æ°å¢çé¢ |
| | | handleAdd0(row) { |
| | | if (row) { |
| | | this.addInfo = this.HaveJson(row) |
| | | this.title = 'ç¼è¾' |
| | | } else { |
| | | this.title = 'æ°å¢' |
| | | this.addInfo = {} |
| | | } |
| | | this.addDialogVisible = true |
| | | }, |
| | | // æäº¤æ°å¢ |
| | | submitAdd() { |
| | | if (this.addInfo.id) { |
| | | // ç¼è¾ |
| | | this.addLoading = true |
| | | doProcessDeal({ |
| | | totaldealId: this.queryParams.totaldealId, |
| | | ...this.addInfo |
| | | }).then(res => { |
| | | this.addLoading = false |
| | | if (res.code === 201) return |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'ç¼è¾æå!' |
| | | }); |
| | | this.$refs.ValueTable0.selectList() |
| | | }).catch(err => { }); |
| | | } else { |
| | | // æ°å¢ |
| | | this.addLoading = true |
| | | addProcessDeal({ |
| | | totaldealId: this.queryParams.totaldealId, |
| | | ...this.addInfo |
| | | }).then(res => { |
| | | this.addLoading = false |
| | | if (res.code === 201) return |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æ°å¢æå!' |
| | | }); |
| | | this.$refs.ValueTable0.selectList() |
| | | }).catch(err => { }); |
| | | } |
| | | }, |
| | | // æäº¤ |
| | | handleSubmit(row) { |
| | | this.$confirm('æ¯å¦æäº¤ ' + row.month + ' æä»½çæ°æ®', 'æäº¤', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | submitProcessTotaldeal({ |
| | | id: row.id |
| | | }).then(res => { |
| | | if (res.code === 201) return |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æäº¤æå!' |
| | | }); |
| | | this.$refs['ValueTable'].selectList() |
| | | }).catch(err => { }); |
| | | }) |
| | | }, |
| | | // æ¥ç |
| | | handleLook(row) { |
| | | // console.log(row) |
| | | // this.title0 = 'æ¥ç' |
| | | // this.commonFun(row) |
| | | this.activeName = 'å¡«å' |
| | | this.queryParams.totaldealId = row.id |
| | | this.$nextTick(() => { |
| | | this.$refs['ValueTable0'].selectList() |
| | | }) |
| | | }, |
| | | commonFun(row, callbanck) { |
| | | this.currentInfo = row |
| | | this.queryParams.totaldealId = row.id |
| | | pageProcessDeal({ |
| | | current: -1, |
| | | size: -1, ...this.queryParams |
| | | }).then(res => { |
| | | this.currentInfo.arr = res.data.body.records |
| | | this.lookDialogVisible = true |
| | | if (callbanck) { |
| | | callbanck() |
| | | } |
| | | }).catch(err => { }); |
| | | }, |
| | | // å®¡æ ¸ |
| | | handleCheck(row) { |
| | | this.title0 = 'å®¡æ ¸' |
| | | this.commonFun(row) |
| | | }, |
| | | // æ¹å |
| | | handleApproval(row) { |
| | | this.title0 = 'æ¹å' |
| | | this.commonFun(row) |
| | | }, |
| | | // æäº¤å®¡æ ¸/æ¹å |
| | | submitCheck(state) { |
| | | if (state == 'éè¿') { |
| | | this.checkLoading = true |
| | | } else { |
| | | this.noCheckLoading = true |
| | | } |
| | | if (this.title0 == 'å®¡æ ¸') { |
| | | checkProcessTotaldeal({ |
| | | id: this.currentInfo.id, |
| | | state: state |
| | | }).then(res => { |
| | | this.checkLoading = false |
| | | this.noCheckLoading = false |
| | | if (res.code === 201) return |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | this.$refs['ValueTable'].selectList() |
| | | this.lookDialogVisible = false |
| | | }).catch(err => { }); |
| | | } else if (this.title0 == 'æ¹å') { |
| | | ratifyProcessTotaldeal({ |
| | | id: this.currentInfo.id, |
| | | state: state |
| | | }).then(res => { |
| | | this.checkLoading = false |
| | | this.noCheckLoading = false |
| | | if (res.code === 201) return |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | this.$refs['ValueTable'].selectList() |
| | | this.lookDialogVisible = false |
| | | }).catch(err => { }); |
| | | } |
| | | }, |
| | | // 导åºè¯¦æ
|
| | | handleDown0(row) { |
| | | // å端ä¸è½½ |
| | | let url = this.javaApi + '/word/' + row.url |
| | | this.$download.saveAs(url, row.month + ' æ ·åå¤çç³è¯·è¡¨'); |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | delProcessDeal({ id: row.id }).then((res) => { |
| | | if (res.code == 201) return; |
| | | this.$message.success("å 餿å"); |
| | | this.refresh(); |
| | | }); |
| | | }) |
| | | .catch(() => { }); |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 40px; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 110px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .table { |
| | | background-color: #fff; |
| | | width: calc(100% - 40px); |
| | | height: calc(100% - 60px - 140px); |
| | | padding: 20px; |
| | | } |
| | | |
| | | .downPdf { |
| | | opacity: 0 !important; |
| | | } |
| | | |
| | | .tables { |
| | | table-layout: fixed; |
| | | width: 100%; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .tables td { |
| | | height: 40px; |
| | | width: 100px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | } |
| | | |
| | | .en { |
| | | font-size: 12px; |
| | | word-break: break-word; |
| | | /* èªå¨æè¡ */ |
| | | overflow-wrap: break-word; |
| | | /* 鲿¢æº¢åº */ |
| | | white-space: normal; |
| | | /* é»è®¤æ¢è¡ */ |
| | | } |
| | | |
| | | .user-info { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-evenly; |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .user-info .el-button { |
| | | margin: 0; |
| | | } |
| | | |
| | | >>>.el-tabs__content { |
| | | height: 100%; |
| | | } |
| | | </style> |
| | |
| | | </el-tooltip> |
| | | åªçææé® |
| | | </span> |
| | | <el-switch v-model="form.isRersonalButton" inactive-text="䏿¾ç¤º" active-text="æ¾ç¤º" inactive-value="0" |
| | | active-value="1"> |
| | | <el-switch v-model="form.isRersonalButton" inactive-text="䏿¾ç¤º" active-text="æ¾ç¤º" :inactive-value="0" |
| | | :active-value="1"> |
| | | </el-switch> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | isFrame: "1", |
| | | isCache: "0", |
| | | visible: "0", |
| | | status: "0" |
| | | status: "0", |
| | | isRersonalButton: 0 |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | |
| | | this.getTreeselect(); |
| | | getMenu(row.menuId).then(response => { |
| | | this.form = response.data; |
| | | this.form.isRersonalButton = Number(this.form.isRersonalButton) |
| | | this.open = true; |
| | | this.title = "ä¿®æ¹èå"; |
| | | }); |
| | |
| | | <div> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> |
| | | <el-form-item label="è§è²åç§°" prop="roleName"> |
| | | <el-input |
| | | v-model="queryParams.roleName" |
| | | placeholder="请è¾å
¥è§è²åç§°" |
| | | clearable |
| | | style="width: 200px" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | <el-input v-model="queryParams.roleName" placeholder="请è¾å
¥è§è²åç§°" clearable style="width: 200px" |
| | | @keyup.enter.native="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="æéå符" prop="roleKey"> |
| | | <el-input |
| | | v-model="queryParams.roleKey" |
| | | placeholder="请è¾å
¥æéå符" |
| | | clearable |
| | | style="width: 200px" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | <el-input v-model="queryParams.roleKey" placeholder="请è¾å
¥æéå符" clearable style="width: 200px" |
| | | @keyup.enter.native="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="status"> |
| | | <el-select |
| | | v-model="queryParams.status" |
| | | placeholder="è§è²ç¶æ" |
| | | clearable |
| | | style="width: 200px" |
| | | > |
| | | <el-option |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | <el-select v-model="queryParams.status" placeholder="è§è²ç¶æ" clearable style="width: 200px"> |
| | | <el-option v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.label" |
| | | :value="dict.value" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="å建æ¶é´"> |
| | | <el-date-picker |
| | | v-model="dateRange" |
| | | style="width: 200px" |
| | | value-format="yyyy-MM-dd" |
| | | type="daterange" |
| | | range-separator="-" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | ></el-date-picker> |
| | | <el-date-picker v-model="dateRange" style="width: 200px" value-format="yyyy-MM-dd" type="daterange" |
| | | range-separator="-" start-placeholder="å¼å§æ¥æ" end-placeholder="ç»ææ¥æ"></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æ¥ è¯¢</el-button> |
| | |
| | | </el-form> |
| | | </div> |
| | | <div class="addButton mb8"> |
| | | <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:role:add']">æ°å¢</el-button> |
| | | <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" |
| | | v-hasPermi="['system:role:add']">æ°å¢</el-button> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <el-table-column label="æ¾ç¤ºé¡ºåº" prop="roleSort" width="100" /> |
| | | <el-table-column label="ç¶æ" align="center" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-switch |
| | | v-model="scope.row.status" |
| | | active-value="0" |
| | | inactive-value="1" |
| | | @change="handleStatusChange(scope.row)" |
| | | ></el-switch> |
| | | <el-switch v-model="scope.row.status" active-value="0" inactive-value="1" |
| | | @change="handleStatusChange(scope.row)"></el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å建æ¶é´" align="center" prop="createTime" width="180"> |
| | |
| | | </el-table-column> |
| | | <el-table-column label="æä½" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope" v-if="scope.row.roleId !== 1"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['system:role:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['system:role:remove']" |
| | | >å é¤</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-view" |
| | | @click="handleView(scope.row)" |
| | | >详ç»</el-button> |
| | | <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['system:role:edit']">ä¿®æ¹</el-button> |
| | | <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" |
| | | v-hasPermi="['system:role:remove']">å é¤</el-button> |
| | | <el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)">详ç»</el-button> |
| | | <!-- <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">--> |
| | | <!-- <el-button size="mini" type="text" icon="el-icon-d-arrow-right">æ´å¤</el-button>--> |
| | | <!-- <el-dropdown-menu slot="dropdown">--> |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" /> |
| | | |
| | | <!-- æ·»å æä¿®æ¹è§è²é
ç½®å¯¹è¯æ¡ --> |
| | | <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ"> |
| | | <el-radio-group v-model="form.status" :disabled="title === 'æ¥çè§è²'"> |
| | | <el-radio |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | >{{dict.label}}</el-radio> |
| | | <el-radio v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.value">{{ dict.label |
| | | }}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="èåæé"> |
| | | <el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')" v-if="title !== 'æ¥çè§è²'">å±å¼/æå </el-checkbox> |
| | | <el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')" v-if="title !== 'æ¥çè§è²'">å
¨é/å
¨ä¸é</el-checkbox> |
| | | <el-checkbox v-model="form.menuCheckStrictly" @change="handleCheckedTreeConnect($event, 'menu')" v-if="title !== 'æ¥çè§è²'">ç¶åèå¨</el-checkbox> |
| | | <el-tree |
| | | :disabled="title === 'æ¥çè§è²'" |
| | | class="tree-border" |
| | | :data="menuOptions" |
| | | show-checkbox |
| | | ref="menu" |
| | | node-key="id" |
| | | :check-strictly="!form.menuCheckStrictly" |
| | | empty-text="å è½½ä¸ï¼è¯·ç¨å" |
| | | :props="defaultProps" |
| | | ></el-tree> |
| | | <el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')" |
| | | v-if="title !== 'æ¥çè§è²'">å±å¼/æå </el-checkbox> |
| | | <el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')" |
| | | v-if="title !== 'æ¥çè§è²'">å
¨é/å
¨ä¸é</el-checkbox> |
| | | <el-checkbox v-model="form.menuCheckStrictly" @change="handleCheckedTreeConnect($event, 'menu')" |
| | | v-if="title !== 'æ¥çè§è²'">ç¶åèå¨</el-checkbox> |
| | | <el-tree :disabled="title === 'æ¥çè§è²'" class="tree-border" :data="menuOptions" show-checkbox ref="menu" |
| | | node-key="id" :check-strictly="!form.menuCheckStrictly" empty-text="å è½½ä¸ï¼è¯·ç¨å" :props="defaultProps"> |
| | | <span class="custom-tree-node" slot-scope="{ node, data }"> |
| | | <span>{{ node.label }}</span> |
| | | <span> |
| | | <el-checkbox v-model="data.isRersonal" :true-label="1" :false-label="0" |
| | | v-if="data.isRersonalButton == 1" @change="m => chooseMe(m, data)" |
| | | :disabled="title === 'æ¥çè§è²'">åªçæ</el-checkbox> |
| | | </span> |
| | | </span> |
| | | </el-tree> |
| | | </el-form-item> |
| | | <el-form-item label="夿³¨"> |
| | | <el-input v-model="form.remark" type="textarea" placeholder="请è¾å
¥å
容" :disabled="title === 'æ¥çè§è²'"></el-input> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="æéèå´"> |
| | | <el-select v-model="form.dataScope" @change="dataScopeSelectChange"> |
| | | <el-option |
| | | v-for="item in dataScopeOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | ></el-option> |
| | | <el-option v-for="item in dataScopeOptions" :key="item.value" :label="item.label" |
| | | :value="item.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ°æ®æé" v-show="form.dataScope == 2"> |
| | | <el-checkbox v-model="deptExpand" @change="handleCheckedTreeExpand($event, 'dept')">å±å¼/æå </el-checkbox> |
| | | <el-checkbox v-model="deptNodeAll" @change="handleCheckedTreeNodeAll($event, 'dept')">å
¨é/å
¨ä¸é</el-checkbox> |
| | | <el-checkbox v-model="form.deptCheckStrictly" @change="handleCheckedTreeConnect($event, 'dept')">ç¶åèå¨</el-checkbox> |
| | | <el-tree |
| | | class="tree-border" |
| | | :data="deptOptions" |
| | | show-checkbox |
| | | default-expand-all |
| | | ref="dept" |
| | | node-key="id" |
| | | :check-strictly="!form.deptCheckStrictly" |
| | | empty-text="å è½½ä¸ï¼è¯·ç¨å" |
| | | :props="defaultProps" |
| | | ></el-tree> |
| | | <el-checkbox v-model="form.deptCheckStrictly" |
| | | @change="handleCheckedTreeConnect($event, 'dept')">ç¶åèå¨</el-checkbox> |
| | | <el-tree class="tree-border" :data="deptOptions" show-checkbox default-expand-all ref="dept" node-key="id" |
| | | :check-strictly="!form.deptCheckStrictly" empty-text="å è½½ä¸ï¼è¯·ç¨å" :props="defaultProps"></el-tree> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | |
| | | loading: true, |
| | | // é䏿°ç» |
| | | ids: [], |
| | | // åªçææ°ç» |
| | | isRersonalMenuIds: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | |
| | | status: "0", |
| | | menuIds: [], |
| | | deptIds: [], |
| | | isRersonalMenuIds: [], |
| | | menuCheckStrictly: true, |
| | | deptCheckStrictly: true, |
| | | remark: undefined |
| | |
| | | if (valid) { |
| | | if (this.form.roleId != undefined) { |
| | | this.form.menuIds = this.getMenuAllCheckedKeys(); |
| | | this.form.isRersonalMenuIds = this.isRersonalMenuIds; |
| | | updateRole(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | |
| | | }); |
| | | } else { |
| | | this.form.menuIds = this.getMenuAllCheckedKeys(); |
| | | this.form.isRersonalMenuIds = this.isRersonalMenuIds; |
| | | addRole(this.form).then(response => { |
| | | this.$modal.msgSuccess("æ°å¢æå"); |
| | | this.open = false; |
| | |
| | | this.download('system/role/export', { |
| | | ...this.queryParams |
| | | }, `role_${new Date().getTime()}.xlsx`) |
| | | }, |
| | | // åªçæ |
| | | chooseMe(val, data) { |
| | | let index = this.isRersonalMenuIds.findIndex(m => m == data.id) |
| | | if (index < 0 && val == 1) { |
| | | this.isRersonalMenuIds.push(data.id) |
| | | } else if (val == 0 && index > -1) { |
| | | this.isRersonalMenuIds.splice(index, 1) |
| | | } |
| | | } |
| | | } |
| | | }; |
| | |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .addButton { |
| | | margin-top: 3px; |
| | | } |
| | | |
| | | .custom-tree-node { |
| | | flex: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | font-size: 14px; |
| | | padding-right: 8px; |
| | | } |
| | | </style> |