Commit 013306a1 authored by renjintao's avatar renjintao

自定义排序模板

parent c04868b7
<template> <template>
<div class="parameter"> <div class="parameter">
<div v-if="load" style="width:100px;margin:0 auto;padding-top:60px;">
<Spin size="large"></Spin>
</div>
<div v-show="!load">
<Form ref="form" label-position="top" :model="entity" :rules="rules"> <Form ref="form" label-position="top" :model="entity" :rules="rules">
<Row :gutter="24"> <Row :gutter="24">
<Col span="24" style="height:80px;"> <Col span="24" style="height:80px;">
...@@ -47,6 +51,7 @@ ...@@ -47,6 +51,7 @@
</Col> </Col>
</Row> </Row>
</div> </div>
</div>
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
...@@ -64,7 +69,8 @@ export default { ...@@ -64,7 +69,8 @@ export default {
listTempShort: [], listTempShort: [],
rules: { rules: {
tempName: [{ required: true, message: "必填", trigger: "blur" }] tempName: [{ required: true, message: "必填", trigger: "blur" }]
} },
load: true
}; };
}, },
props: {}, props: {},
...@@ -109,10 +115,10 @@ export default { ...@@ -109,10 +115,10 @@ export default {
tempList = r.result.templateList; tempList = r.result.templateList;
this.tempDataList = tempList; this.tempDataList = tempList;
this.entity.id = r.result.id; this.entity.id = r.result.id;
this.entity.tempName = ''; this.entity.tempName = "";
//this.entity.tempName = r.result.templateName; //this.entity.tempName = r.result.templateName;
this.outInfo(tempList); this.outInfo(tempList);
this.$emit("changeStatu",r.result.id); this.$emit("changeStatu", r.result.id);
} }
}); });
}, },
...@@ -135,6 +141,7 @@ export default { ...@@ -135,6 +141,7 @@ export default {
this.tempInfo += data.name.substr(0, data.name.length - 2) + "-->"; this.tempInfo += data.name.substr(0, data.name.length - 2) + "-->";
} }
}); });
this.load = false;
this.tempInfo = this.tempInfo.substring(0, this.tempInfo.length - 3); this.tempInfo = this.tempInfo.substring(0, this.tempInfo.length - 3);
this.entity.tempInfo = this.tempInfo; this.entity.tempInfo = this.tempInfo;
}, },
...@@ -157,9 +164,9 @@ export default { ...@@ -157,9 +164,9 @@ export default {
name: this.entity.tempName, name: this.entity.tempName,
info: this.entity.tempInfo info: this.entity.tempInfo
}; };
this.$emit("on-ok",paramsData); this.$emit("on-ok", paramsData);
this.$emit("on-close"); this.$emit("on-close");
this.$emit("changeStatu",0); this.$emit("changeStatu", 0);
} else { } else {
this.$Message.error("新增失败"); this.$Message.error("新增失败");
this.$emit("on-close"); this.$emit("on-close");
......
...@@ -42,17 +42,19 @@ export default { ...@@ -42,17 +42,19 @@ export default {
align: "left", align: "left",
render: (h, params) => { render: (h, params) => {
return h( return h(
'Tooltip', "Tooltip",
{ {
props: { props: {
content: params.row.name+":时间节点-->批量工时-->工序数量-->生产关重-->紧急程度-->生产类型【批产-->研制-->工装-->协外】", content:
placement: 'left-start', params.row.name +
transfer:'true', ":时间节点-->批量工时-->工序数量-->生产关重-->紧急程度-->生产类型【批产-->研制-->工装-->协外】",
maxWidth:'800' placement: "left-start",
}, transfer: "true",
maxWidth: "800"
}
}, },
params.row.name params.row.name
) );
} }
}, },
{ {
...@@ -90,7 +92,9 @@ export default { ...@@ -90,7 +92,9 @@ export default {
mounted() {}, mounted() {},
methods: { methods: {
addTempModal() { addTempModal() {
if (this.add == null) {
this.add = () => import("./addTemp"); this.add = () => import("./addTemp");
}
}, },
handleSubmit() { handleSubmit() {
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
...@@ -117,14 +121,13 @@ export default { ...@@ -117,14 +121,13 @@ export default {
}, },
addData(obj) { addData(obj) {
//this.data.splice(0, 0,obj); //this.data.splice(0, 0,obj);
this.data.push(obj) this.data.push(obj);
}, },
cancel() { cancel() {
this.add = null; this.add = null;
}, },
changeStatu(val) changeStatu(val) {
{ this.$emit("changeStatu", val);
this.$emit("changeStatu",val)
}, },
l(key) { l(key) {
let vkey = "mes_op_task_plan_simulate" + "." + key; let vkey = "mes_op_task_plan_simulate" + "." + key;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment