| | |
| | | import request from '@/utils/request' |
| | | import request from "@/utils/request"; |
| | | |
| | | // è·åæ£éªé¡¹ç®åæ° |
| | | export function selectItemParameterList(query) { |
| | | return request({ |
| | | url: '/capacityScope/selectItemParameterList', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | url: "/capacityScope/selectItemParameterList", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | // è·åæ£æµå¯¹è±¡ |
| | | export function selectTestObjectList(query) { |
| | | return request({ |
| | | url: '/capacityScope/selectTestObjectList', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | url: "/capacityScope/selectTestObjectList", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | // æ°å¢æ£éªé¡¹ç®åæ° |
| | | export function addItemParameter(query) { |
| | | return request({ |
| | | url: '/capacityScope/addItemParameter', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | url: "/capacityScope/addItemParameter", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | | // å 餿£éªé¡¹ç®åæ° |
| | | export function delItemParameter(query) { |
| | | return request({ |
| | | url: '/capacityScope/delItemParameter', |
| | | method: 'delete', |
| | | params: query |
| | | }) |
| | | url: "/capacityScope/delItemParameter", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | // ä¿®æ¹æ£éªé¡¹ç®åæ° |
| | | export function upItemParameter(query) { |
| | | return request({ |
| | | url: '/capacityScope/upItemParameter', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | url: "/capacityScope/upItemParameter", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | | // è·åæ£éªå¯¹è±¡æ |
| | | export function getItemTree() { |
| | | return request({ |
| | | url: '/capacityScope/getItemTree', |
| | | method: 'get' |
| | | }) |
| | | url: "/capacityScope/getItemTree", |
| | | method: "get", |
| | | }); |
| | | } |
| | | // æ°å¢æ£æµå¯¹è±¡ |
| | | export function addTestObject(query) { |
| | | return request({ |
| | | url: '/capacityScope/addTestObject', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | url: "/capacityScope/addTestObject", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | | // å 餿£æµå¯¹è±¡ |
| | | export function delTestObject(query) { |
| | | return request({ |
| | | url: '/capacityScope/delTestObject', |
| | | method: 'delete', |
| | | params: query |
| | | }) |
| | | url: "/capacityScope/delTestObject", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | // ä¿®æ¹æ£æµå¯¹è±¡ |
| | | export function upTestObject(query) { |
| | | return request({ |
| | | url: '/capacityScope/upTestObject', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | url: "/capacityScope/upTestObject", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | | // æ¥è¯¢æ£éªå¯¹è±¡ç产åç»´æ¤å表 |
| | | export function selectProductListByObjectId(query) { |
| | | return request({ |
| | | url: '/capacityScope/selectProductListByObjectId', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | url: "/capacityScope/selectProductListByObjectId", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | // æ°å¢äº§å |
| | | export function addProduct(query) { |
| | | return request({ |
| | | url: '/capacityScope/addProduct', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | url: "/capacityScope/addProduct", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | | // å é¤äº§å |
| | | export function delProduct(query) { |
| | | return request({ |
| | | url: '/capacityScope/delProduct', |
| | | method: 'delete', |
| | | params: query |
| | | }) |
| | | url: "/capacityScope/delProduct", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | // ä¿®æ¹äº§å |
| | | export function upProduct(query) { |
| | | return request({ |
| | | url: '/capacityScope/upProduct', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | url: "/capacityScope/upProduct", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | | // è·åå®éªå®¤åç§° |
| | | export function obtainItemParameterList() { |
| | | return request({ |
| | | url: '/laboratoryScope/obtainItemParameterList', |
| | | method: 'get', |
| | | }) |
| | | url: "/laboratoryScope/obtainItemParameterList", |
| | | method: "get", |
| | | }); |
| | | } |
| | | // æ¥è¯¢åå§è®°å½æ¨¡æ¿æä¸¾ |
| | | export function getStandardTemplate() { |
| | | return request({ |
| | | url: '/StandardTemplate/getStandardTemplate', |
| | | method: 'get', |
| | | }) |
| | | url: "/StandardTemplate/getStandardTemplate", |
| | | method: "get", |
| | | }); |
| | | } |
| | | // æ ¹æ®äº§åidæ¥è¯¢åå®¶å¯åº¦ç»å® |
| | | export function selectSupplierDensityByProductId(query) { |
| | | return request({ |
| | | url: '/productSupplierDensity/selectSupplierDensityByProductId', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | url: "/productSupplierDensity/selectSupplierDensityByProductId", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | // æ°å¢äº§ååå®¶å¯åº¦ç»å® |
| | | export function addProductSupplierDensity(query) { |
| | | return request({ |
| | | url: '/productSupplierDensity/addProductSupplierDensity', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | url: "/productSupplierDensity/addProductSupplierDensity", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | | // ä¿®æ¹äº§ååå®¶å¯åº¦ç»å® |
| | | export function updateProductSupplierDensity(query) { |
| | | return request({ |
| | | url: '/productSupplierDensity/updateProductSupplierDensity', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | url: "/productSupplierDensity/updateProductSupplierDensity", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | | // å é¤äº§ååå®¶å¯åº¦ç»å® |
| | | export function deleteProductSupplierDensity(query) { |
| | | return request({ |
| | | url: '/productSupplierDensity/deleteProductSupplierDensity', |
| | | method: 'delete', |
| | | params: query |
| | | }) |
| | | url: "/productSupplierDensity/deleteProductSupplierDensity", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | // ç»å®è½¦é´ |
| | | export function updateWorkShop(query) { |
| | | return request({ |
| | | url: "/capacityScope/updateWorkShop", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | |
| | | import request from '@/utils/request' |
| | | import request from "@/utils/request"; |
| | | |
| | | // æ£éªå¯¹è±¡æ ¹æ®äº§åidæ¥è¯¢é¶ä»¶ |
| | | export function selectByTestObjectId(query) { |
| | | return request({ |
| | | url: '/structureTestObjectPart/selectByTestObjectId', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | url: "/structureTestObjectPart/selectByTestObjectId", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | // æ£éªå¯¹è±¡æ°å¢äº§åé¶ä»¶ |
| | | export function addTestObjectPart(query) { |
| | | return request({ |
| | | url: '/structureTestObjectPart/addTestObjectPart', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | url: "/structureTestObjectPart/addTestObjectPart", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | | // æ£éªå¯¹è±¡ä¿®æ¹äº§åé¶ä»¶ |
| | | export function updateTestObjectPart(query) { |
| | | return request({ |
| | | url: '/structureTestObjectPart/updateTestObjectPart', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | url: "/structureTestObjectPart/updateTestObjectPart", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | | // æ£éªå¯¹è±¡å é¤äº§åé¶ä»¶ |
| | | export function deleteTestObjectPart(query) { |
| | | return request({ |
| | | url: '/structureTestObjectPart/deleteTestObjectPart', |
| | | method: 'delete', |
| | | params: query |
| | | }) |
| | | url: "/structureTestObjectPart/deleteTestObjectPart", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | // æ ¹æ®äº§åidæ¥è¯¢é¶ä»¶ |
| | | export function selectByProductId(query) { |
| | | return request({ |
| | | url: '/productPart/selectByProductId', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | url: "/productPart/selectByProductId", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | // æ°å¢äº§åé¶ä»¶ |
| | | export function addProductPart(query) { |
| | | return request({ |
| | | url: '/productPart/addProductPart', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | url: "/productPart/addProductPart", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | | // ä¿®æ¹äº§åé¶ä»¶ |
| | | export function updateProductPart(query) { |
| | | return request({ |
| | | url: '/productPart/updateProductPart', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | url: "/productPart/updateProductPart", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | | // å é¤äº§åé¶ä»¶ |
| | | export function deleteProductPart(query) { |
| | | return request({ |
| | | url: '/productPart/deleteProductPart', |
| | | method: 'post', |
| | | params: query |
| | | }) |
| | | url: "/productPart/deleteProductPart", |
| | | method: "post", |
| | | params: query, |
| | | }); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from "@/utils/request"; |
| | | |
| | | // æ¥è¯¢è½¦é´åç§° |
| | | export function selectWorkShop(query) { |
| | | return request({ |
| | | url: "/workShop/selectWorkShop", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // å 餿£éªåæ¨¡æ¿ |
| | | export function delWorkShop(query) { |
| | | return request({ |
| | | url: "/workShop/delWorkShop", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ·»å 车é´åç§°æ°æ® |
| | | export function addOrUpdateWorkShop(query) { |
| | | return request({ |
| | | url: "/workShop/addOrUpdateWorkShop", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | | |
| | | // æ¥è¯¢è½¦é´æä»¶ |
| | | export function fileList(query) { |
| | | return request({ |
| | | url: "/workShop/fileList", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // å 餿件 |
| | | export function delFile(query) { |
| | | return request({ |
| | | url: "/workShop/delFile", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | |
| | | :filter-method="item.filterHandler" :filter-multiple="item.filterMultiple" :filtered-value="item.filteredValue" |
| | | :filters="item.filters" :fixed="item.fixed" :label="item.label" :min-width="item.minWidth" :prop="item.prop" |
| | | :show-overflow-tooltip="item.dataType === 'action' || item.dataType === 'slot' ? false : true" |
| | | :sortable="item.sortable ? true : false" :type="item.type" :width="item.dataType === 'action' ? getWidth(item.operation) : item.width" align="center"> |
| | | :sortable="item.sortable ? true : false" :type="item.type" |
| | | :width="item.dataType == 'action' ? btnWidth : item.width" align="center"> |
| | | <!-- <div class="123" v-if="item.type == ''"> --> |
| | | <template v-if="item.hasOwnProperty('colunmTemplate')" :slot="item.colunmTemplate" slot-scope="scope"> |
| | | <slot v-if="item.theadSlot" :index="index" :name="item.theadSlot" :row="scope.row" /> |
| | |
| | | </div> |
| | | |
| | | <!-- æé® --> |
| | | <div v-else-if="item.dataType == 'action'"> |
| | | <div v-else-if="item.dataType == 'action'" :style="`width:${getWidth(item.operation, scope.row)}`"> |
| | | <template v-for="(o, key) in item.operation"> |
| | | <el-button v-show="o.type != 'upload'" size="mini" v-if="o.showHide ? o.showHide(scope.row) : true" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" :icon="iconFn(o)" :plain="o.plain" |
| | |
| | | data() { |
| | | return { |
| | | spanList: [], |
| | | btnWidth: '120px', |
| | | }; |
| | | }, |
| | | mounted() { |
| | |
| | | getWidth(row) { |
| | | let count = 0; |
| | | row.forEach((a) => { |
| | | if (a.showHide!==undefined && a.showHide()) { |
| | | if (a.showHide !== undefined && a.showHide()) { |
| | | count += a.name.length; |
| | | } else if(!a.showHide) { |
| | | } else if (!a.showHide) { |
| | | count += a.name.length; |
| | | } |
| | | }); |
| | | return count * 15 + 70 + "px"; |
| | | this.btnWidth = count * 15 + 80 + "px"; |
| | | return count * 15 + 80 + "px"; |
| | | }, |
| | | iconFn(row) { |
| | | if (row.name === "ç¼è¾" || row.name === "ä¿®æ¹") { |
| | |
| | | Vue.prototype.HaveJson = (val) => { |
| | | return JSON.parse(JSON.stringify(val)); |
| | | }; |
| | | Vue.prototype.javaApi = "http://114.132.189.42:7012"; |
| | | Vue.prototype.javaApi = "http://10.21.10.74:8089"; |
| | | Vue.prototype.checkPermi = checkPermi; |
| | | Vue.prototype.uploadHeader = { |
| | | Authorization: "Bearer " + getToken(), |
| | |
| | | <el-button size="small" style="height: 38px" type="primary">éä»¶ä¸ä¼ </el-button> |
| | | </el-upload> |
| | | </div> |
| | | <lims-table :tableData="tableDataFile" :column="columnFile" height="500px" |
| | | key="tableDataFile" :tableLoading="tableLoadingFile"></lims-table> |
| | | <lims-table :tableData="tableDataFile" :column="columnFile" height="500px" key="tableDataFile" |
| | | :tableLoading="tableLoadingFile"></lims-table> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | |
| | | import { mapGetters } from "vuex"; |
| | | import { selectUserCondition } from "@/api/business/inspectionTask"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import {delFile, downFile, getFileList} from "@/api/business/rawMaterialOrder"; |
| | | import { delFile, downFile, getFileList } from "@/api/business/rawMaterialOrder"; |
| | | export default { |
| | | name: 'ReportPreparation', |
| | | components: { limsTable, onlyoffice }, |
| | |
| | | <router-link class="link-type" :to="'/register'">ç«å³æ³¨å</router-link> |
| | | </div> |
| | | </el-form-item> |
| | | <el-button v-if="true" type="primary" plain @click="goLogin">éå¢éæç»å½</el-button> |
| | | <el-button v-if="false" type="primary" plain @click="goLogin">éå¢éæç»å½</el-button> |
| | | </el-form> |
| | | </div> |
| | | <!-- åºé¨ --> |
| | |
| | | }) |
| | | .then(() => { |
| | | deleteAuxiliaryWorkingHours({ id: row.id }).then((res) => { |
| | | console.log('res',res) |
| | | if (res.code == 200){ |
| | | console.log('res', res) |
| | | if (res.code == 200) { |
| | | this.$message.success("å 餿å"); |
| | | this.refresh(); |
| | | } |
| | |
| | | </el-radio-group> |
| | | </el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-upload v-if="radio === 0" ref='upload1' |
| | | style="display: inline;margin-right: 8px" |
| | | :action="uploadAction1" |
| | | :before-upload="beforeUpload1" :headers="token" :on-error="onError1" |
| | | :on-success="handleSuccessUp1" :show-file-list="false" accept='.doc,.docx,.xls,.xlsx'> |
| | | <el-upload v-if="radio === 0" ref='upload1' style="display: inline;margin-right: 8px" :action="uploadAction1" |
| | | :before-upload="beforeUpload1" :headers="token" :on-error="onError1" :on-success="handleSuccessUp1" |
| | | :show-file-list="false" accept='.doc,.docx,.xls,.xlsx'> |
| | | <el-button size="small" type="primary">导å
¥</el-button> |
| | | </el-upload> |
| | | <el-button size="small" type="primary" v-if="radio === 1" @click="uploadDia = true">导å
¥</el-button> |
| | |
| | | </div> |
| | | <div> |
| | | <el-form :model="itemParameterForm" ref="itemParameterForm" size="small" :inline="true"> |
| | | <el-form-item label="æ£éªé¡¹" prop="inspectionItem" v-if="radio===0"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="itemParameterForm.inspectionItem" @keyup.enter.native="refreshTable()"> |
| | | <el-form-item label="æ£éªé¡¹" prop="inspectionItem" v-if="radio === 0"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="itemParameterForm.inspectionItem" |
| | | @keyup.enter.native="refreshTable()"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ£éªå项" prop="inspectionItemSubclass" v-if="radio===0"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="itemParameterForm.inspectionItemSubclass" @keyup.enter.native="refreshTable()"> |
| | | <el-form-item label="æ£éªå项" prop="inspectionItemSubclass" v-if="radio === 0"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="itemParameterForm.inspectionItemSubclass" |
| | | @keyup.enter.native="refreshTable()"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ£éªå¯¹è±¡" prop="sample"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="itemParameterForm.sample" @keyup.enter.native="refreshTable()"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="itemParameterForm.sample" |
| | | @keyup.enter.native="refreshTable()"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | |
| | | <el-button icon="el-icon-refresh" size="mini" @click="refresh">é ç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <!-- æ£éªé¡¹ç®åæ°è¡¨æ ¼--> |
| | | <div class="table" v-if="radio===0"> |
| | | <lims-table :tableData="tableData" :column="column" key="tableData" |
| | | @pagination="pagination" :height="'calc(100vh - 290px)'" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | <!-- æ£éªé¡¹ç®åæ°è¡¨æ ¼--> |
| | | <div class="table" v-if="radio === 0"> |
| | | <lims-table :tableData="tableData" :column="column" key="tableData" @pagination="pagination" |
| | | :height="'calc(100vh - 290px)'" :page="page" :tableLoading="tableLoading"></lims-table> |
| | | </div> |
| | | <!-- æ£éªå¯¹è±¡è¡¨æ ¼--> |
| | | <div class="table" v-if="radio===1"> |
| | | <!-- æ£éªå¯¹è±¡è¡¨æ ¼--> |
| | | <div class="table" v-if="radio === 1"> |
| | | <lims-table :tableData="testObjectTableData" :column="testObjectColumn" key="testObjectTableData" |
| | | @pagination="pagination" :height="'calc(100vh - 290px)'" |
| | | :page="testObjectPage" :tableLoading="tableLoading"></lims-table> |
| | | @pagination="pagination" :height="'calc(100vh - 290px)'" :page="testObjectPage" |
| | | :tableLoading="tableLoading"></lims-table> |
| | | </div> |
| | | </div> |
| | | <!--产åç»´æ¤å¼¹æ¡--> |
| | | <el-dialog title="产åç»´æ¤" :visible.sync="diaProduct" width="900px"> |
| | | <lims-table :tableData="productData" :column="productColumn" height="460" |
| | | @pagination="productPagination" |
| | | :page="productPage" :tableLoading="productableLoading"></lims-table> |
| | | <lims-table :tableData="productData" :column="productColumn" height="460" @pagination="productPagination" |
| | | :page="productPage" :tableLoading="productableLoading"></lims-table> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="diaProduct = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="editProduct('add')" :loading="productLoad">æ° å¢</el-button> |
| | |
| | | </el-dialog> |
| | | <!--产åç»´æ¤ç¼è¾--> |
| | | <el-dialog title="æä½äº§åç»´æ¤" :visible.sync="productEditDia" width="400px"> |
| | | <el-form :model="productEditForm" ref="productEditForm" :rules="productRules" label-position="right" label-width="100px"> |
| | | <el-form :model="productEditForm" ref="productEditForm" :rules="productRules" label-position="right" |
| | | label-width="100px"> |
| | | <el-form-item label="产ååç§°" prop="name"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="productEditForm.name"></el-input> |
| | | </el-form-item> |
| | |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="uploadDia" title="æ°æ®å¯¼å
¥" width="500px"> |
| | | <div style="margin: 0 auto;"> |
| | | <el-upload ref="upload" :action="uploadAction" |
| | | :auto-upload="false" :file-list="fileList" |
| | | :headers="token" :limit="1" |
| | | :on-change="beforeUpload" :on-error="onError" :on-success="onSuccess" accept=".xlsx" drag |
| | | name="file"> |
| | | <el-upload ref="upload" :action="uploadAction" :auto-upload="false" :file-list="fileList" :headers="token" |
| | | :limit="1" :on-change="beforeUpload" :on-error="onError" :on-success="onSuccess" accept=".xlsx" drag |
| | | name="file"> |
| | | <i class="el-icon-upload"></i> |
| | | <div class="el-upload__text">å°æä»¶æå°æ¤å¤ï¼æ<em>ç¹å»ä¸ä¼ </em></div> |
| | | </el-upload> |
| | |
| | | <!--æ£éªé¡¹ç®åæ°-ç¼è¾å¼¹æ¡--> |
| | | <EditForm ref="editForm" @refreshList="refreshList1"></EditForm> |
| | | <testObjectEditForm ref="testObjectEditForm" @refreshList="refreshList"></testObjectEditForm> |
| | | <BindPartDialog v-if="bindPartDialog" :bindPartDialog="bindPartDialog" |
| | | :currentRow="currentRow" |
| | | :type="type" |
| | | @closeBindPartDialog="closeBindPartDialog"></BindPartDialog> |
| | | <BindSupplierDensityDialog v-if="bindSupplierDensityDialog" |
| | | :bindSupplierDensityDialog="bindSupplierDensityDialog" |
| | | :currentRow="currentSupplierDensityRow" |
| | | @closeBindPartDialog="closeBindSupplierDensityDialog"></BindSupplierDensityDialog> |
| | | <BindPartDialog v-if="bindPartDialog" :bindPartDialog="bindPartDialog" :currentRow="currentRow" :type="type" |
| | | @closeBindPartDialog="closeBindPartDialog"></BindPartDialog> |
| | | <BindSupplierDensityDialog v-if="bindSupplierDensityDialog" :bindSupplierDensityDialog="bindSupplierDensityDialog" |
| | | :currentRow="currentSupplierDensityRow" @closeBindPartDialog="closeBindSupplierDensityDialog"> |
| | | </BindSupplierDensityDialog> |
| | | <el-dialog title="车é´ç»å®" :visible.sync="workshopVisible" width="400px"> |
| | | <el-form :model="workshopForm" ref="workshopForm" :rules="workshopRules" label-position="right" |
| | | label-width="100px"> |
| | | <el-form-item label="车é´åç§°" prop="workShopId"> |
| | | <el-select v-model="workshopForm.workShopId" placeholder="è¯·éæ©" size="small"> |
| | | <el-option v-for="item in workshopList" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="workshopVisible = false">å æ¶</el-button> |
| | | <el-button :loading="uploading" type="primary" @click="submitWorkshop">确 认</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { |
| | | addProduct, |
| | | delItemParameter, delProduct, delTestObject, selectItemParameterList, selectProductListByObjectId, |
| | | selectTestObjectList, upProduct, |
| | | selectTestObjectList, upProduct, updateWorkShop |
| | | } from "@/api/structural/capability"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import EditForm from "@/views/structural/capabilityAndLaboratory/capabilityComponents/EditForm.vue"; |
| | | import testObjectEditForm from "@/views/structural/capabilityAndLaboratory/capabilityComponents/testObjectEditForm.vue"; |
| | | import {getToken} from "@/utils/auth"; |
| | | import { getToken } from "@/utils/auth"; |
| | | import { obtainItemParameterList } from '@/api/structural/laboratoryScope' |
| | | |
| | | import { selectWorkShop } from "@/api/structural/workshop.js" |
| | | export default { |
| | | name: 'Capability', |
| | | components: {limsTable, EditForm, testObjectEditForm, BindPartDialog, BindSupplierDensityDialog}, |
| | | components: { limsTable, EditForm, testObjectEditForm, BindPartDialog, BindSupplierDensityDialog }, |
| | | data() { |
| | | return { |
| | | uploadAction: process.env.VUE_APP_BASE_API + '/capacityScope/importExcel', |
| | |
| | | tableData: [], |
| | | tableLoading: false, |
| | | column: [ |
| | | {label: 'æ£éªé¡¹', prop: 'inspectionItem'}, |
| | | {label: 'æ£éªé¡¹EN', prop: 'inspectionItemEn'}, |
| | | {label: 'æ£éªå项', prop: 'inspectionItemSubclass'}, |
| | | {label: 'æ£éªå项EN', prop: 'inspectionItemSubclassEn'}, |
| | | {label: 'æ£éªé¡¹åç±»', prop: 'inspectionItemClass'}, |
| | | {label: 'æ£éªé¡¹åç±»EN', prop: 'inspectionItemClassEn'}, |
| | | {label: 'æ£éªå¯¹è±¡', prop: 'sample'}, |
| | | {label: 'åä»·(å
)', prop: 'price'}, |
| | | {label: 'è¯éªå®¤', prop: 'sonLaboratory'}, |
| | | {label: 'è¦æ±æè¿°', prop: 'askTell'}, |
| | | {label: 'è¦æ±å¼', prop: 'ask'}, |
| | | {label: '计éåä½', prop: 'unit'}, |
| | | {label: 'å·¥æ¶(H)', prop: 'manHour'}, |
| | | {label: 'é¢è®¡æ¶é´(H)', prop: 'manDay'}, |
| | | {label: 'å·¥æ¶åç»', prop: 'manHourGroup'}, |
| | | {label: 'å建æ¶é´', prop: 'createTime'}, |
| | | {label: 'ä¿®æ¹æ¶é´', prop: 'updateTime'}, |
| | | {label: 'æ¡ä»¶', prop: 'radiusList'}, |
| | | { label: 'æ£éªé¡¹', prop: 'inspectionItem' }, |
| | | { label: 'æ£éªé¡¹EN', prop: 'inspectionItemEn' }, |
| | | { label: 'æ£éªå项', prop: 'inspectionItemSubclass' }, |
| | | { label: 'æ£éªå项EN', prop: 'inspectionItemSubclassEn' }, |
| | | { label: 'æ£éªé¡¹åç±»', prop: 'inspectionItemClass' }, |
| | | { label: 'æ£éªé¡¹åç±»EN', prop: 'inspectionItemClassEn' }, |
| | | { label: 'æ£éªå¯¹è±¡', prop: 'sample' }, |
| | | { label: 'åä»·(å
)', prop: 'price' }, |
| | | { label: 'è¯éªå®¤', prop: 'sonLaboratory' }, |
| | | { label: 'è¦æ±æè¿°', prop: 'askTell' }, |
| | | { label: 'è¦æ±å¼', prop: 'ask' }, |
| | | { label: '计éåä½', prop: 'unit' }, |
| | | { label: 'å·¥æ¶(H)', prop: 'manHour' }, |
| | | { label: 'é¢è®¡æ¶é´(H)', prop: 'manDay' }, |
| | | { label: 'å·¥æ¶åç»', prop: 'manHourGroup' }, |
| | | { label: 'å建æ¶é´', prop: 'createTime' }, |
| | | { label: 'ä¿®æ¹æ¶é´', prop: 'updateTime' }, |
| | | { label: 'æ¡ä»¶', prop: 'radiusList' }, |
| | | { |
| | | dataType: 'action', |
| | | fixed: 'right', |
| | |
| | | } |
| | | ], |
| | | page: { |
| | | total:0, |
| | | size:10, |
| | | current:1 |
| | | total: 0, |
| | | size: 10, |
| | | current: 1 |
| | | }, |
| | | testObjectTableData: [], |
| | | testObjectColumn: [ |
| | |
| | | minWidth: '130', |
| | | formatData: (params) => { |
| | | let index = this.laboratoryList.findIndex(item => item.value == params) |
| | | if(index > -1) { |
| | | if (index > -1) { |
| | | return this.laboratoryList[index].label |
| | | }else { |
| | | } else { |
| | | return null |
| | | } |
| | | // if (params == 1) { |
| | |
| | | } |
| | | } |
| | | }, |
| | | {label: 'æ£éªå¯¹è±¡', prop: 'specimenName'}, |
| | | {label: 'æ£éªå¯¹è±¡EN', prop: 'specimenNameEn'}, |
| | | {label: '产å', prop: 'product'}, |
| | | {label: '对象代å·', prop: 'code'}, |
| | | {label: '对象类å', prop: 'objectType', |
| | | { label: 'æ£éªå¯¹è±¡', prop: 'specimenName' }, |
| | | { label: 'æ£éªå¯¹è±¡EN', prop: 'specimenNameEn' }, |
| | | { label: '产å', prop: 'product' }, |
| | | { label: '对象代å·', prop: 'code' }, |
| | | { |
| | | label: '对象类å', prop: 'objectType', |
| | | dataType: 'tag', |
| | | formatData: (params) => { |
| | | if (params == 1) { |
| | | return 'åææ' |
| | | } else if (params == 2) { |
| | | return 'æå' |
| | | } else { |
| | | return 'è¾
æ' |
| | | let obj = this.productClassification.find(m => params == m.value) |
| | | if (obj) { |
| | | return obj.label |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return 'success' |
| | | } else if (params == 2) { |
| | | return 'info' |
| | | } else { |
| | | return 'warning' |
| | | } |
| | | }}, |
| | | {label: 'å建人', prop: 'createUserName'}, |
| | | {label: 'æ´æ°äºº', prop: 'updateUserName'}, |
| | | {label: 'å建æ¶é´', prop: 'createTime'}, |
| | | {label: 'æ´æ°æ¶é´', prop: 'updateTime'}, |
| | | }, |
| | | { label: 'å建人', prop: 'createUserName' }, |
| | | { label: 'æ´æ°äºº', prop: 'updateUserName' }, |
| | | { label: 'å建æ¶é´', prop: 'createTime' }, |
| | | { label: 'æ´æ°æ¶é´', prop: 'updateTime' }, |
| | | { |
| | | dataType: 'action', |
| | | fixed: 'right', |
| | |
| | | this.upProduct(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'é¶ä»¶ç»å®', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.bindPartFirst(row); |
| | | }, |
| | | }, |
| | | // { |
| | | // name: 'é¶ä»¶ç»å®', |
| | | // type: 'text', |
| | | // clickFun: (row) => { |
| | | // this.bindPartFirst(row); |
| | | // }, |
| | | // }, |
| | | ] |
| | | } |
| | | ], |
| | | testObjectPage: { |
| | | total:0, |
| | | size:10, |
| | | current:0 |
| | | total: 0, |
| | | size: 10, |
| | | current: 0 |
| | | }, |
| | | addOrUpdate: '', |
| | | tree: null, |
| | |
| | | productLoad: false, |
| | | diaProduct: false, |
| | | productColumn: [ |
| | | {label: '产ååç§°', prop: 'name'}, |
| | | {label: '产ååç§°EN', prop: 'nameEn'}, |
| | | { label: '产ååç§°', prop: 'name' }, |
| | | { label: '产ååç§°EN', prop: 'nameEn' }, |
| | | { label: '车é´åç§°', prop: 'workShopName' }, |
| | | { |
| | | dataType: 'action', |
| | | label: 'æä½', |
| | |
| | | }, |
| | | }, |
| | | { |
| | | name: '车é´ç»å®', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.bindWokshop(row); |
| | | }, |
| | | showHide: (row) => { |
| | | if (this.currentObj.objectType != 'åææ') { |
| | | return false |
| | | } else { |
| | | return true |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | name: 'åå®¶å¯åº¦ç»å®', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | |
| | | ], |
| | | productData: [], |
| | | productPage: { |
| | | total:0, |
| | | size:10, |
| | | current:1, |
| | | total: 0, |
| | | size: 10, |
| | | current: 1, |
| | | layout: 'total, prev, pager, next' |
| | | }, |
| | | productableLoading: false, |
| | |
| | | }, |
| | | uploadDia: false, |
| | | fileList: [], |
| | | token: {Authorization: "Bearer " + getToken()}, |
| | | token: { Authorization: "Bearer " + getToken() }, |
| | | uploading: false, |
| | | currentRow: {}, // éæ©é¶ä»¶ç»å®æ¬æ¡æ°æ®çä¿¡æ¯ |
| | | currentSupplierDensityRow: {}, // éæ©é¶ä»¶ç»å®æ¬æ¡æ°æ®çä¿¡æ¯ |
| | | bindSupplierDensityDialog: false, |
| | | bindPartDialog: false, |
| | | type: null, // é¶ä»¶ç»å®çç±»å--0ï¼æ£éªå¯¹è±¡ï¼1ï¼äº§åç»´æ¤, |
| | | laboratoryList:[] |
| | | laboratoryList: [], |
| | | productClassification: [],//产åç±»å |
| | | currentObj: {},//å½å对象 |
| | | currentProduct: {},//å½å产å |
| | | workshopVisible: false, |
| | | workshopForm: {}, |
| | | workshopRules: { |
| | | workShopId: [{ required: true, message: 'è¯·éæ©è½¦é´', trigger: 'change' }] |
| | | }, |
| | | workshopList: [],//车é´å表 |
| | | } |
| | | }, |
| | | created() { |
| | | this.getItemParameterList() |
| | | this.refreshTable() |
| | | this.getDicts("product_classification").then((response) => { |
| | | this.productClassification = this.dictToValue(response.data); |
| | | }); |
| | | this.selectWorkShop() |
| | | }, |
| | | computed: { |
| | | title() { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | selectWorkShop() { |
| | | selectWorkShop({ size: -1, current: -1 }).then(res => { |
| | | this.workshopList = res.data.records |
| | | }) |
| | | }, |
| | | submitUpload() { |
| | | if (this.$refs.upload.uploadFiles.length === 0) { |
| | | this.$message.error('æªéæ©æä»¶') |
| | |
| | | return true; |
| | | } |
| | | }, |
| | | handleSuccessUp1 (response, file, fileList) { |
| | | handleSuccessUp1(response, file, fileList) { |
| | | this.$refs.upload1.clearFiles() |
| | | if (response.code !== 200) { |
| | | this.$message.error(response.msg) |
| | |
| | | this.$message.success('ä¸ä¼ æå') |
| | | this.refreshTable() |
| | | }, |
| | | refreshList () { |
| | | refreshList() { |
| | | this.refreshTable() |
| | | }, |
| | | refreshList1 () { |
| | | refreshList1() { |
| | | this.refreshTable() |
| | | }, |
| | | refreshTable() { |
| | | this.tableLoading = true |
| | | if (this.radio === 0) { |
| | | selectItemParameterList({...this.page, ...this.itemParameterForm}).then(res => { |
| | | selectItemParameterList({ ...this.page, ...this.itemParameterForm }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records |
| | |
| | | this.tableLoading = false |
| | | }) |
| | | } else { |
| | | selectTestObjectList({...this.testObjectPage, ...this.itemParameterForm}).then(res => { |
| | | selectTestObjectList({ ...this.testObjectPage, ...this.itemParameterForm }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 200) { |
| | | this.testObjectTableData = res.data.records |
| | |
| | | this.page.current = 1 |
| | | this.refreshTable() |
| | | }, |
| | | pagination (page) { |
| | | pagination(page) { |
| | | this.page.size = page.limit |
| | | this.refreshTable() |
| | | }, |
| | |
| | | } |
| | | }, |
| | | // æ£éªé¡¹ç®åæ°-æå¼ä¿®æ¹å¼¹æ¡ |
| | | editForm (row) { |
| | | editForm(row) { |
| | | this.$refs.editForm.openDia('edit', row) |
| | | }, |
| | | // æ£éªé¡¹ç®åæ°-å é¤ |
| | | delete (row) { |
| | | delete(row) { |
| | | this.$confirm('æ¤æä½å°å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | delItemParameter({id:row.id}).then(res => { |
| | | delItemParameter({ id: row.id }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('å 餿å') |
| | | this.refreshTable(); |
| | |
| | | }) |
| | | }, |
| | | // æ£éªå¯¹è±¡-æå¼ä¿®æ¹å¼¹æ¡ |
| | | editTestObjectForm (row) { |
| | | editTestObjectForm(row) { |
| | | this.$refs.testObjectEditForm.openDia('edit', row) |
| | | }, |
| | | // æ£éªé¡¹ç®åæ°-å é¤ |
| | | deleteTest (row) { |
| | | deleteTest(row) { |
| | | this.$confirm('æ¤æä½å°å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | delTestObject({id:row.id}).then(res => { |
| | | delTestObject({ id: row.id }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('å 餿å') |
| | | this.refreshTable(); |
| | |
| | | }, |
| | | // 产åç»´æ¤ |
| | | upProduct(row) { |
| | | this.currentObj = row; |
| | | if (this.currentObj.objectType == 'åææ') { |
| | | if (this.productColumn.length < 4) { |
| | | this.productColumn.splice(2, 0, { label: '车é´åç§°', prop: 'workShopName' }) |
| | | } |
| | | } else { |
| | | if (this.productColumn.length == 4) { |
| | | this.productColumn.splice(2, 1) |
| | | } |
| | | } |
| | | this.diaProduct = true |
| | | this.objectId = row.id |
| | | this.productPage.current = 1 |
| | | this.getProductList(row) |
| | | }, |
| | | // æ¥è¯¢äº§åç»´æ¤åè¡¨æ°æ® |
| | | getProductList () { |
| | | getProductList() { |
| | | const params = { |
| | | objectId: this.objectId, |
| | | } |
| | | this.productableLoading = true |
| | | selectProductListByObjectId({...params, ...this.productPage}).then(res => { |
| | | selectProductListByObjectId({ ...params, ...this.productPage }).then(res => { |
| | | this.productableLoading = false |
| | | this.productData = res.data.records |
| | | this.productPage.total = res.data.total |
| | |
| | | this.getProductList() |
| | | }, |
| | | // 产åç»´æ¤-æ°å¢-ç¼è¾ |
| | | editProduct (type, row) { |
| | | editProduct(type, row) { |
| | | this.productEditDia = true |
| | | this.operationType = type |
| | | if (type === 'edit') { |
| | |
| | | } |
| | | }, |
| | | // æäº¤äº§åç»´æ¤ä¿®æ¹ |
| | | submitProduct () { |
| | | submitProduct() { |
| | | this.$refs['productEditForm'].validate((valid) => { |
| | | if (valid) { |
| | | this.uploading = true |
| | |
| | | this.productEditDia = false |
| | | }, |
| | | // 产åç»´æ¤-å é¤ |
| | | deleteProduct (row) { |
| | | deleteProduct(row) { |
| | | this.$confirm('æ¤æä½å°å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | delProduct({id:row.id}).then(res => { |
| | | delProduct({ id: row.id }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('å 餿å') |
| | | this.getProductList(); |
| | |
| | | }) |
| | | }, |
| | | // é¶ä»¶ç»å® |
| | | bindPartFirst (row) { |
| | | bindPartFirst(row) { |
| | | this.bindPart(row, 0) |
| | | }, |
| | | bindPartSecond (row) { |
| | | bindPartSecond(row) { |
| | | this.bindPart(row, 1) |
| | | }, |
| | | bindWokshop(row) { |
| | | this.currentProduct = row; |
| | | this.workshopVisible = true |
| | | }, |
| | | // åå®¶å¯åº¦ç»å® |
| | | bindSupplierDensitySecond (row) { |
| | | bindSupplierDensitySecond(row) { |
| | | this.bindSupplierDensity(row) |
| | | }, |
| | | // æå¼åå®¶å¯åº¦ç»å®å¼¹æ¡ |
| | | bindSupplierDensity (row) { |
| | | bindSupplierDensity(row) { |
| | | this.currentSupplierDensityRow = row |
| | | this.bindSupplierDensityDialog = true |
| | | }, |
| | | // æå¼é¶ä»¶ç»å®å¼¹æ¡ |
| | | bindPart (row, index) { |
| | | bindPart(row, index) { |
| | | this.type = index |
| | | this.currentRow = row |
| | | this.bindPartDialog = true |
| | | }, |
| | | closeBindPartDialog () { |
| | | closeBindPartDialog() { |
| | | this.bindPartDialog = false |
| | | }, |
| | | closeBindSupplierDensityDialog () { |
| | | closeBindSupplierDensityDialog() { |
| | | this.bindSupplierDensityDialog = false |
| | | }, |
| | | getItemParameterList(){ |
| | | getItemParameterList() { |
| | | obtainItemParameterList().then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | |
| | | }) |
| | | this.laboratoryList = data |
| | | }) |
| | | }, |
| | | // ç»å®è½¦é´ |
| | | submitWorkshop() { |
| | | this.$refs['workshopForm'].validate((valid) => { |
| | | if (valid) { |
| | | this.uploading = true |
| | | updateWorkShop({ |
| | | id: this.currentProduct.id, |
| | | workShopId: this.workshopForm.workShopId, |
| | | name: this.workshopList.find(m => m.id == this.workshopForm.workShopId).name |
| | | }).then(res => { |
| | | this.uploading = false |
| | | if (res.code === 200) { |
| | | this.$message.success('æ°å¢æå') |
| | | this.getProductList(); |
| | | this.workshopVisible = false |
| | | } |
| | | }).catch(err => { |
| | | this.uploading = false |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :title="operationType === 'add' ? 'æ°å¢' : 'ç¼è¾'" :visible.sync="editFormDia" width="500px" @close="closeDia"> |
| | | <el-dialog :title="operationType === 'add' ? 'æ°å¢' : 'ç¼è¾'" :visible.sync="editFormDia" width="500px" |
| | | @close="closeDia"> |
| | | <el-form ref="editForm" :model="editForm" :rules="editFormRules" label-width="120px" label-position="right"> |
| | | <el-form-item label="åºæï¼" prop="laboratoryId"> |
| | | <el-select v-model="editForm.laboratoryId" clearable placeholder="è¯·éæ©" size="small" style="width: 100%"> |
| | | <el-option v-for="item in laboratoryList" :key="item.value" :label="item.label" :value="item.value"></el-option> |
| | | <el-option v-for="item in laboratoryList" :key="item.value" :label="item.label" |
| | | :value="item.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ£éªå¯¹è±¡ï¼" prop="specimenName"> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="对象类åï¼" prop="objectType"> |
| | | <el-select v-model="editForm.objectType" clearable placeholder="è¯·éæ©" size="small" style="width: 100%"> |
| | | <el-option v-for="item in dict.type.object_type" :key="item.value" :label="item.label" :value="item.value"></el-option> |
| | | <el-option v-for="item in dict.type.product_classification" :key="item.value" :label="item.label" |
| | | :value="item.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | |
| | | <script> |
| | | |
| | | import {obtainItemParameterList} from "@/api/structural/laboratoryScope"; |
| | | import {addTestObject, upTestObject} from "@/api/structural/capability"; |
| | | import { obtainItemParameterList } from "@/api/structural/laboratoryScope"; |
| | | import { addTestObject, upTestObject } from "@/api/structural/capability"; |
| | | |
| | | export default { |
| | | name: "EditForm", |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | dicts: ['object_type'], |
| | | dicts: ['product_classification'], |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia (type, row) { |
| | | openDia(type, row) { |
| | | this.operationType = type |
| | | this.obtainItemParameterList() |
| | | this.editFormDia = true |
| | | if (type === 'add') { |
| | | this.resetForm("editForm"); |
| | | } else { |
| | | this.editForm = {...row} |
| | | this.editForm = { ...row } |
| | | } |
| | | }, |
| | | // æäº¤ç¼è¾ |
| | | handleEdit () { |
| | | handleEdit() { |
| | | this.$refs.editForm.validate(valid => { |
| | | if (valid) { |
| | | this.editLoad = true |
| | | if(this.editForm.id){ |
| | | if (this.editForm.id) { |
| | | // ä¿®æ¹ |
| | | upTestObject(this.editForm).then(res => { |
| | | this.editLoad = false |
| | |
| | | }).catch(e => { |
| | | this.editLoad = false |
| | | }) |
| | | }else{ |
| | | } else { |
| | | // æ°å¢ |
| | | addTestObject(this.editForm).then(res => { |
| | | this.editLoad = false |
| | |
| | | }) |
| | | }, |
| | | // å
³éå¼¹æ¡ |
| | | closeDia () { |
| | | closeDia() { |
| | | this.editFormDia = false |
| | | this.resetForm("editForm"); |
| | | }, |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | | <style scoped></style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div style="margin-bottom: 10px"> |
| | | <el-upload ref='upload' :action="fileAction" :auto-upload="true" :before-upload="fileBeforeUpload" |
| | | :data="{ id: currentId }" :headers="uploadHeader" :on-error="onError" :on-success="handleSuccessUp" |
| | | :show-file-list="false" accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' |
| | | style="width: 80px !important;"> |
| | | <el-button size="small" style="height: 38px" type="primary">éä»¶ä¸ä¼ </el-button> |
| | | </el-upload> |
| | | </div> |
| | | <lims-table :tableData="tableDataFile" :column="columnFile" height="500px" key="tableDataFile" |
| | | :tableLoading="tableLoadingFile"></lims-table> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { fileList, delFile } from "@/api/structural/workshop.js" |
| | | export default { |
| | | components: { |
| | | limsTable, |
| | | }, |
| | | props: ['currentId'], |
| | | computed: { |
| | | fileAction() { |
| | | return this.javaApi + '/workShop/uploadFile' |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | columnFile: [ |
| | | { |
| | | dataType: 'tag', |
| | | label: 'ç±»å', |
| | | prop: 'type', |
| | | formatData: (params) => { |
| | | if (params == 1) { |
| | | return 'å¾ç' |
| | | } else if (params == 2) { |
| | | return 'æä»¶' |
| | | } else { |
| | | return '' |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return 'success' |
| | | } else if (params == 2) { |
| | | return 'warning' |
| | | } else { |
| | | return '' |
| | | } |
| | | } |
| | | }, |
| | | { label: 'éä»¶åç§°', prop: 'fileName' }, |
| | | { label: 'ä¸ä¼ 人', prop: 'name' }, |
| | | { label: 'ä¸ä¼ æ¶é´', prop: 'createTime' }, |
| | | { |
| | | dataType: 'action', |
| | | fixed: 'right', |
| | | label: 'æä½', |
| | | width: '170px', |
| | | operation: [ |
| | | { |
| | | name: 'ä¸è½½', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDown(row); |
| | | } |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.delete(row); |
| | | } |
| | | }, |
| | | ] |
| | | } |
| | | ], |
| | | tableDataFile: [], |
| | | tableLoadingFile: false, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getFileList() |
| | | }, |
| | | methods: { |
| | | // æ¥è¯¢éä»¶æ¥çå表åè° |
| | | getFileList() { |
| | | this.tableLoadingFile = true |
| | | fileList({ id: this.currentId }).then(res => { |
| | | this.tableLoadingFile = false |
| | | if (res.code === 200) { |
| | | this.tableDataFile = res.data |
| | | } |
| | | }).catch(err => { |
| | | this.tableLoadingFile = false |
| | | }) |
| | | }, |
| | | fileBeforeUpload(file) { |
| | | let flag = true |
| | | console.log('file----', file) |
| | | if (file.size > 1024 * 1024 * 10) { |
| | | this.$message.error('ä¸ä¼ æä»¶ä¸è¶
è¿10M'); |
| | | this.$refs.upload.clearFiles() |
| | | flag = false |
| | | } |
| | | if (!flag) { |
| | | return Promise.reject(flag); //æ£ç¡®çç»æ¢ |
| | | } |
| | | }, |
| | | handleSuccessUp(response,) { |
| | | this.upLoading = false; |
| | | if (response.code == 200) { |
| | | this.$message.success('ä¸ä¼ æå'); |
| | | this.getFileList() |
| | | } |
| | | }, |
| | | // ä¸è½½éä»¶çæä»¶ |
| | | handleDown(row) { |
| | | downFile({ |
| | | id: row.id, |
| | | }).then(res => { |
| | | this.$download.saveAs(res.data.fileUrl, row.fileName); |
| | | }).catch(error => { |
| | | |
| | | }) |
| | | }, |
| | | // å é¤éä»¶æä»¶ |
| | | delete(row) { |
| | | this.$confirm('æ¤æä½å°å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.tableLoadingFile = true |
| | | delFile({ id: row.id }).then(res => { |
| | | this.tableLoadingFile = false |
| | | this.$message.success('å 餿å') |
| | | this.getFileList() |
| | | }).catch(err => { |
| | | this.tableLoadingFile = false |
| | | console.log('err---', err); |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }) |
| | | }, |
| | | onError(err, file, fileList, type) { |
| | | this.$message.error('ä¸ä¼ 失败') |
| | | this.$refs.upload.clearFiles() |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped></style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="workshop"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">åç§°ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="queryParams.name" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </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> |
| | | <el-button size="small" type="primary" style="position: absolute; right: 50px" @click="openAdd('æ°å¢')">æ° |
| | | å¢</el-button> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 260px)'" |
| | | :page="page" @pagination="pagination"></lims-table> |
| | | </div> |
| | | <!-- æ°å¢/ç¼è¾ --> |
| | | <el-dialog :title="title" :visible.sync="addDia" width="500px"> |
| | | <el-form :model="addForm" ref="addForm" :rules="addRules" label-position="right" label-width="120px"> |
| | | <el-form-item label="车é´åç§°" prop="name"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="addForm.name"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="addDia = false">å æ¶</el-button> |
| | | <el-button :loading="uploading" type="primary" @click="submitProduct('addForm')">确 认</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="filesDialogVisible" title="éä»¶æ¥ç" width="80%"> |
| | | <fileList :currentId="id" /> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import fileList from "./components/fileList.vue" |
| | | import { selectWorkShop, delWorkShop, addOrUpdateWorkShop } from "@/api/structural/workshop.js" |
| | | export default { |
| | | components: { |
| | | limsTable, |
| | | fileList, |
| | | }, |
| | | data() { |
| | | return { |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "车é´", prop: "name" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | // handleDelete |
| | | operation: [ |
| | | { |
| | | name: "éä»¶", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleLookFile(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.openAdd('ç¼è¾', row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | filesDialogVisible: false, |
| | | id: null, |
| | | addDia: false, |
| | | addRules: { |
| | | name: [{ required: true, message: "请è¾å
¥è½¦é´åç§°", trigger: "blur" }], |
| | | }, |
| | | title: 'æ°å¢', |
| | | addForm: {}, |
| | | uploading: false, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getList() |
| | | }, |
| | | methods: { |
| | | // æ¥çéä»¶ |
| | | handleLookFile(row) { |
| | | this.filesDialogVisible = true; |
| | | this.id = row.id |
| | | }, |
| | | // å表å页 |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.page }; |
| | | delete param.total; |
| | | selectWorkShop({ ...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(); |
| | | }, |
| | | // æ°å¢/ç¼è¾è½¦é´ |
| | | openAdd(title, row) { |
| | | this.title = title; |
| | | if (row) { |
| | | this.addForm = row; |
| | | } else { |
| | | this.addForm = {}; |
| | | } |
| | | this.addDia = true; |
| | | }, |
| | | submitProduct(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | this.uploading = true; |
| | | if (this.title == "æ°å¢") { |
| | | addOrUpdateWorkShop(this.addForm) |
| | | .then((res) => { |
| | | this.uploading = false; |
| | | if (res.code != 200) { |
| | | return; |
| | | } |
| | | this.$message.success("æäº¤æå"); |
| | | this.refresh(); |
| | | this.addDia = false; |
| | | }) |
| | | .catch((err) => { |
| | | this.uploading = false; |
| | | }); |
| | | } else { |
| | | addOrUpdateWorkShop(this.addForm) |
| | | .then((res) => { |
| | | this.uploading = false; |
| | | if (res.code != 200) { |
| | | return; |
| | | } |
| | | this.$message.success("æäº¤æå"); |
| | | this.refresh(); |
| | | this.addDia = false; |
| | | }) |
| | | .catch((err) => { |
| | | this.uploading = false; |
| | | }); |
| | | } |
| | | } else { |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | delWorkShop({ id: row.id }).then((res) => { |
| | | console.log('res', res) |
| | | if (res.code == 200) { |
| | | this.$message.success("å 餿å"); |
| | | this.refresh(); |
| | | } |
| | | }); |
| | | }) |
| | | .catch(() => { }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .search { |
| | | background-color: #fff; |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 250px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 70px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 70px); |
| | | } |
| | | |
| | | .table { |
| | | padding: 10px; |
| | | padding-top: 0; |
| | | } |
| | | </style> |
| | |
| | | proxy: { |
| | | // detail: https://cli.vuejs.org/config/#devserver-proxy |
| | | [process.env.VUE_APP_BASE_API]: { |
| | | target: `http://localhost:8001`, |
| | | target: `http://10.21.10.74:8089`, |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | ["^" + process.env.VUE_APP_BASE_API]: "", |