¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="capacity-scope"> |
| | | <div style="display: flex;justify-content: space-between"> |
| | | <div style="display: flex;"> |
| | | <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;"> |
| | | <span style="width: 88px;font-size: 14px;font-weight: 700;color: #606266;">æä»¶åç§°</span> |
| | | <el-input v-model="queryParams.fileName" clearable placeholder="请è¾å
¥" size="small" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </div> |
| | | <div style="line-height: 30px;"> |
| | | <el-button type="primary" size="mini" @click="refreshTable">æ¥è¯¢</el-button> |
| | | <el-button size="mini" @click="refresh">éç½®</el-button> |
| | | </div> |
| | | </div> |
| | | <div style="line-height: 30px;"> |
| | | <el-button :loading="outLoading" size="small" type="primary" style="margin-right: 10px" @click="openForm('add')">æ°å¢</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 270px)'" |
| | | :page="page" @pagination="pagination"></lims-table> |
| | | </div> |
| | | <el-dialog :visible.sync="addDialogVisible" title="è¯ä»·" width="900px" @close="closeDia"> |
| | | <el-form ref="form" :model="form" label-position="right" label-width="120px" :rules="formRules"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æä»¶åç§°:" prop="fileName"> |
| | | <el-input v-model="form.fileName" placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="计åå
容:" prop="implementationContent"> |
| | | <el-input v-model="form.implementationContent" placeholder="请è¾å
¥" |
| | | size="small" |
| | | :rows="6" |
| | | type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="卿å
容:" prop="dynamicContent"> |
| | | <el-input v-model="form.dynamicContent" placeholder="请è¾å
¥" |
| | | size="small" |
| | | :rows="6" |
| | | type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çç£äºº:" prop="supervisor"> |
| | | <el-select v-model="form.supervisor" |
| | | clearable filterable |
| | | placeholder="è¯·éæ©" size="small" style="width: 100%;"> |
| | | <el-option v-for="item in responsibleOptions" :key="item.name" :label="item.name" :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è´¨éè¯å®¡æ¥æ:" prop="superviseDate"> |
| | | <el-date-picker v-model="form.superviseDate" format="yyyy-MM-dd" |
| | | placeholder="éæ©æ¥æ" size="small" value-format="yyyy-MM-dd" |
| | | type="date" style="width: 100%"></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeDia">å æ¶</el-button> |
| | | <el-button :loading="addLoading" type="primary" @click="handleAdd">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import filePreview from "@/components/Preview/filePreview.vue"; |
| | | import { |
| | | exportProcessEvaluate, |
| | | doProcessEvaluate, |
| | | delProcessEvaluate, |
| | | pageProcessEvaluate, |
| | | } from '@/api/cnas/process/uncertainty.js' |
| | | import { mapGetters } from "vuex"; |
| | | import { |
| | | deleteManagementReview, |
| | | exportManagementReview, |
| | | pageManagementReview, saveOrUpdateManagementReview |
| | | } from "@/api/cnas/process/ensureResults/managementReview"; |
| | | import {selectUserCondition} from "@/api/cnas/resourceDemand/facilitiesEnvironment/facilitiesAndEnvironment"; |
| | | export default { |
| | | name: 'Uncertainty', |
| | | components: { |
| | | limsTable, |
| | | filePreview |
| | | }, |
| | | data() { |
| | | return { |
| | | addPower: false, |
| | | outPower: false, |
| | | outLoading: false, |
| | | addDialogVisible: false, |
| | | operationType: '', |
| | | addInfo: {}, |
| | | addLoading: false, |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "æä»¶åç§°", prop: "fileName" }, |
| | | { label: "çç£äºº", prop: "supervisor" }, |
| | | { label: "è´¨éè¯å®¡æ¥æ", prop: "superviseDate" }, |
| | | { |
| | | dataType: "action", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.openForm('edit', row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "导åº", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDown0(row); |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | form: { |
| | | fileName: '', |
| | | implementationContent: '', |
| | | dynamicContent: '', |
| | | supervisor: '', |
| | | superviseDate: '', |
| | | }, |
| | | formRules: { |
| | | fileName: [{required: true, message: '请填åæä»¶åç§°',trigger: 'blur'}], |
| | | implementationContent: [{required: true, message: '请填å计åå
容',trigger: 'blur'}], |
| | | dynamicContent: [{required: true, message: 'è¯·å¡«å¨æå
容',trigger: 'blur'}], |
| | | supervisor: [{required: true, message: 'è¯·éæ©çç£äºº',trigger: 'change'}], |
| | | superviseDate: [{required: true, message: 'è¯·éæ©æ¥æ',trigger: 'change'}], |
| | | }, |
| | | responsibleOptions: [], |
| | | } |
| | | }, |
| | | // ç¨äºä¸ä¼ æä»¶çä¿¡æ¯ |
| | | computed: { |
| | | ...mapGetters(["userId"]), |
| | | }, |
| | | mounted() { |
| | | this.getList() |
| | | }, |
| | | methods: { |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.page }; |
| | | delete param.total; |
| | | pageManagementReview({ ...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(); |
| | | }, |
| | | handleDown0(row) { |
| | | exportManagementReview({managementReviewId: row.managementReviewId}).then(res => { |
| | | const blob = new Blob([res], { type: 'application/msword' }); |
| | | this.$download.saveAs(blob, row.fileName + '.docx'); |
| | | }) |
| | | }, |
| | | // æå¼æ°å¢ç¼è¾å¼¹æ¡ |
| | | openForm (type, row) { |
| | | this.addDialogVisible = true; |
| | | this.$nextTick(() => { |
| | | this.form = {} |
| | | this.$refs['form'].resetFields(); |
| | | if (type === 'edit') { |
| | | this.form = {...row} |
| | | } |
| | | this.operationType = type; |
| | | this.getUserList() |
| | | }) |
| | | }, |
| | | // æäº¤è¡¨å |
| | | handleAdd() { |
| | | this.addLoading = true; |
| | | saveOrUpdateManagementReview(this.form).then((res) => { |
| | | this.addLoading = false; |
| | | this.$message.success('è¯ä»·æå'); |
| | | this.closeDia(); |
| | | this.refreshTable() |
| | | }) |
| | | }, |
| | | closeDia() { |
| | | this.$refs['form'].resetFields(); |
| | | this.addDialogVisible = false; |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }).then(() => { |
| | | deleteManagementReview({ managementReviewId: row.managementReviewId }).then((res) => { |
| | | this.$message.success("å 餿å"); |
| | | this.refresh(); |
| | | }); |
| | | }).catch(() => { }); |
| | | }, |
| | | getUserList(){ |
| | | selectUserCondition({type: 2}).then(res => { |
| | | if (res.code == 200) { |
| | | this.responsibleOptions = res.data |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .search { |
| | | height: 46px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 80px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 80px); |
| | | } |
| | | </style> |