工作中心

master
A0010407 1 year ago
parent d3c219c0e8
commit c7999233fb

@ -77,3 +77,12 @@ export function listBom(query) {
params: query
});
}
// 查询工作中心
export function listFactory(query) {
return request({
url: '/technology/pro/process/selectSysFactoryList',
method: 'get',
params: query
});
}

@ -188,11 +188,6 @@
<el-input-number :min="0" :step="1" v-model="form.workTime" placeholder="请输入工作时长" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="工作中心" prop="workCenter">
<el-input v-model="form.workCenter" type="input" placeholder="请输入工作中心" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
@ -222,6 +217,20 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="工作中心" prop="workCenter">
<el-cascader
:options="factoryOptions"
:props="workCenter"
v-model="form.workCenter"
placeholder="请选择工作中心"
clearable
style="width:430px"
></el-cascader>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row>
<el-col :span="8">
<el-form-item label="参数1温度" prop="param1">
@ -273,10 +282,12 @@
</template>
<script>
import { listProcess, getProcess, delProcess, addProcess, updateProcess ,listEquipment,getEquipment} from "@/api/technology/process";
import { listProcess, getProcess, delProcess, addProcess, updateProcess ,listEquipment,getEquipment,listFactory} from "@/api/technology/process";
import Processcontent from "./content.vue";
import ItemSelect from "./single.vue";
import { Message } from 'element-ui'
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "Process",
@ -284,6 +295,7 @@ export default {
components: {Processcontent,ItemSelect},
data() {
return {
workCenter: { multiple: true,label:'factoryName',value:'factoryId',children:'children' },
checkEquipment:null,
//
autoGenFlag:false,
@ -305,6 +317,8 @@ export default {
//
processList:[],
equipmentList:[],
//
factoryOptions: [],
//
title: "",
boundTitle:"",
@ -312,10 +326,6 @@ export default {
open: false,
boundeEuipmentOpen:false,
equipmentTypeName : undefined,
defaultProps: {
children: "children",
label: "label"
},
//
queryParams: {
pageNum: 1,
@ -361,15 +371,24 @@ export default {
created() {
this.getList();
this.getEquipmentList();
this.getTreeselect();
},
methods: {
activated(){
this.useTypeKey +=1
},
handleEquipmentSelectionChange (val) {
this.equipmentList = val
},
handleEquipmentSelectionChange (val) {
this.equipmentList = val
},
// A001
getTreeselect() {
listFactory().then(response => {
this.factoryOptions = [];
const data = { factoryId: 1, factoryName: '中山榄菊日化实业有限公司', children: [] };
data.children = this.handleTree(response.data, "factoryId", "parentId");
this.factoryOptions.push(data);
});
},
/** 查询物料信息列表 */
getEquipmentList() {
this.loading = true;

Loading…
Cancel
Save