Merge remote-tracking branch 'origin/dev' into dev
| | |
| | | "jspdf": "^3.0.0", |
| | | "mammoth": "^1.9.0", |
| | | "nprogress": "0.2.0", |
| | | "pako": "^2.1.0", |
| | | "print-js": "^1.6.0", |
| | | "quill": "2.0.2", |
| | | "screenfull": "5.0.2", |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | export function selectPersonnelOverview(query) { |
| | | return request({ |
| | | url: '/user/selectPersonnelOverview', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // æ£æµææ ¡åç©åçå¤ç½® |
| | | 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, |
| | | }); |
| | | } |
| | | |
| | | //æ¥çåå² |
| | | export function pageProcessTotaldeal(query) { |
| | | return request({ |
| | | url: "/processTotaldeal/pageProcessTotaldeal", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | |
| | | data: query |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢éªæ¶ |
| | | export function addAcceptance(query) { |
| | | return request({ |
| | | url: '/feStandardSubstanceAcceptance/addAcceptance', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | | // ä¿®æ¹éªæ¶ |
| | | export function updateAcceptance(query) { |
| | | return request({ |
| | | url: '/feStandardSubstanceAcceptance/updateAcceptance', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | |
| | | params: query |
| | | }) |
| | | } |
| | | // æ åç©è´¨éªæ¶æ¥ç详æ
|
| | | export function getAcceptanceDetails(query) { |
| | | return request({ |
| | | url: '/feStandardSubstanceAcceptance/getAcceptanceDetails', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | // æ åç©è´¨éªæ¶å¯¼åº |
| | | export function exportFeStandardSubstanceAcceptance(query) { |
| | | return request({ |
| | | url: '/feStandardSubstanceAcceptance/exportFeStandardSubstanceAcceptance', |
| | | method: 'get', |
| | | params: query, |
| | | responseType: "blob" |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | return request({ |
| | | url: "/manageDocumentIssueRecycle/addManageDocumentIssueRecycle", |
| | | method: "post", |
| | | responseType: "blob", |
| | | headers: { "Content-Type": "application/x-www-form-urlencoded" }, |
| | | data: data, |
| | | }); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <svg width="148" height="21" viewBox="0 0 148 21" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| | | <path fill-rule="evenodd" clip-rule="evenodd" d="M7.00437 5.75531V0.0625L0.772461 5.75531H7.00437Z" fill="#B26F00"/> |
| | | <path fill-rule="evenodd" clip-rule="evenodd" d="M141.709 5.75531V0.0625L147.941 5.75531H141.709Z" fill="#B26F00"/> |
| | | <path d="M6.97192 2.0625C6.97192 0.957931 7.86735 0.0625 8.97192 0.0625H139.676C140.781 0.0625 141.676 0.957931 141.676 2.0625V12.0625C141.676 16.4808 138.095 20.0625 133.676 20.0625H14.9719C10.5537 20.0625 6.97192 16.4808 6.97192 12.0625V2.0625Z" fill="url(#paint0_linear_2026_4)"/> |
| | | <defs> |
| | | <linearGradient id="paint0_linear_2026_4" x1="6.97192" y1="0.0625" x2="6.97192" y2="20.0625" gradientUnits="userSpaceOnUse"> |
| | | <stop stop-color="#F9C76F"/> |
| | | <stop offset="1" stop-color="#FEB42F"/> |
| | | </linearGradient> |
| | | </defs> |
| | | </svg> |
| | |
| | | |
| | | <script> |
| | | import jsPDF from "jspdf"; |
| | | import file from '@/utils/file.js' |
| | | export default { |
| | | props: ['isUpFile'], |
| | | data() { |
| | |
| | | } |
| | | const pdf = new jsPDF("p", "mm", "a4"); |
| | | for (let i = 0; i < this.contextList.length; i++) { |
| | | console.log(2222, this.contextList.length, this.$refs.pdfCanvas[i]) |
| | | const imgData = this.$refs.pdfCanvas[i].toDataURL('image/jpeg', 1.0); |
| | | const imgData = this.$refs.pdfCanvas[i].toDataURL('image/jpeg', 0.7); |
| | | const pdfWidth = pdf.internal.pageSize.getWidth(); |
| | | const pdfHeight = (this.$refs.pdfCanvas[i].height * pdfWidth) / this.$refs.pdfCanvas[i].width; |
| | | pdf.addImage(imgData, "JPEG", 0, 0, pdfWidth, pdfHeight); // å°å¾çæ·»å å° PDF |
| | |
| | | import { convertToHtml } from 'mammoth'; |
| | | import Vue from 'vue' |
| | | import { convertToHtml } from "mammoth"; |
| | | import pako from "pako"; |
| | | import Vue from "vue"; |
| | | |
| | | export default { |
| | | async convertFileToHtml(url) { |
| | | var xhr = new XMLHttpRequest(); |
| | | xhr.open('GET', Vue.prototype.javaApi+url, true);//è·åæä»¶æµçæ¥å£ |
| | | xhr.open("GET", Vue.prototype.javaApi + url, true); //è·åæä»¶æµçæ¥å£ |
| | | xhr.send(); |
| | | xhr.responseType = "blob";//ä¸è½æ¼ |
| | | let xhrPromise = new Promise((resolve, reject) => { |
| | | xhr.onload = async function () { |
| | | if (this.status === 200) { |
| | | // è¿åçæä»¶æµï¼è½¬æ¢æblob对象 |
| | | var blob = new Blob([this.response],{ type:'application/vnd.openxmlformats-officedocument.wordprocessingml.document' }); |
| | | var blob = new Blob([this.response], { |
| | | type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document", |
| | | }); |
| | | // 使ç¨mammothå°Word转æ¢ä¸ºHTML |
| | | let reader = new FileReader(); |
| | | reader.readAsArrayBuffer(blob); |
| | | let htmlContentPromise = new Promise((resolve, reject) => { |
| | | reader.onload = async function () { |
| | | var arrayBuffer = xhr.response; //arrayBuffer |
| | | const result = await convertToHtml({ arrayBuffer: arrayBuffer }) |
| | | let html = result.value.replace(/ï/g, '') |
| | | .replace('<h1>', '<h1 style="text-align: center;">') |
| | | .replace(/<table>/g, '<table style="border-collapse: collapse;border: 1px solid #000;">') |
| | | const result = await convertToHtml({ arrayBuffer: arrayBuffer }); |
| | | let html = result.value |
| | | .replace(/ï/g, "") |
| | | .replace("<h1>", '<h1 style="text-align: center;">') |
| | | .replace( |
| | | /<table>/g, |
| | | '<table style="border-collapse: collapse;border: 1px solid #000;">' |
| | | ) |
| | | .replace(/<tr>/g, '<tr style="height: 30px;">') |
| | | .replace(/<td>/g, '<td style="border: 1px solid #000;">') |
| | | .replace(/<p>/g, '<p style="text-indent: 2em;">') |
| | | .replace(/<a [^>]*>/g, "") |
| | | .replace(/<\/a>/g, "") |
| | | .replace(/<\/a>/g, ""); |
| | | // .replace(/em/g, "cm"); |
| | | resolve(html) |
| | | resolve(html); |
| | | }; |
| | | }) |
| | | resolve(await htmlContentPromise) |
| | | }); |
| | | resolve(await htmlContentPromise); |
| | | } |
| | | |
| | | } |
| | | }) |
| | | return await xhrPromise |
| | | }; |
| | | }); |
| | | return await xhrPromise; |
| | | }, |
| | | downloadIamge(imgsrc, name) {//ä¸è½½å¾çå°ååå¾çå |
| | | downloadIamge(imgsrc, name) { |
| | | //ä¸è½½å¾çå°ååå¾çå |
| | | var image = new Image(); |
| | | // è§£å³è·¨å Canvas 污æé®é¢ |
| | | image.setAttribute("crossOrigin", "anonymous"); |
| | |
| | | a.dispatchEvent(event); // 触åaçåå»äºä»¶ |
| | | }; |
| | | image.src = imgsrc; |
| | | } |
| | | }, |
| | | // å缩blob |
| | | compressBlob(blob) { |
| | | const reader = new FileReader(); |
| | | reader.readAsArrayBuffer(blob); |
| | | return new Promise((resolve) => { |
| | | reader.onload = () => { |
| | | const arrayBuffer = reader.result; |
| | | const uint8Array = new Uint8Array(arrayBuffer); |
| | | const compressedData = pako.deflate(uint8Array); |
| | | const compressedBlob = new Blob([compressedData], { type: blob.type }); |
| | | resolve(compressedBlob); |
| | | }; |
| | | }); |
| | | }, |
| | | }; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="capacity-scope"> |
| | | <div> |
| | | <el-form :model="entity" ref="entity" size="small" :inline="true"> |
| | | <el-form-item label="人ååç§°"> |
| | | <el-input v-model="entity.name" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button @click="refresh">é ç½®</el-button> |
| | | <el-button type="primary" @click="currentPage= 1,list=[],finishLoding = false,keyMap = {},refreshTable()">æ¥ è¯¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="table" v-loading="loading"> |
| | | <scroll-pagination @load="refreshTable" :finishLoding="finishLoding" :list="list" v-if="list.length>0||loading"> |
| | | <ul class="card"> |
| | | <li v-for="(m,i) in list" :key="i"> |
| | | <el-image style="width: 80px;height: 112px;" :src="javaApi+'/img/'+m.pictureUrl"> |
| | | <div slot="error" class="image-error" style="width: 79px; |
| | | height: 110px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border: 1px solid #EEEEEE;"> |
| | | <i class="el-icon-picture-outline" style="font-size:30px;color:#666666;"></i> |
| | | </div> |
| | | </el-image> |
| | | <el-image style="width: 195px; |
| | | height: 112px;" :src="javaApi+'/img/'+m.signatureUrl"> |
| | | <div slot="error" class="image-error" style="width: 194px; |
| | | height: 110px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border: 1px solid #EEEEEE;"> |
| | | <i class="el-icon-picture-outline" style="font-size:30px;color:#666666;"></i> |
| | | </div> |
| | | </el-image> |
| | | <div class="title">{{ m.name }}</div> |
| | | </li> |
| | | </ul> |
| | | </scroll-pagination> |
| | | <div v-if="list.length<1&&!loading" style="color:#909399;font-size:14px;text-align: center;margin-top:200px" >ææ æ°æ®</div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ScrollPagination from '@/components/index/scroll-paging.vue' |
| | | import {selectUserCondition} from "@/api/business/inspectionTask"; |
| | | export default { |
| | | components: { |
| | | ScrollPagination |
| | | }, |
| | | data() { |
| | | return { |
| | | entity:{ |
| | | name: null, |
| | | status: 0, |
| | | }, |
| | | list:[], |
| | | currentPage: 1, // å½å页 |
| | | pageSize: 16, // ä¸é¡µ16æ¡ |
| | | total: '', |
| | | loading: true, // ç»ä»¶loadingçå±ç¤º,é»è®¤ä¸ºtrue |
| | | finishLoding: false, // å è½½å®æï¼æ¾ç¤ºå·²ç»æ²¡ææ´å¤äº |
| | | keyMap: {} |
| | | } |
| | | }, |
| | | created() { |
| | | this.keyMap = {}; |
| | | this.currentPage = 1; |
| | | this.list = []; |
| | | this.refreshTable(); |
| | | }, |
| | | methods: { |
| | | refreshTable() { |
| | | const key = `_${this.currentPage}` |
| | | const value = this.keyMap[key] |
| | | // 妿valueåå¨ï¼è¡¨ç¤ºç¼åæå¼ï¼é£ä¹é»æ¢è¯·æ± |
| | | if(value) { |
| | | return |
| | | } |
| | | // valueä¸åå¨ï¼è¡¨ç¤ºç¬¬ä¸æ¬¡è¯·æ±,设置å ä½ |
| | | this.keyMap[key] = 'temp' |
| | | if(this.currentPage==1){ |
| | | this.loading = true |
| | | } |
| | | selectUserCondition({...this.entity}).then(res => { |
| | | this.total = res.data.length |
| | | let list = res.data |
| | | if(list.length==0){ |
| | | this.finishLoding = true; |
| | | }else{ |
| | | if(list.length<this.pageSize){ |
| | | this.finishLoding = true; |
| | | } |
| | | this.list = this.list.concat(list) |
| | | if(this.total==this.list.length){ |
| | | this.finishLoding = true; |
| | | } |
| | | this.currentPage++; |
| | | } |
| | | this.loading = false |
| | | }).catch(err => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | refresh() { |
| | | this.keyMap = {}; |
| | | this.currentPage= 1; |
| | | this.list=[]; |
| | | this.finishLoding = false; |
| | | this.entity={ |
| | | name: null, |
| | | state:1, |
| | | orderBy: {field: "id", order: "asc"} |
| | | }; |
| | | this.refreshTable() |
| | | }, |
| | | // æ»å¨è§¦åºå è½½ |
| | | scrollFn() { |
| | | let clientHeight = document.documentElement.clientHeight - 18; //å¯è§åºå |
| | | let scrollHeight = document.body.scrollHeight; // æ»å¨ææ¡£é«åº¦ |
| | | let scrollTop = parseInt(document.documentElement.scrollTop); // å·²æ»å¨çé«åº¦ |
| | | let height = 300; |
| | | if ( |
| | | scrollTop + clientHeight >= scrollHeight - height && |
| | | scrollHeight != 0 |
| | | ) { |
| | | if (!this.finishLoding&&this.currentPage*this.pageSize<this.total) { |
| | | this.currentPage = this.currentPage + 1; |
| | | this.refreshTable(); |
| | | } |
| | | } else { |
| | | return false; |
| | | } |
| | | }, |
| | | throttle(fn, wait) { |
| | | // å°è£
彿°è¿è¡èæµ |
| | | var timer = null; |
| | | return function () { |
| | | var context = this; |
| | | var args = arguments; |
| | | if (!timer) { |
| | | timer = setTimeout(function () { |
| | | fn.apply(context, args); |
| | | timer = null; |
| | | }, wait); |
| | | } |
| | | }; |
| | | }, |
| | | }, |
| | | destroyed() { |
| | | window.removeEventListener("scroll", this.throttle(), false); |
| | | }, |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .table { |
| | | width: 100%; |
| | | height: calc(100% - 60px - 80px - 10px - 40px); |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .card { |
| | | list-style-type: none; |
| | | display: grid; |
| | | grid-template-columns: repeat(auto-fit, 314px); |
| | | /* justify-content: center; */ |
| | | grid-gap: 16px; |
| | | min-height: 200px; |
| | | padding-left: 0 !important; |
| | | } |
| | | .card li{ |
| | | width: 320px; |
| | | border-radius: 8px 8px 8px 8px; |
| | | box-shadow: 4px 4px 8px 0px rgba(51,51,51,0.04); |
| | | border: 1px solid #EEEEEE; |
| | | margin: 0 !important; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | box-sizing: border-box; |
| | | padding: 26px 16px 16px; |
| | | font-size: 14px; |
| | | position: relative; |
| | | } |
| | | li .title{ |
| | | width: 147px; |
| | | height: 20px; |
| | | background: url(~@/assets/images/renyuan-title.svg) no-repeat; |
| | | position: absolute; |
| | | top: -6px; |
| | | left: 50%; |
| | | transform: translateX(-50%); |
| | | text-align: center; |
| | | line-height: 20px; |
| | | color: #fff; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="sample-disposal"> |
| | | <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;">æ°å¢</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> |
| | | </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="queryParams0.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"> |
| | | <lims-table :tableData="tableData0" :column="column0" :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 300px)'" :page="page0" @pagination="pagination0"></lims-table> |
| | | </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, |
| | | pageProcessTotaldeal, |
| | | } 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, |
| | | // åå²å表 |
| | | 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, |
| | | queryParams0: {}, |
| | | tableData0: [], |
| | | column0: [ |
| | | { label: "æä»½", prop: "month" }, |
| | | { label: "æ»æ°é", prop: "totalNum" }, |
| | | { label: "æäº¤äºº", prop: "submitUserName" }, |
| | | { label: "å®¡æ ¸äºº", prop: "examineUserName" }, |
| | | { label: "æ¹å人", prop: "ratifyUserName" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "æ¥ç", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleLook(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "ä¸è½½", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDown0(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !row.url |
| | | } |
| | | }, |
| | | { |
| | | name: "æäº¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleSubmit(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !!row.submitState && row.submitState != 'å¾
æäº¤' |
| | | } |
| | | }, |
| | | { |
| | | name: "å®¡æ ¸", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleCheck(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.examineState == 'éè¿' || row.submitState == 'å¾
æäº¤' |
| | | } |
| | | }, |
| | | { |
| | | name: "æ¹å", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleApproval(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.ratifyState == 'éè¿' || row.submitState == 'å¾
æäº¤' |
| | | } |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page0: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | // this.entityCopy = this.HaveJson(this.componentData.entity); |
| | | this.getCustomPageList() |
| | | this.getList() |
| | | this.getList0() |
| | | }, |
| | | 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.queryParams0 = {}; |
| | | this.page0.current = 1; |
| | | this.getList0(); |
| | | }, |
| | | refreshTable() { |
| | | this.page0.current = 1; |
| | | this.getList0(); |
| | | }, |
| | | getList0() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams0, ...this.page }; |
| | | delete param.total; |
| | | pageProcessTotaldeal({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData0 = res.data.records; |
| | | this.page0.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination0({ page, limit }) { |
| | | this.page0.current = page; |
| | | this.page0.size = limit; |
| | | this.getList0(); |
| | | }, |
| | | // å¡«å |
| | | // 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.page.current = 0; |
| | | this.getList(); |
| | | }).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.page.current = 0; |
| | | this.getList(); |
| | | }).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.refreshTable() |
| | | }).catch(err => { }); |
| | | }) |
| | | }, |
| | | // æ¥ç |
| | | handleLook(row) { |
| | | // console.log(row) |
| | | // this.title0 = 'æ¥ç' |
| | | // this.commonFun(row) |
| | | this.activeName = 'å¡«å' |
| | | this.queryParams.totaldealId = row.id |
| | | this.$nextTick(() => { |
| | | this.page.current = 0; |
| | | this.getList(); |
| | | }) |
| | | }, |
| | | commonFun(row, callbanck) { |
| | | this.currentInfo = row |
| | | this.queryParams.totaldealId = row.id |
| | | pageProcessDeal({ |
| | | current: -1, |
| | | size: -1, ...this.queryParams |
| | | }).then(res => { |
| | | this.lookDialogVisible = true |
| | | this.currentInfo.arr = res.data.records |
| | | 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.refreshTable() |
| | | 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.refreshTable() |
| | | 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; |
| | | height: calc(100% - 60px - 140px); |
| | | padding: 20px; |
| | | } |
| | | |
| | | .downPdf { |
| | | opacity: 0 !important; |
| | | } |
| | | |
| | | .tables { |
| | | table-layout: fixed; |
| | | width: 100%; |
| | | } |
| | | |
| | | .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> |
| | |
| | | <template> |
| | | <el-dialog :visible.sync="dialogVisible" title="æ åç©è´¨éªæ¶è®°å½" width="70%"> |
| | | <el-steps :active="currentStep" finish-status="success"> |
| | | <el-step class="cursor-pointer" v-for="(item, index) in steps" :key="index" :title="item"> |
| | | </el-step> |
| | | </el-steps> |
| | | <el-form :model="model" label-width="140px" size="small"> |
| | | <Step1 :model.sync="model"></Step1> |
| | | <el-dialog :visible.sync="dialogVisible" title="æ åç©è´¨éªæ¶è®°å½" width="72%" v-loading="loading"> |
| | | <el-form :model="acceptance" ref="acceptance" label-width="140px" size="small"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å家代表" prop="producer"> |
| | | <el-input v-model="acceptance.producer"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç¸å
³éä»¶" prop="file"> |
| | | <div class="table-between"> |
| | | <el-input v-model="acceptance.file" style="width: 80%;" disabled></el-input> |
| | | <el-upload |
| | | ref="upload" |
| | | style="float: right;" |
| | | :headers="uploadHeader" |
| | | :action="action" |
| | | :show-file-list="false" |
| | | :on-success="onSuccess" |
| | | > |
| | | <el-button type="primary"> |
| | | éä»¶ä¸ä¼ |
| | | </el-button> |
| | | </el-upload> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¥æ¶äºº" prop="recipient"> |
| | | <el-input v-model="acceptance.recipient"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¥åç¾å" prop="signature"> |
| | | <el-input v-model="acceptance.signature"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="éªæ¶æ
åµ" prop="situation"> |
| | | <el-input v-model="acceptance.situation"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å®è£
è°è¯æ
åµ" prop="installation"> |
| | | <el-input v-model="acceptance.installation"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¸
å" prop="substanceId" |
| | | :rule="[{ required: true, message: 'è¯·éæ©æ¸
å', trigger: 'change' }]"> |
| | | <el-select v-model="acceptance.substanceId" placeholder="è¯·éæ©" style="width: 100%"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å°è´§æ¥æ" prop="arriveDate"> |
| | | <el-date-picker |
| | | v-model="acceptance.arriveDate" |
| | | align="right" |
| | | type="date" |
| | | placeholder="éæ©æ¥æ" |
| | | style="width: 100%" |
| | | value-format="yyyy-MM-dd" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç»´ä¿®åä½" prop="maintenanceUnit"> |
| | | <el-input v-model="acceptance.maintenanceUnit"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="å¤ä»¶ç¡®è®¤"> |
| | | <el-button type="primary" style="float: right;" @click="addSpareTable">å¢å è¡</el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <lims-table :tableData="list" :column="spareColumns" height="300"> |
| | | <template slot="name" slot-scope="{ row, index }"> |
| | | <el-input v-if="row.isEdit" size="small" v-model="row.name"></el-input> |
| | | <span v-else>{{ row.name }}</span> |
| | | </template> |
| | | <template slot="number" slot-scope="{ row, index }"> |
| | | <el-input v-if="row.isEdit" size="small" v-model="row.number"></el-input> |
| | | <span v-else>{{ row.number }}</span> |
| | | </template> |
| | | <template slot="action" slot-scope="{ row, index }"> |
| | | <div v-if="row.isEdit"> |
| | | <el-button type="text" @click="save(index)">ä¿å</el-button> |
| | | <el-button type="text">åæ¶</el-button> |
| | | </div> |
| | | <div v-else> |
| | | <el-button type="text" @click="edit(index)">ä¿®æ¹</el-button> |
| | | </div> |
| | | </template> |
| | | </lims-table> |
| | | </el-col> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="submit">ä¿ å</el-button> |
| | | <el-button @click="closeDialog">å æ¶</el-button> |
| | | <el-button type="primary" :loading="submitLoading" @click="submit">ä¿ å</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import Step1 from './Step1.vue' |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { |
| | | addAcceptance, getAcceptanceDetails, |
| | | getStandardSubstanceAll, |
| | | updateAcceptance |
| | | } from "@/api/cnas/resourceDemand/standardMaterialAccept/standardMaterialAccept"; |
| | | export default { |
| | | components: { |
| | | Step1 |
| | | limsTable, |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | | currentStep: 0, // æ¥éª¤æ¡æ¾ç¤ºç¬¬å æ¥ |
| | | steps: ['æäº¤', 'å¼ç®±éªæ¶å¤æ ¸', 'å®è£
éªæ¶æ£æ¥', 'å®è£
éªæ¶å¤æ ¸', 'éªæ¶æ ¸æ¥', 'éªæ¶æ ¸æ¥å®¡æ ¸'], |
| | | model: { |
| | | loading: false, |
| | | submitLoading: false, |
| | | acceptance: { |
| | | id: undefined, |
| | | producer: undefined, // å家代表 |
| | |
| | | substanceId: undefined, // æ¸
å |
| | | arriveDate: undefined, // å°è´§æ¥æ |
| | | maintenanceUnit: undefined, // ç»´ä¿®åä½ |
| | | list: [], |
| | | }, |
| | | list: [] |
| | | list: [], |
| | | spareColumns: [ |
| | | { |
| | | label: "åç§°", |
| | | prop: "name", |
| | | align: "center", |
| | | dataType: "slot", |
| | | slot: "name", |
| | | }, { |
| | | label: "æ°é", |
| | | prop: "number", |
| | | align: "center", |
| | | dataType: "slot", |
| | | slot: "number", |
| | | }, { |
| | | label: "æä½", |
| | | align: "center", |
| | | dataType: "slot", |
| | | slot: "action", |
| | | width: 150 |
| | | } |
| | | ], |
| | | options: [] |
| | | } |
| | | }, |
| | | watch: { |
| | | model(newVal) { |
| | | this.model = newVal |
| | | } |
| | | mounted() { |
| | | this.getStand() |
| | | }, |
| | | methods: { |
| | | clearForm() { |
| | | this.model.acceptance.id = undefined |
| | | this.model.acceptance.producer = undefined |
| | | this.model.acceptance.file = undefined |
| | | this.model.acceptance.recipient = undefined |
| | | this.model.acceptance.signature = undefined |
| | | this.model.acceptance.situation = undefined |
| | | this.model.acceptance.installation = undefined |
| | | this.model.acceptance.substanceId = undefined |
| | | this.model.acceptance.arriveDate = undefined |
| | | this.model.acceptance.maintenanceUnit = undefined |
| | | this.model.list = [] |
| | | }, |
| | | openDialog(form) { |
| | | console.log(form) |
| | | if(form) { |
| | | this.model.acceptance.id = form.acceptance.id |
| | | this.model.acceptance.producer = form.acceptance.producer |
| | | this.model.acceptance.file = form.acceptance.file |
| | | this.model.acceptance.recipient = form.acceptance.recipient |
| | | this.model.acceptance.signature = form.acceptance.signature |
| | | this.model.acceptance.situation = form.acceptance.situation |
| | | this.model.acceptance.installation = form.acceptance.installation |
| | | this.model.acceptance.substanceId = form.acceptance.substanceId |
| | | this.model.acceptance.arriveDate = form.acceptance.arriveDate |
| | | this.model.acceptance.maintenanceUnit = form.acceptance.maintenanceUnit |
| | | this.model.list = form.list |
| | | openDialog(id) { |
| | | if(id) { |
| | | this.getDetail(id) |
| | | } else { |
| | | this.clearForm() |
| | | } |
| | | this.dialogVisible = true |
| | | }, |
| | | getDetail(id) { |
| | | this.loading = true |
| | | getAcceptanceDetails({id: id}).then(res => { |
| | | this.acceptance = res.data.acceptance |
| | | this.list = res.data.list |
| | | this.loading = false |
| | | }).catch(err => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | getStand() { |
| | | getStandardSubstanceAll().then(res => { |
| | | this.options = res.data |
| | | }) |
| | | }, |
| | | addSpareTable() { |
| | | this.list.push({ |
| | | acceptanceId: this.acceptance.id, |
| | | name: '', |
| | | number: '', |
| | | isEdit: true |
| | | }) |
| | | }, |
| | | onSuccess(response) { |
| | | this.acceptance.file = response.data |
| | | }, |
| | | save(index) { |
| | | this.$set(this.list[index], 'isEdit', false) |
| | | }, |
| | | edit(index) { |
| | | this.$set(this.list[index], 'isEdit', true) |
| | | }, |
| | | clearForm() { |
| | | this.list = [] |
| | | this.resetForm('acceptance') |
| | | }, |
| | | closeDialog() { |
| | | this.clearForm() |
| | | this.resetForm('acceptance') |
| | | this.dialogVisible = false |
| | | }, |
| | | submit() { |
| | | if (!this.model.acceptance.substanceId) { |
| | | if (!this.acceptance.substanceId) { |
| | | this.$message.warning('è¯·éæ©æ¸
å') |
| | | return |
| | | } |
| | | this.$emit('submit', this.model) |
| | | this.acceptance.list = this.HaveJson(this.list) |
| | | this.submitLoading = true |
| | | if(this.acceptance.id) { |
| | | updateAcceptance({acceptance: this.acceptance, list: this.list}).then(res => { |
| | | this.$message.success('ç¼è¾æå') |
| | | this.submitLoading = false |
| | | this.closeDialog() |
| | | this.$emit('submit') |
| | | }).catch((e) => { |
| | | this.submitLoading = false |
| | | }) |
| | | } else { |
| | | addAcceptance({acceptance: this.acceptance, list: this.list}).then(res => { |
| | | this.$message.success('æ°å¢æå') |
| | | this.closeDialog() |
| | | this.$emit('submit') |
| | | }).catch((e) => { |
| | | this.submitLoading = false |
| | | }) |
| | | } |
| | | }, |
| | | }, |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + '/personBasicInfo/saveCNASFile' |
| | | } |
| | | }, |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .cursor-pointer { |
| | | cursor: pointer; |
| | | >>>.el-dialog__body { |
| | | height: 580px; |
| | | overflow-y: auto; |
| | | } |
| | | </style> |
| | |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="columns" :height="'calc(100vh - 250px)'" @pagination="pagination" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | :page="page" :tableLoading="tableLoading"> |
| | | <template slot="action" slot-scope="{ row }"> |
| | | <el-button type="text" @click="edit(row)">ç¼è¾</el-button> |
| | | </template> |
| | | </lims-table> |
| | | </div> |
| | | <AddRecord ref="addRecordRef" @submit="submit"></AddRecord> |
| | | <AddRecord ref="addRecordRef" v-if="addRecordRef" @submit="submit"></AddRecord> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | // import axios from "axios"; |
| | | // import { getPageAcceptance, addAcceptance, updateAcceptance, getAcceptanceDetails, exportAcceptance } from "@/assets/api/api"; |
| | | // import ZTTable from '@/components/caorui/ZTTable/index.vue'; |
| | | // import AddRecord from './components/AddRecord.vue'; |
| | | |
| | | import limsTable from '@/components/Table/lims-table.vue' |
| | | import AddRecord from './component/AddRecord.vue'; |
| | | import { |
| | | getPageAcceptance, |
| | | updateAcceptanc, |
| | | addAcceptance |
| | | getPageAcceptance, getAcceptanceDetails, exportFeStandardSubstanceAcceptance, updateAcceptance, addAcceptance |
| | | } from '@/api/cnas/resourceDemand/standardMaterialAccept/standardMaterialAccept' |
| | | export default { |
| | | components: { |
| | |
| | | form: { |
| | | search: undefined |
| | | }, |
| | | addRecordRef: false, |
| | | columns: [ |
| | | { |
| | | label: "åºåºç¼å·", |
| | |
| | | this.getTableData() |
| | | }, |
| | | methods: { |
| | | async getTableData() { |
| | | const res = await getPageAcceptance(this.form); |
| | | if (res.code === 200) { |
| | | getTableData() { |
| | | getPageAcceptance(this.form).then(res => { |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | openDialog() { |
| | | this.addRecordRef = true; |
| | | this.$nextTick(() => { |
| | | this.$refs.addRecordRef.openDialog() |
| | | }) |
| | | }, |
| | | async submit(form) { |
| | | |
| | | const { code } = await form.acceptance.id ? updateAcceptanc(this.form) : addAcceptance((this.form)); |
| | | if (code == 200) { |
| | | this.$message.success(`${form.acceptance.id ? 'ç¼è¾' : 'æ·»å '}æå`) |
| | | submit() { |
| | | this.addRecordRef = false; |
| | | this.getTableData() |
| | | } |
| | | }, |
| | | async edit(row) { |
| | | const res = await this.getDetail(row.id) |
| | | this.$refs.addRecordRef.openDialog({ |
| | | acceptance: res.acceptance, |
| | | list: res.list |
| | | edit(row) { |
| | | this.addRecordRef = true; |
| | | this.$nextTick(() => { |
| | | this.$refs.addRecordRef.openDialog(row.id) |
| | | }) |
| | | }, |
| | | async getDetail(id) { |
| | | const { code, data } = await axios({ |
| | | method: 'get', |
| | | url: getAcceptanceDetails, |
| | | params: { id } |
| | | }) |
| | | if (code == 200) { |
| | | return data; |
| | | } |
| | | }, |
| | | reset() { |
| | | this.form.search = undefined |
| | | this.getTableData() |
| | | }, |
| | | async exportExcel() { |
| | | const res = await axios({ |
| | | method: "get", |
| | | url: `${exportAcceptance}`, |
| | | responseType: "blob" |
| | | }) |
| | | exportFeStandardSubstanceAcceptance().then(res => { |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, 'æ åç©è´¨éªæ¶.xlsx'); |
| | | this.$message.success('å¯¼åºæå') |
| | | }) |
| | | }, |
| | | |
| | | // å页忢 |
| | | pagination(page) { |
| | | this.page.size = page.limit |
| | |
| | | page: { |
| | | size: 20, |
| | | current: 1, |
| | | }, |
| | | total: 0, |
| | | }, |
| | | correctiveInfo: false, |
| | | viewTestRecordDialog: false, |
| | | }; |
| | |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.tableData = res.data.records |
| | | this.total = res.data.total |
| | | this.page.total = res.data.total |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.tableLoading = false |
| | |
| | | formData.append('state', this.type); // æä»¶ååæ®µ |
| | | formData.append('writer', this.currentInfo.writer); // æä»¶ååæ®µ |
| | | |
| | | try { |
| | | let res = await checkManageDocumentControlled(formData) |
| | | this.checkLoading = false |
| | | this.noCheckLoading = false |
| | |
| | | this.$message({ message: 'æä½å¤±è´¥', type: 'error' }); |
| | | return false |
| | | } |
| | | } catch (e) { |
| | | this.checkLoading = false |
| | | this.noCheckLoading = false |
| | | } |
| | | |
| | | |
| | | }, |
| | | handleCheckSub(type) { |
| | | this.type = type |
| | |
| | | formData.append('file', pdfBlob, fileName); // æä»¶å段 |
| | | formData.append('id', this.currentInfo.id); // æä»¶ååæ®µ |
| | | |
| | | try { |
| | | let res = await uploadFileManageDocumentList(formData) |
| | | this.addLoading = false |
| | | if (res.code == 200) { |
| | |
| | | this.$message({ message: 'ä¸ä¼ 失败', type: 'error' }); |
| | | return false |
| | | } |
| | | } catch (e) { |
| | | this.addLoading = false |
| | | } |
| | | |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | |
| | | <el-button size="small" @click="openDownloadDia">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | <el-table :data="tableData" style="width: 100%" height="calc(100vh - 18em)"> |
| | | <el-table :data="tableData" style="width: 100%" height="calc(100vh - 18em)" key="table1"> |
| | | <el-table-column type="index" label="åºå·" width="120"> |
| | | <template v-slot="scope"> |
| | | <span>{{ (page.current - 1) * page.size + scope.$index + 1 }}</span> |
| | |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | current: 1, |
| | | }, |
| | | tableData: [], |
| | | loading: false |
| | |
| | | <el-button size="small" @click="openDownloadDia">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | <el-table :data="tableData" style="width: 100%" height="calc(100vh - 18em)"> |
| | | <el-table :data="tableData" style="width: 100%" height="calc(100vh - 18em)" key="table0"> |
| | | <el-table-column type="index" label="åºå·" width="120"> |
| | | <template v-slot="scope"> |
| | | <span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span> |
| | |
| | | prop: "insResult", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | let obj = this.insResultList.find((m) => m.value == params) |
| | | if (obj) { |
| | | return this.insResultList.find((m) => m.value == params).label; |
| | | } else { |
| | | return '' |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | let obj = this.insResultList.find((m) => m.value == params) |
| | | if (obj) { |
| | | return this.insResultList.find((m) => m.value == params).type; |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | |
| | | } |
| | | }, |
| | | getUsers() { |
| | | selectUserCondition().then((res) => { |
| | | selectUserCondition({ type: 1 }).then((res) => { |
| | | if (res.code === 201) { |
| | | return; |
| | | } |
| | |
| | | </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> |