Commit 0e908513 authored by 仇晓婷's avatar 仇晓婷

Merge branch 'qin'

parents 6307ab39 7e5aa41a
......@@ -40,8 +40,8 @@
</div>
</template>
<script>
import Api from './api'
import expandRow from './table-expand.vue'
import Api from "./api";
import expandRow from "./table-expand.vue";
export default {
components: { expandRow },
......@@ -53,142 +53,144 @@ export default {
list: [],
columns: [
{
type: 'expand',
type: "expand",
width: 50,
render: (h, params) => {
return h(expandRow, {
props: {
row: params.row
}
})
});
}
},
{
title: '超期预警',
key: 'id',
align: 'center',
title: "超期预警",
key: "id",
align: "center",
render: (h, params) => {
return h('div', [
h('Icon', {
return h("div", [
h("Icon", {
props: {
type:
params.row.id == 1
? 'ios-information-circle-outline'
: 'ios-remove-circle-outline'
? "ios-information-circle-outline"
: "ios-remove-circle-outline"
},
style: {
marginRight: '5px',
fontSize: '18px',
fontWeight: 'bold',
color: params.row.id == 1 ? '#FE7777' : '#0DD78D'
marginRight: "5px",
fontSize: "18px",
fontWeight: "bold",
color: params.row.id == 1 ? "#FE7777" : "#0DD78D"
}
})
])
]);
}
},
{
title: '零件图号',
key: 'part_id',
align: 'center'
title: "零件图号",
key: "part_id",
align: "center"
},
{
title: '零件名称',
key: 'part_name',
align: 'center'
title: "零件名称",
key: "part_name",
align: "center"
},
{
title: '计划开始时间',
key: 'plan_start',
title: "计划开始时间",
key: "plan_start",
width: 220,
align: 'center'
align: "center"
},
{
title: '计划结束时间',
key: 'plan_start',
title: "计划结束时间",
key: "plan_start",
width: 220,
align: 'center'
align: "center"
},
{
title: '投料时间',
key: 'demand_start',
title: "投料时间",
key: "demand_start",
width: 220,
align: 'center'
align: "center"
},
{
title: '节点时间',
key: 'demand_finish',
title: "节点时间",
key: "demand_finish",
width: 220,
align: 'center'
align: "center"
},
{
title: '计划数量',
key: 'plan_qty',
align: 'center'
title: "计划数量",
key: "plan_qty",
align: "center"
}
]
}
};
},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
await store.dispatch("loadDictionary"); // 加载数据字典
},
created() {
this.orderlist()
this.orderlist();
},
methods: {
orderlist() {
Api.getall()
.then((r) => {
.then(r => {
if (r.success) {
this.list = r.result
this.list = r.result;
if (r.result) {
this.listData(r.result[0].schedule_Id, 0)
this.listData(r.result[0].schedule_Id, 0);
} else {
this.listData(0, null)
this.listData(0, null);
}
}
})
.catch((error) => {
this.$$Message.error('请求失败')
})
.catch(error => {
this.$$Message.error("请求失败");
});
},
listData(id, index) {
this.isactive = index
this.isactive = index;
Api.paged({ scheduleId: id })
.then((r) => {
.then(r => {
if (r.success) {
this.data = r.result
this.data = r.result;
}
})
.catch((error) => {
this.$$Message.error('请求失败')
})
.catch(error => {
this.$$Message.error("请求失败");
});
},
clear() {
this.$Modal.confirm({
title: '清空列表',
content: '您确定要清空列表吗',
onOk: () => {
Api.clearall().then((r) => {
if (r.success) {
this.$Message.success('清空列表成功')
this.orderlist()
}
})
},
onCancel: () => {
this.$Message.info('已取消')
}
})
if (this.list.lenght > 0) {
this.$Modal.confirm({
title: "清空列表",
content: "您确定要清空列表吗",
onOk: () => {
Api.clearall().then(r => {
if (r.success) {
this.$Message.success("清空列表成功");
this.orderlist();
}
});
},
onCancel: () => {
this.$Message.info("已取消");
}
});
}
},
parameter() {},
addOk() {},
cancel() {},
comeBlck() {
this.$router.push({ path: '/aps/aps' })
this.$router.push({ path: "/aps/aps" });
}
}
}
};
</script>
<style lang="less" scoped>
.results {
......
......@@ -2,7 +2,7 @@ import dashboard from './modules/dashboard';
import BasicLayout from '@/layouts/basic-layout';
/**
* 在主框架内显示
* 在主框架内显示22222222222222
*/
const frameIn = [
......
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