Merge branch 'master' of https://e.coding.net/ctcdevteam/ehs/ehs_web
This commit is contained in:
commit
a9cb7c918b
|
@ -0,0 +1,64 @@
|
||||||
|
import config from "@/config"
|
||||||
|
import http from "@/utils/request"
|
||||||
|
/*公告视频接口*/
|
||||||
|
export default {
|
||||||
|
article: {
|
||||||
|
list: {
|
||||||
|
name: "获取列表",
|
||||||
|
req: async function(data){
|
||||||
|
return await http.get(
|
||||||
|
`${config.API_URL}/cms/article/`,
|
||||||
|
data
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
item: {
|
||||||
|
name: "获取详情",
|
||||||
|
req: async function(id){
|
||||||
|
return await http.get(
|
||||||
|
`${config.API_URL}/cms/article/${id}/`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
cquery: {
|
||||||
|
name: "复杂查询",
|
||||||
|
req: async function(data){
|
||||||
|
return await http.post(
|
||||||
|
`${config.API_URL}/cms/article/cquery/`,
|
||||||
|
data);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
update: {
|
||||||
|
name: "编辑更新",
|
||||||
|
req: async function(id, data){
|
||||||
|
return await http.put(
|
||||||
|
`${config.API_URL}/cms/article/${id}/`,
|
||||||
|
data);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
create: {
|
||||||
|
name: "新增",
|
||||||
|
req: async function(data){
|
||||||
|
return await http.post(
|
||||||
|
`${config.API_URL}/cms/article/`,
|
||||||
|
data);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
delete: {
|
||||||
|
name: "删除",
|
||||||
|
req: async function(id){
|
||||||
|
return await http.delete(
|
||||||
|
`${config.API_URL}/cms/article/${id}/`);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toggle_top: {
|
||||||
|
name: "文章置顶/取消",
|
||||||
|
req: async function(id, data){
|
||||||
|
return await http.put(
|
||||||
|
`${config.API_URL}/cms/article/${id}/toggle_top/`,
|
||||||
|
data);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
}
|
|
@ -27,7 +27,15 @@
|
||||||
option: {
|
option: {
|
||||||
deep:true,
|
deep:true,
|
||||||
handler (v) {
|
handler (v) {
|
||||||
unwarp(this.myChart).setOption(v);
|
let that = this;
|
||||||
|
if(that.myChart!==null){
|
||||||
|
that.myChart.setOption(v);
|
||||||
|
}else{
|
||||||
|
let myChart = echarts.init(that.$refs.scEcharts, 'T');
|
||||||
|
myChart.setOption(v);
|
||||||
|
that.myChart = myChart;
|
||||||
|
}
|
||||||
|
// unwarp(this.myChart).setOption(v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -92,6 +92,7 @@ export default {
|
||||||
tableName: { type: String, default: "" },
|
tableName: { type: String, default: "" },
|
||||||
apiObj: { type: Object, default: () => { } },
|
apiObj: { type: Object, default: () => { } },
|
||||||
params: { type: Object, default: () => ({}) },
|
params: { type: Object, default: () => ({}) },
|
||||||
|
query: { type: Object, default: () => ({}) },
|
||||||
data: { type: Object, default: () => { } },
|
data: { type: Object, default: () => { } },
|
||||||
height: { type: [String, Number], default: "100%" },
|
height: { type: [String, Number], default: "100%" },
|
||||||
size: { type: String, default: "default" },
|
size: { type: String, default: "default" },
|
||||||
|
@ -123,9 +124,16 @@ export default {
|
||||||
this.total = this.tableData.length;
|
this.total = this.tableData.length;
|
||||||
},
|
},
|
||||||
apiObj() {
|
apiObj() {
|
||||||
// this.tableParams = this.params;
|
this.tableParams = this.params;
|
||||||
this.refresh();
|
this.refresh();
|
||||||
},
|
},
|
||||||
|
// query 暂时不监听手动调用
|
||||||
|
// query: {
|
||||||
|
// handler() {
|
||||||
|
// this.refresh();
|
||||||
|
// },
|
||||||
|
// deep: true
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
_height() {
|
_height() {
|
||||||
|
@ -210,7 +218,7 @@ export default {
|
||||||
// delete reqData[config.request.page]
|
// delete reqData[config.request.page]
|
||||||
// delete reqData[config.request.pageSize]
|
// delete reqData[config.request.pageSize]
|
||||||
}
|
}
|
||||||
var c = Object.assign({}, this.tableParams, reqData)
|
var c = Object.assign({}, this.query, this.tableParams, reqData)
|
||||||
try {
|
try {
|
||||||
if (this.apiObj) {
|
if (this.apiObj) {
|
||||||
var res = await this.apiObj.req(c);
|
var res = await this.apiObj.req(c);
|
||||||
|
|
|
@ -75,7 +75,7 @@ const props = defineProps({
|
||||||
edit: { type: Boolean, default: true },
|
edit: { type: Boolean, default: true },
|
||||||
hidePagination: { type: Boolean, default: false },
|
hidePagination: { type: Boolean, default: false },
|
||||||
tableWidth: { type: Number, default: 600 },
|
tableWidth: { type: Number, default: 600 },
|
||||||
tableHeight: { type: Number, default: 400 },
|
tableHeight: { type: Number, default: 300 },
|
||||||
apiObj: { type: Object, default: null },
|
apiObj: { type: Object, default: null },
|
||||||
params: { type: Object, default: () => {} },
|
params: { type: Object, default: () => {} },
|
||||||
label: { type: [String, Number, Array], default: "" },
|
label: { type: [String, Number, Array], default: "" },
|
||||||
|
@ -126,7 +126,7 @@ onMounted(() => {
|
||||||
selectLabel.value = selectedOption
|
selectLabel.value = selectedOption
|
||||||
? selectedOption[props.labelField]
|
? selectedOption[props.labelField]
|
||||||
: "";
|
: "";
|
||||||
} else {
|
} else if (props.obj) {
|
||||||
selectLabel.value = props.obj[props.labelField];
|
selectLabel.value = props.obj[props.labelField];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,6 +142,15 @@ const routes = [
|
||||||
},
|
},
|
||||||
component: "home/event",
|
component: "home/event",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "articles",
|
||||||
|
path: "/articles",
|
||||||
|
meta: {
|
||||||
|
title: "公告视频",
|
||||||
|
perms: ["articles"],
|
||||||
|
},
|
||||||
|
component: "home/articles",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
//审批
|
//审批
|
||||||
|
@ -3350,6 +3359,17 @@ const routes = [
|
||||||
},
|
},
|
||||||
component: "statistics/statistics_inm.vue",
|
component: "statistics/statistics_inm.vue",
|
||||||
},
|
},
|
||||||
|
//返工统计——光芯
|
||||||
|
{
|
||||||
|
path: "/rework_gx",
|
||||||
|
name: "rework_gx",
|
||||||
|
meta: {
|
||||||
|
title: "返工统计",
|
||||||
|
icon: "el-icon-trend-charts",
|
||||||
|
perms: ["rework_gx"],
|
||||||
|
},
|
||||||
|
component: "statistics/rework_gx.vue",
|
||||||
|
},
|
||||||
//过程检验统计——光芯
|
//过程检验统计——光芯
|
||||||
{
|
{
|
||||||
path: "/process_check_gx",
|
path: "/process_check_gx",
|
||||||
|
@ -3372,6 +3392,17 @@ const routes = [
|
||||||
},
|
},
|
||||||
component: "statistics/good_check_gx.vue",
|
component: "statistics/good_check_gx.vue",
|
||||||
},
|
},
|
||||||
|
//成品检验记录——光芯
|
||||||
|
{
|
||||||
|
path: "/check_record_gx",
|
||||||
|
name: "check_record_gx",
|
||||||
|
meta: {
|
||||||
|
title: "成品检验记录",
|
||||||
|
icon: "el-icon-trend-charts",
|
||||||
|
perms: ["check_record_gx"],
|
||||||
|
},
|
||||||
|
component: "statistics/check_record_gx.vue",
|
||||||
|
},
|
||||||
//扫边车间数据汇总——光芯
|
//扫边车间数据汇总——光芯
|
||||||
// {
|
// {
|
||||||
// path: "/statistics_saobian",
|
// path: "/statistics_saobian",
|
||||||
|
|
|
@ -3,7 +3,7 @@ import ElementPlus from "element-plus";
|
||||||
import "element-plus/dist/index.css";
|
import "element-plus/dist/index.css";
|
||||||
import "element-plus/theme-chalk/display.css";
|
import "element-plus/theme-chalk/display.css";
|
||||||
import scui from "./scui";
|
import scui from "./scui";
|
||||||
import xui from "./xui";
|
import xtui from "./xtui";
|
||||||
import i18n from "./locales";
|
import i18n from "./locales";
|
||||||
import router from "./router";
|
import router from "./router";
|
||||||
import store from "./store";
|
import store from "./store";
|
||||||
|
@ -26,7 +26,7 @@ app.use(ElementPlus);
|
||||||
app.use(Cesium);
|
app.use(Cesium);
|
||||||
app.use(i18n);
|
app.use(i18n);
|
||||||
app.use(scui);
|
app.use(scui);
|
||||||
app.use(xui);
|
app.use(xtui);
|
||||||
app.use(preventReClick);
|
app.use(preventReClick);
|
||||||
app.use(Print);
|
app.use(Print);
|
||||||
app.use(Xlsx);
|
app.use(Xlsx);
|
||||||
|
|
|
@ -173,6 +173,7 @@ tool.dateFormat = function (date, fmt='yyyy-MM-dd hh:mm:ss') {
|
||||||
}
|
}
|
||||||
return fmt;
|
return fmt;
|
||||||
}
|
}
|
||||||
|
// YYYY-MM-DD hh:mm:ss
|
||||||
tool.dateFormat1 = function (date) {
|
tool.dateFormat1 = function (date) {
|
||||||
date = new Date(date);
|
date = new Date(date);
|
||||||
let newDate = '';
|
let newDate = '';
|
||||||
|
@ -190,7 +191,7 @@ tool.dateFormat1 = function (date) {
|
||||||
newDate = year+'-'+month+'-'+day+' '+hour+':'+minute+':'+second;
|
newDate = year+'-'+month+'-'+day+' '+hour+':'+minute+':'+second;
|
||||||
return newDate;
|
return newDate;
|
||||||
}
|
}
|
||||||
// 格式化某一天
|
// YYYY-MM-DD 格式化某一天
|
||||||
tool.dateFormat2 = function (date) {
|
tool.dateFormat2 = function (date) {
|
||||||
date = new Date(date);
|
date = new Date(date);
|
||||||
let newDate = '';
|
let newDate = '';
|
||||||
|
@ -203,7 +204,7 @@ tool.dateFormat2 = function (date) {
|
||||||
return newDate;
|
return newDate;
|
||||||
}
|
}
|
||||||
// 格式化某一月
|
// 格式化某一月
|
||||||
tool.dateFormat2 = function (date) {
|
tool.monthFormat = function (date) {
|
||||||
date = new Date(date);
|
date = new Date(date);
|
||||||
let first = '';
|
let first = '';
|
||||||
let lastDate = '',year2 = '',month2 = '';
|
let lastDate = '',year2 = '',month2 = '';
|
||||||
|
|
|
@ -91,7 +91,8 @@ export default {
|
||||||
mounted(){
|
mounted(){
|
||||||
let that = this;
|
let that = this;
|
||||||
let host = window.location.host;
|
let host = window.location.host;
|
||||||
let jsUrl = host.indexOf('localhost')>-1?'http://222.222.144.147:6013/jsmap/jsmap.js':host+'/jsmap/jsmap.js';
|
let jsUrl = host.indexOf('localhost')>-1?'http://222.222.144.147:6013/jsmap/jsmap.js':window.location.protocol + "//" + host+'/jsmap/jsmap.js';
|
||||||
|
console.log(jsUrl)
|
||||||
that.loadScript('mapId',jsUrl, () => {
|
that.loadScript('mapId',jsUrl, () => {
|
||||||
that.canUseMap = true;
|
that.canUseMap = true;
|
||||||
})
|
})
|
||||||
|
|
|
@ -154,7 +154,7 @@ export default {
|
||||||
this.getArea();
|
this.getArea();
|
||||||
let that = this;
|
let that = this;
|
||||||
let host = window.location.host;
|
let host = window.location.host;
|
||||||
let jsUrl = host.indexOf('localhost') > -1 ? 'http://222.222.144.147:6013/jsmap/jsmap.js' : host + '/jsmap/jsmap.js';
|
let jsUrl = host.indexOf('localhost') > -1 ? 'http://222.222.144.147:6013/jsmap/jsmap.js' : window.location.protocol + "//" + host+'/jsmap/jsmap.js';
|
||||||
that.loadScript('mapId', jsUrl, () => {
|
that.loadScript('mapId', jsUrl, () => {
|
||||||
that.canUseMap = true;
|
that.canUseMap = true;
|
||||||
})
|
})
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -17,6 +17,16 @@
|
||||||
<el-option v-for="item in stateOptions" :key="item.value" :label="item.label" :value="item.value"
|
<el-option v-for="item in stateOptions" :key="item.value" :label="item.label" :value="item.value"
|
||||||
@change="handleQuery"></el-option>
|
@change="handleQuery"></el-option>
|
||||||
</el-select> -->
|
</el-select> -->
|
||||||
|
<el-select
|
||||||
|
v-model="query.is_deleted"
|
||||||
|
placeholder="筛选"
|
||||||
|
@change="handleQuery"
|
||||||
|
clearable
|
||||||
|
style="margin-left: 2px"
|
||||||
|
>
|
||||||
|
<el-option label="在用" :value="false"></el-option>
|
||||||
|
<el-option label="已删" :value="true"></el-option>
|
||||||
|
</el-select>
|
||||||
<el-input v-model="query.search" placeholder="设备名称/编号" clearable style="width:200px"></el-input>
|
<el-input v-model="query.search" placeholder="设备名称/编号" clearable style="width:200px"></el-input>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
<el-input v-model="form.model" placeholder="规格型号" />
|
<el-input v-model="form.model" placeholder="规格型号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="8" :sm="24">
|
||||||
<el-form-item label="设备状态">
|
<el-form-item label="设备状态">
|
||||||
<el-select style="width: 100%" v-model="form.state" placeholder="请选择">
|
<el-select style="width: 100%" v-model="form.state" placeholder="请选择">
|
||||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
|
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
|
||||||
|
@ -61,13 +61,18 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="8" :sm="24">
|
||||||
<el-form-item label="设备分类">
|
<el-form-item label="设备分类">
|
||||||
<el-select v-model="form.cate" placeholder="所属大类" clearable style="width: 100%">
|
<el-select v-model="form.cate" placeholder="所属大类" clearable style="width: 100%">
|
||||||
<el-option v-for="item in cateOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
<el-option v-for="item in cateOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="8" :sm="24">
|
||||||
|
<el-form-item label="是否删除">
|
||||||
|
<el-switch v-model="form.is_deleted" style="--el-switch-on-color: #FF0000;"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-divider v-if="form.type == 50"/>
|
<el-divider v-if="form.type == 50"/>
|
||||||
<el-row v-if="form.type == 50">
|
<el-row v-if="form.type == 50">
|
||||||
|
|
|
@ -17,6 +17,16 @@
|
||||||
<el-option v-for="item in stateOptions" :key="item.value" :label="item.label" :value="item.value"
|
<el-option v-for="item in stateOptions" :key="item.value" :label="item.label" :value="item.value"
|
||||||
@change="handleQuery"></el-option>
|
@change="handleQuery"></el-option>
|
||||||
</el-select> -->
|
</el-select> -->
|
||||||
|
<el-select
|
||||||
|
v-model="query.is_deleted"
|
||||||
|
placeholder="筛选"
|
||||||
|
@change="handleQuery"
|
||||||
|
clearable
|
||||||
|
style="margin-left: 2px"
|
||||||
|
>
|
||||||
|
<el-option label="在用" :value="false"></el-option>
|
||||||
|
<el-option label="已删" :value="true"></el-option>
|
||||||
|
</el-select>
|
||||||
<el-input v-model="query.search" placeholder="设备名称/编号" clearable style="width:200px"></el-input>
|
<el-input v-model="query.search" placeholder="设备名称/编号" clearable style="width:200px"></el-input>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -17,6 +17,16 @@
|
||||||
<el-option v-for="item in stateOptions" :key="item.value" :label="item.label" :value="item.value"
|
<el-option v-for="item in stateOptions" :key="item.value" :label="item.label" :value="item.value"
|
||||||
@change="handleQuery"></el-option>
|
@change="handleQuery"></el-option>
|
||||||
</el-select> -->
|
</el-select> -->
|
||||||
|
<el-select
|
||||||
|
v-model="query.is_deleted"
|
||||||
|
placeholder="筛选"
|
||||||
|
@change="handleQuery"
|
||||||
|
clearable
|
||||||
|
style="margin-left: 2px"
|
||||||
|
>
|
||||||
|
<el-option label="在用" :value="false"></el-option>
|
||||||
|
<el-option label="已删" :value="true"></el-option>
|
||||||
|
</el-select>
|
||||||
<el-input v-model="query.search" placeholder="设备名称/编号" clearable style="width:200px"></el-input>
|
<el-input v-model="query.search" placeholder="设备名称/编号" clearable style="width:200px"></el-input>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,7 +5,17 @@
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="add" v-auth="'equipment.create'">新增</el-button>
|
<el-button type="primary" icon="el-icon-plus" @click="add" v-auth="'equipment.create'">新增</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<el-input v-model="query.search" placeholder="名称" clearable style="margin-right: 5px;"></el-input>
|
<el-select
|
||||||
|
v-model="query.is_deleted"
|
||||||
|
placeholder="筛选"
|
||||||
|
@change="handleQuery"
|
||||||
|
clearable
|
||||||
|
style="margin-left: 2px"
|
||||||
|
>
|
||||||
|
<el-option label="在用" :value="false"></el-option>
|
||||||
|
<el-option label="已删" :value="true"></el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-input v-model="query.search" placeholder="设备名称/编号" clearable style="margin-right: 5px;"></el-input>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
|
|
|
@ -17,6 +17,16 @@
|
||||||
<el-option v-for="item in stateOptions" :key="item.value" :label="item.label" :value="item.value"
|
<el-option v-for="item in stateOptions" :key="item.value" :label="item.label" :value="item.value"
|
||||||
@change="handleQuery"></el-option>
|
@change="handleQuery"></el-option>
|
||||||
</el-select> -->
|
</el-select> -->
|
||||||
|
<el-select
|
||||||
|
v-model="query.is_deleted"
|
||||||
|
placeholder="筛选"
|
||||||
|
@change="handleQuery"
|
||||||
|
clearable
|
||||||
|
style="margin-left: 2px"
|
||||||
|
>
|
||||||
|
<el-option label="在用" :value="false"></el-option>
|
||||||
|
<el-option label="已删" :value="true"></el-option>
|
||||||
|
</el-select>
|
||||||
<el-input v-model="query.search" placeholder="设备名称/编号" clearable style="width:200px"></el-input>
|
<el-input v-model="query.search" placeholder="设备名称/编号" clearable style="width:200px"></el-input>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -0,0 +1,269 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="left-panel">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
@click="add"
|
||||||
|
v-auth="'material.create'"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="right-panel">
|
||||||
|
<el-input
|
||||||
|
v-model="query.search"
|
||||||
|
placeholder="名称"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
row-key="id"
|
||||||
|
stripe
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column label="名称" prop="title" min-width="60">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="内容" prop="content" min-width="120">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="图片" prop="poster" min-width="60">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="地址" prop="video" min-width="60">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
fixed="right"
|
||||||
|
align="center"
|
||||||
|
width="120"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
<el-link type="success" @click="toggle_top(scope.row)">
|
||||||
|
置顶
|
||||||
|
</el-link>
|
||||||
|
<!-- <el-divider direction="vertical" /> -->
|
||||||
|
<el-link type="primary" @click="table_edit(scope.row)" style="margin: 0 5px;">
|
||||||
|
编辑
|
||||||
|
</el-link>
|
||||||
|
<el-link type="danger" @click="table_del(scope.row)">
|
||||||
|
删除
|
||||||
|
</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
<el-dialog
|
||||||
|
title="新增"
|
||||||
|
width="600px"
|
||||||
|
v-model="saveDialog"
|
||||||
|
>
|
||||||
|
<el-form :model="form" label-width="80px" :rules="rules" ref="dialogForm">
|
||||||
|
<el-row>
|
||||||
|
<el-col>
|
||||||
|
<el-form-item label="类型">
|
||||||
|
<el-select
|
||||||
|
v-model="addType"
|
||||||
|
placeholder="类型"
|
||||||
|
style="width: 100%"
|
||||||
|
:disabled="showType =='edit' "
|
||||||
|
>
|
||||||
|
<el-option label="公告" :value="'articles'"></el-option>
|
||||||
|
<el-option label="视频" :value="'video'"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col>
|
||||||
|
<el-form-item label="名称" prop="title">
|
||||||
|
<el-input v-model="form.title" placeholder="请输入名称" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col v-if="addType == 'articles'">
|
||||||
|
<el-form-item label="公告内容">
|
||||||
|
<el-input type="textarea" :rows="3" v-model="form.content" placeholder="公告内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col v-if="addType == 'articles'">
|
||||||
|
<el-form-item label="公告照片">
|
||||||
|
<sc-upload v-model="form.poster" :modelValue="form.poster" title="公告照片"></sc-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col v-if="addType == 'video'">
|
||||||
|
<el-form-item label="视频文件">
|
||||||
|
<sc-upload-file
|
||||||
|
v-model="form.video"
|
||||||
|
:multiple="false"
|
||||||
|
:limit="1"
|
||||||
|
>
|
||||||
|
<el-button type="primary" icon="el-icon-upload">上传</el-button>
|
||||||
|
</sc-upload-file>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="saveDialog = false">取消</el-button>
|
||||||
|
<el-button type="primary" :loading="isSaveing" @click="confirm()">确定</el-button >
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { ElLoading } from "element-plus";
|
||||||
|
const defaultForm = {
|
||||||
|
id: "",
|
||||||
|
title: "",
|
||||||
|
content: "",
|
||||||
|
video: "",
|
||||||
|
poster: ""
|
||||||
|
}
|
||||||
|
export default {
|
||||||
|
name: "articles",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showType:'add',
|
||||||
|
form:defaultForm,
|
||||||
|
saveDialog: false,
|
||||||
|
apiObj: this.$API.cms.article.list,
|
||||||
|
addType:'articles',
|
||||||
|
materialId: "",
|
||||||
|
materialName: "",
|
||||||
|
showHidden: false,
|
||||||
|
query:{
|
||||||
|
search: "",
|
||||||
|
},
|
||||||
|
rules:{
|
||||||
|
title: [{required: true,message: "请输入名称",trigger: "blur"}]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
rowClick(row) {
|
||||||
|
console.log("rowClick", row);
|
||||||
|
this.materialId = row.id;
|
||||||
|
this.materialName = row.full_name;
|
||||||
|
this.$emit("choseChange", row.id);
|
||||||
|
},
|
||||||
|
//添加
|
||||||
|
add() {
|
||||||
|
this.saveDialog = true;
|
||||||
|
this.showType = "add";
|
||||||
|
this.addType = "articles";
|
||||||
|
this.form = Object.assign({}, defaultForm);
|
||||||
|
},
|
||||||
|
//编辑
|
||||||
|
table_edit(row) {
|
||||||
|
this.form = Object.assign({}, row);
|
||||||
|
if(this.form.video!==''){
|
||||||
|
this.addType = "video";
|
||||||
|
}else{
|
||||||
|
this.addType = "articles";
|
||||||
|
}
|
||||||
|
this.saveDialog = true;
|
||||||
|
this.showType = "edit";
|
||||||
|
},
|
||||||
|
toggle_top(row) {
|
||||||
|
let that = this;
|
||||||
|
that.$API.cms.article.toggle_top.req(row.id).then((res) => {
|
||||||
|
that.$message.success("操作成功");
|
||||||
|
that.$refs.table.refresh();
|
||||||
|
}).catch((err) => {
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//删除
|
||||||
|
async table_del(row) {
|
||||||
|
let that = this;
|
||||||
|
that.$confirm(`确定删除吗?`, "提示", {
|
||||||
|
type: "warning",
|
||||||
|
}).then(() => {
|
||||||
|
that.$API.cms.article.delete.req(row.id).then((res) => {
|
||||||
|
that.$message.success("删除成功");
|
||||||
|
that.$refs.table.refresh();
|
||||||
|
return res;
|
||||||
|
}).catch((err) => {
|
||||||
|
return err;
|
||||||
|
});
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
confirm(){
|
||||||
|
let that = this;
|
||||||
|
that.$refs.dialogForm.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
that.isSaveing = true;
|
||||||
|
if(that.showType == 'add'){
|
||||||
|
that.$API.cms.article.create.req(that.form).then((res) => {
|
||||||
|
that.$message.success("操作成功");
|
||||||
|
that.$refs.table.refresh();
|
||||||
|
that.saveDialog = false;
|
||||||
|
that.isSaveing = false;
|
||||||
|
}).catch((err) => {
|
||||||
|
that.isSaveing = false;
|
||||||
|
return err;
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
that.$API.cms.article.update.req(that.form.id,that.form).then((res) => {
|
||||||
|
that.$message.success("操作成功");
|
||||||
|
that.$refs.table.refresh();
|
||||||
|
that.saveDialog = false;
|
||||||
|
that.isSaveing = false;
|
||||||
|
}).catch((err) => {
|
||||||
|
that.isSaveing = false;
|
||||||
|
return err;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//本地更新数据
|
||||||
|
handleSaveSuccess(data, mode) {
|
||||||
|
if (mode == "add") {
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
} else if (mode == "edit") {
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleQuery() {
|
||||||
|
this.$refs.table.queryData(this.query);
|
||||||
|
},
|
||||||
|
resetQuery() {
|
||||||
|
this.query = {};
|
||||||
|
},
|
||||||
|
upSuccess(res, close) {
|
||||||
|
close();
|
||||||
|
const loading = ElLoading.service({
|
||||||
|
fullscreen: true,
|
||||||
|
text: "解析中...请稍等",
|
||||||
|
});
|
||||||
|
this.$API.mtm.material.daoru
|
||||||
|
.req({ path: res.path })
|
||||||
|
.then((res) => {
|
||||||
|
loading.close();
|
||||||
|
this.$message.success("导入成功");
|
||||||
|
this.$refs.table.queryData(this.query);
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
loading.close();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
hiddenChange(val) {
|
||||||
|
if (val) {
|
||||||
|
this.query.is_hidden = "";
|
||||||
|
} else {
|
||||||
|
this.query.is_hidden = false;
|
||||||
|
}
|
||||||
|
this.$refs.table.queryData(this.query);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -38,6 +38,7 @@
|
||||||
<el-table-column label="物料名" prop="material_name" show-overflow-tooltip> </el-table-column>
|
<el-table-column label="物料名" prop="material_name" show-overflow-tooltip> </el-table-column>
|
||||||
<el-table-column label="总数" prop="count"> </el-table-column>
|
<el-table-column label="总数" prop="count"> </el-table-column>
|
||||||
<el-table-column label="抽检数" prop="count_sampling"> </el-table-column>
|
<el-table-column label="抽检数" prop="count_sampling"> </el-table-column>
|
||||||
|
<el-table-column label="抽检合格数" prop="count_sampling_ok"> </el-table-column>
|
||||||
<el-table-column label="合格数" prop="count_ok"> </el-table-column>
|
<el-table-column label="合格数" prop="count_ok"> </el-table-column>
|
||||||
<el-table-column label="不合格数" prop="count_notok"> </el-table-column>
|
<el-table-column label="不合格数" prop="count_notok"> </el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" width="150">
|
<el-table-column label="操作" fixed="right" width="150">
|
||||||
|
@ -86,7 +87,7 @@
|
||||||
v-if="dialog.check"
|
v-if="dialog.check"
|
||||||
:materialCate="materialCate"
|
:materialCate="materialCate"
|
||||||
:ftestWork="ftestWork"
|
:ftestWork="ftestWork"
|
||||||
@closed="dialog.check = false"
|
@closed="handleCheckClose"
|
||||||
>
|
>
|
||||||
</check-dialog>
|
</check-dialog>
|
||||||
</el-container>
|
</el-container>
|
||||||
|
@ -169,6 +170,10 @@ export default {
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.$refs.table.queryData(this.query);
|
this.$refs.table.queryData(this.query);
|
||||||
},
|
},
|
||||||
|
handleCheckClose() {
|
||||||
|
this.dialog.check = false;
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
},
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.query = {};
|
this.query = {};
|
||||||
},
|
},
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
workObj.count_sampling
|
workObj.count_sampling
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="配棒管批次号" v-if=" workObj.mb_&&workObj.mb_.assemb">
|
<el-descriptions-item label="配棒管批次号" v-if=" workObj.mb_&&workObj.mb_.assemb">
|
||||||
<span v-for="item in workObj.mb_.assemb" :key="item.id">{{item.batch}}、</span>
|
<span v-for="item in workObj.mb_.assemb" :key="item.id">{{item.batch}}; </span>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
</el-input-number>
|
</el-input-number>
|
||||||
</template>
|
</template>
|
||||||
<!-- 整数 -->
|
<!-- 整数 -->
|
||||||
<template v-else-if="ftestitems[$index].field_type == 'input_int'" #default="scope">
|
<template v-else-if="ftestitems[$index].field_type == 'input-int'" #default="scope">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="scope.row.ftestitems[$index].test_val_json"
|
v-model="scope.row.ftestitems[$index].test_val_json"
|
||||||
:precision="0"
|
:precision="0"
|
||||||
|
@ -99,7 +99,7 @@
|
||||||
</el-input-number>
|
</el-input-number>
|
||||||
</template>
|
</template>
|
||||||
<!-- 文本 -->
|
<!-- 文本 -->
|
||||||
<template v-else-if="ftestitems[$index].field_type == 'input_text'" #default="scope">
|
<template v-else-if="ftestitems[$index].field_type == 'input-text'" #default="scope">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="scope.row.ftestitems[$index].test_val_json"
|
v-model="scope.row.ftestitems[$index].test_val_json"
|
||||||
:disabled="!scope.row.isEdit"
|
:disabled="!scope.row.isEdit"
|
||||||
|
@ -107,7 +107,7 @@
|
||||||
</el-input>
|
</el-input>
|
||||||
</template>
|
</template>
|
||||||
<!-- 单选 -->
|
<!-- 单选 -->
|
||||||
<template v-else-if="ftestitems[$index].field_type == 'select'" #default="scope">
|
<template v-else-if="ftestitems[$index].field_type == 'select-text'" #default="scope">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="scope.row.ftestitems[$index].test_val_json"
|
v-model="scope.row.ftestitems[$index].test_val_json"
|
||||||
clearable
|
clearable
|
||||||
|
@ -124,7 +124,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
<!-- 多选 -->
|
<!-- 多选 -->
|
||||||
<template v-else-if="ftestitems[$index].field_type == 'selects'" #default="scope">
|
<template v-else-if="ftestitems[$index].field_type == 'selects-text'" #default="scope">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="scope.row.ftestitems[$index].test_val_json"
|
v-model="scope.row.ftestitems[$index].test_val_json"
|
||||||
clearable
|
clearable
|
||||||
|
@ -164,24 +164,20 @@
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="test_user"
|
prop="test_user"
|
||||||
label="检验人"
|
label="检验人"
|
||||||
width="120"
|
width="160"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-select
|
<xtSelect
|
||||||
|
:apiObj="apiUserObj"
|
||||||
|
:params="apiUserParams"
|
||||||
v-model="scope.row.test_user"
|
v-model="scope.row.test_user"
|
||||||
placeholder="检验人"
|
v-model:label="scope.row.test_user_name"
|
||||||
clearable
|
:edit="scope.row.isEdit"
|
||||||
filterable
|
|
||||||
:disabled="!scope.row.isEdit"
|
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-table-column label="账号" prop="username"></el-table-column>
|
||||||
v-for="item in userList"
|
<el-table-column label="名称" prop="name"></el-table-column>
|
||||||
:key="item.id"
|
</xtSelect>
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="val" label="备注">
|
<el-table-column prop="val" label="备注">
|
||||||
|
@ -215,7 +211,7 @@
|
||||||
>
|
>
|
||||||
<el-link
|
<el-link
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="delCheck(scope.row.id)"
|
@click="delCheck(scope.row, scope.$index)"
|
||||||
style="margin-left: 2px"
|
style="margin-left: 2px"
|
||||||
>删除</el-link
|
>删除</el-link
|
||||||
>
|
>
|
||||||
|
@ -266,6 +262,8 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
apiUserObj: this.$API.system.user.list,
|
||||||
|
apiUserParams: {posts__code__contains: "check"},
|
||||||
addTemplate: {
|
addTemplate: {
|
||||||
ftestitems: [{ test_val_json: "", check_val: "", testitem: "" ,choices:[],field_type:'',name:''}],
|
ftestitems: [{ test_val_json: "", check_val: "", testitem: "" ,choices:[],field_type:'',name:''}],
|
||||||
test_date: "", //work获取
|
test_date: "", //work获取
|
||||||
|
@ -306,7 +304,6 @@ export default {
|
||||||
|
|
||||||
let tags = that.materialCate;
|
let tags = that.materialCate;
|
||||||
that.getTestItem(tags, that.ftestWork);
|
that.getTestItem(tags, that.ftestWork);
|
||||||
that.getUserList(that.ftestWork);
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
open() {
|
open() {
|
||||||
|
@ -335,15 +332,6 @@ export default {
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//获取员工
|
|
||||||
getUserList() {
|
|
||||||
let that = this;
|
|
||||||
this.$API.system.user.list
|
|
||||||
.req({ page: 0, posts__code__contains: "check" })
|
|
||||||
.then((res) => {
|
|
||||||
that.userList = res;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
table_edit(row) {
|
table_edit(row) {
|
||||||
this.dialog.worksave = true;
|
this.dialog.worksave = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
@ -381,17 +369,22 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//删除
|
//删除
|
||||||
delCheck(id) {
|
delCheck(row, index) {
|
||||||
|
if (row.id == undefined) {
|
||||||
|
this.formTableData.splice(index, 1);
|
||||||
|
return
|
||||||
|
}
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$confirm(`确定删除吗?`, "提示", {
|
that.$confirm(`确定删除吗?`, "提示", {
|
||||||
type: "warning",
|
type: "warning",
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
that.$API.qm.ftest.delete
|
that.$API.qm.ftest.delete
|
||||||
.req(id)
|
.req(row.id)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
that.$message.success("删除成功");
|
that.$message.success("删除成功");
|
||||||
that.getCheckList(that.ftestWork);
|
that.getCheckList(that.ftestWork);
|
||||||
|
this.getFtestWork();
|
||||||
return res;
|
return res;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
@ -400,9 +393,14 @@ export default {
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
|
getFtestWork() {
|
||||||
|
let that = this;
|
||||||
|
that.$API.qm.ftestwork.item.req(that.ftestWork).then((res) => {
|
||||||
|
that.workObj = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
saveCheck(row) {
|
saveCheck(row) {
|
||||||
let that = this;
|
let that = this;
|
||||||
console.log(row);
|
|
||||||
let index = this.formTableData.findIndex(
|
let index = this.formTableData.findIndex(
|
||||||
(item) => item.id == row.id
|
(item) => item.id == row.id
|
||||||
);
|
);
|
||||||
|
@ -413,6 +411,7 @@ export default {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
that.formTableData[index].isEdit = false;
|
that.formTableData[index].isEdit = false;
|
||||||
that.$message.success("操作成功");
|
that.$message.success("操作成功");
|
||||||
|
this.getFtestWork();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
return err;
|
return err;
|
||||||
|
@ -424,6 +423,7 @@ export default {
|
||||||
that.formTableData[index].isEdit = false;
|
that.formTableData[index].isEdit = false;
|
||||||
that.$message.success("操作成功");
|
that.$message.success("操作成功");
|
||||||
that.getCheckList(that.ftestWork);
|
that.getCheckList(that.ftestWork);
|
||||||
|
this.getFtestWork();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
return err;
|
return err;
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
clearable
|
clearable
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@change="handleChange"
|
@change="handleChange"
|
||||||
|
disabled="mode != 'add'"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in options"
|
v-for="item in options"
|
||||||
|
@ -52,16 +53,7 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24" v-if="form.type2 == 10">
|
||||||
<el-form-item label="抽检数量">
|
|
||||||
<el-input-number
|
|
||||||
controls-position="right"
|
|
||||||
v-model="form.count_sampling"
|
|
||||||
style="width: 100%"
|
|
||||||
></el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :md="12" :sm="24">
|
|
||||||
<el-form-item label="合格数量">
|
<el-form-item label="合格数量">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
|
@ -71,7 +63,7 @@
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24" v-if="form.type2 == 10">
|
||||||
<el-form-item label="不合格数量">
|
<el-form-item label="不合格数量">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
|
@ -83,20 +75,15 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="检验人" prop="test_user">
|
<el-form-item label="检验人" prop="test_user">
|
||||||
<el-select
|
<xtSelect
|
||||||
|
:apiObj="apiUserObj"
|
||||||
v-model="form.test_user"
|
v-model="form.test_user"
|
||||||
placeholder="检验人"
|
v-model:label="form.test_user_name"
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-table-column label="账号" prop="username"></el-table-column>
|
||||||
v-for="item in userList"
|
<el-table-column label="名称" prop="name"></el-table-column>
|
||||||
:key="item.id"
|
</xtSelect>
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -116,6 +103,7 @@ export default {
|
||||||
emits: ["success", "closed"],
|
emits: ["success", "closed"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
apiUserObj: this.$API.system.user.list,
|
||||||
loading: false,
|
loading: false,
|
||||||
form: {
|
form: {
|
||||||
type:'prod',
|
type:'prod',
|
||||||
|
|
|
@ -127,6 +127,32 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="检验设备">
|
||||||
|
<el-select
|
||||||
|
v-model="form.equipment"
|
||||||
|
placeholder="检验设备"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in eqOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
<span style="float:left">{{item.name}}</span>
|
||||||
|
<span style="float:right">{{item.number}}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="备注">
|
||||||
|
<el-input v-model="form.note" placeholder="备注"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-divider style="margin-top:0"></el-divider>
|
<el-divider style="margin-top:0"></el-divider>
|
||||||
<el-row v-if="mode=='sizeAdd'||mode=='sizeEdit'||mode=='sizeShow'">
|
<el-row v-if="mode=='sizeAdd'||mode=='sizeEdit'||mode=='sizeShow'">
|
||||||
|
@ -482,6 +508,7 @@ export default {
|
||||||
visible: false,
|
visible: false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
options: [],
|
options: [],
|
||||||
|
eqOptions: [],
|
||||||
userList:[],
|
userList:[],
|
||||||
shiftOtions:[],
|
shiftOtions:[],
|
||||||
selectionFilters: [],
|
selectionFilters: [],
|
||||||
|
@ -491,6 +518,7 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getUsers();
|
this.getUsers();
|
||||||
this.getShift();
|
this.getShift();
|
||||||
|
this.geteEqOptions();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//显示
|
//显示
|
||||||
|
@ -515,6 +543,12 @@ export default {
|
||||||
that.userList = res;
|
that.userList = res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
geteEqOptions(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.system.user.list.req({ page: 0, type:20 }).then((res) => {
|
||||||
|
that.eqOptions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
handleCheckChange(){
|
handleCheckChange(){
|
||||||
this.form.count_ok = this.form.count-this.form.count_notok;
|
this.form.count_ok = this.form.count-this.form.count_notok;
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1,248 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="right-panel">
|
||||||
|
<!-- 检验类型 -->
|
||||||
|
<el-select
|
||||||
|
v-model="query.process_name"
|
||||||
|
placeholder="检验类型"
|
||||||
|
@change="handleQuery">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-input
|
||||||
|
v-model="query.batch"
|
||||||
|
placeholder="批次号"
|
||||||
|
clearable
|
||||||
|
style="width: 150px"
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
|
</div>
|
||||||
|
<el-button @click="handleExport" type="primary">导出</el-button>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
row-key="id"
|
||||||
|
:query="query"
|
||||||
|
id="exportDiv"
|
||||||
|
stripe
|
||||||
|
hideDo
|
||||||
|
hidePagination
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column label="物料名" prop="material_name"></el-table-column>
|
||||||
|
<el-table-column label="检验类型" width="80">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag v-if="scope.row.type2 == 20" type="success">全检</el-tag>
|
||||||
|
<el-tag v-else-if="scope.row.type2 == 10" type="primary">抽检</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="批次号" prop="batch"></el-table-column>
|
||||||
|
<el-table-column label="检验日期" prop="test_date"></el-table-column>
|
||||||
|
<el-table-column label="检验数">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.type2 == 10">{{ scope.row.count_sampling }}</span>
|
||||||
|
<span v-else>{{ scope.row.count }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="合格数">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.type2 == 10">{{ scope.row.count_sampling_ok }}</span>
|
||||||
|
<span v-else>{{ scope.row.count_ok }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="B类合格" align="center" v-if="query.process_name == '一次超洗'">
|
||||||
|
<el-table-column label="准合格" prop="count_n_zhg"></el-table-column>
|
||||||
|
<el-table-column label="圆度准合格" prop="count_n_yz"></el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="B类合格" align="center" v-else>
|
||||||
|
<el-table-column label="浅水纹" prop="count_n_qsw"></el-table-column>
|
||||||
|
<el-table-column label="小崩边" prop="count_n_xbb"></el-table-column>
|
||||||
|
<el-table-column label="浅划麻" prop="count_n_qhm"></el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="不合格数" align="center" v-if="query.process_name == '一次超洗'">
|
||||||
|
<el-table-column label="黑圈内径">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.count_notok_json.count_n_hqnj }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="黑圈内径圆度">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.count_notok_json.count_n_hqnjyd }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="黑圈外径">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.count_notok_json.count_n_hqwj }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="黑圈外径圆度">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.count_notok_json.count_n_hqwjyd }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="产品外径">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.count_notok_json.count_n_wj }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="产品圆度">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.count_notok_json.count_n_yd }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="产品同心度">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.count_notok_json.count_n_txd }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="厚度">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.count_notok_json.count_n_hd }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="其他">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.count_notok_json.count_n_qt }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="合计" prop="count_notok"></el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="不合格数" align="center" v-else>
|
||||||
|
<el-table-column label="返修">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.count_notok_json.count_n_fx }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="脏">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.count_notok_json.count_n_z }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="气泡">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.count_notok_json.count_n_qp }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="黑圈变形">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.count_notok_json.count_n_hqbx }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="双面划麻">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.count_notok_json.count_n_md }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="重水纹">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.count_notok_json.count_n_swen }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="棕边/点">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.count_notok_json.count_n_zb }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="倒角">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.count_notok_json.count_n_dj }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="大崩">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.count_notok_json.count_n_bb }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="棕圈">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.count_notok_json.count_n_zq }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="蓝圈">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.count_notok_json.count_n_lq }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="破损">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.count_notok_json.count_n_ps }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="漏光">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.count_notok_json.count_n_lg }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="尺寸小">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.count_notok_json.count_n_ccx }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="其他">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.count_notok_json.count_n_qt }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="合计" prop="count_notok"></el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "chart",
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
query:{
|
||||||
|
process_name:'一次超洗',
|
||||||
|
},
|
||||||
|
currentDate: "",
|
||||||
|
tableData: [],
|
||||||
|
options:[
|
||||||
|
{name:'外观',value:'一次超洗'},
|
||||||
|
{name:'尺寸',value:'二次超洗'}
|
||||||
|
],
|
||||||
|
userOptions:[],
|
||||||
|
shiftOptions:[],
|
||||||
|
apiObj : this.$API.qm.ftestwork.list
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {},
|
||||||
|
methods: {
|
||||||
|
// processChange(){
|
||||||
|
// this.$refs.table.queryData(this.query);
|
||||||
|
// },
|
||||||
|
handleQuery() {
|
||||||
|
this.$refs.table.queryData(this.query);
|
||||||
|
},
|
||||||
|
handleExport() {
|
||||||
|
this.exportLoading = true;
|
||||||
|
this.$XLSX("#exportDiv", "成品检验统计");
|
||||||
|
this.exportLoading = false;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.tables {
|
||||||
|
position: absolute;
|
||||||
|
top: 4px;
|
||||||
|
right: 6px;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,148 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="right-panel">
|
||||||
|
<el-select
|
||||||
|
v-model="query.mgroup"
|
||||||
|
placeholder="工段"
|
||||||
|
@change="handleQuery">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="query.handle_date"
|
||||||
|
type="date"
|
||||||
|
placeholder="处理日期"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
style="width: 160px"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
|
</div>
|
||||||
|
<el-button @click="handleExport" type="primary">导出</el-button>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
row-key="id"
|
||||||
|
:params="params"
|
||||||
|
:query="query"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
label="#"
|
||||||
|
type="index"
|
||||||
|
width="50"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="工艺路线"
|
||||||
|
prop="material_out_name"
|
||||||
|
min-width="130"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="生产设备"
|
||||||
|
prop="equipment_name"
|
||||||
|
min-width="150"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column label="进度" prop="belong_dept_name" v-if="mgroupName=='黑化'||mgroupName=='退火'">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-progress id="progressbwlq" :percentage="customMethod(scope.row,1)" :stroke-width="20" :color="customMethod(scope.row,2)" :text-inside="true"><span>{{customMethod(scope.row,3)}}</span></el-progress>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="部门/工段"
|
||||||
|
prop="belong_dept_name"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
{{scope.row.belong_dept_name}}/{{scope.row.mgroup_name}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="处理人"
|
||||||
|
prop="handle_user_name"
|
||||||
|
width="80"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column label="保温剩余时间" v-if="mgroupName=='黑化'||mgroupName=='退火'">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ getRemaTime(scope.row) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="开始时间"
|
||||||
|
prop="work_start_time"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="结束时间"
|
||||||
|
prop="work_end_time"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="提交时间"
|
||||||
|
prop="submit_time"
|
||||||
|
></el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "chart",
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
params:{
|
||||||
|
wm_in_state:30,
|
||||||
|
mlog_submit_time_isnull:0,
|
||||||
|
},
|
||||||
|
query:{
|
||||||
|
mgroup:'',
|
||||||
|
handle_date:'',
|
||||||
|
},
|
||||||
|
currentDate: "",
|
||||||
|
tableData: [],
|
||||||
|
options:[],
|
||||||
|
apiObj : this.$API.wpm.mlog.list
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getMgroupOptions();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getMgroupOptions(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.mtm.mgroup.list.req({page:0}).then(res=>{
|
||||||
|
that.options = res;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// processChange(){
|
||||||
|
// this.$refs.table.queryData(this.query);
|
||||||
|
// },
|
||||||
|
handleQuery() {
|
||||||
|
this.$refs.table.queryData(this.query);
|
||||||
|
},
|
||||||
|
handleExport() {
|
||||||
|
this.exportLoading = true;
|
||||||
|
this.$XLSX("#exportDiv", "成品检验统计");
|
||||||
|
this.exportLoading = false;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.tables {
|
||||||
|
position: absolute;
|
||||||
|
top: 4px;
|
||||||
|
right: 6px;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -55,9 +55,8 @@
|
||||||
clearable
|
clearable
|
||||||
style="margin-left: 2px"
|
style="margin-left: 2px"
|
||||||
>
|
>
|
||||||
<el-option label="全部" value=""></el-option>
|
<el-option label="在用" :value="false"></el-option>
|
||||||
<el-option label="在用" :value="deletedIs"></el-option>
|
<el-option label="已删" :value="true"></el-option>
|
||||||
<el-option label="已删" :value="isDeleted"></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
|
@ -227,7 +226,7 @@
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否删除">
|
<el-form-item label="是否删除">
|
||||||
<el-switch active-color="#f56c6c" v-model="addForm.is_deleted" />
|
<el-switch v-model="addForm.is_deleted" style="--el-switch-on-color: #FF0000;"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
|
|
|
@ -399,7 +399,7 @@
|
||||||
:loading="mlogHandleLoading"
|
:loading="mlogHandleLoading"
|
||||||
>撤回
|
>撤回
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<!-- <el-button
|
||||||
link
|
link
|
||||||
type="success"
|
type="success"
|
||||||
@click="
|
@click="
|
||||||
|
@ -407,7 +407,7 @@
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
日志记录
|
日志记录
|
||||||
</el-button>
|
</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
|
|
|
@ -223,13 +223,13 @@
|
||||||
:loading="mlogHandleLoading"
|
:loading="mlogHandleLoading"
|
||||||
>撤回
|
>撤回
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<!-- <el-button
|
||||||
link
|
link
|
||||||
type="success"
|
type="success"
|
||||||
@click="table_show(scope.row)"
|
@click="table_show(scope.row)"
|
||||||
>
|
>
|
||||||
日志记录
|
日志记录
|
||||||
</el-button>
|
</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
|
|
|
@ -369,7 +369,7 @@
|
||||||
:loading="mlogHandleLoading"
|
:loading="mlogHandleLoading"
|
||||||
>撤回
|
>撤回
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<!-- <el-button
|
||||||
link
|
link
|
||||||
type="success"
|
type="success"
|
||||||
@click="
|
@click="
|
||||||
|
@ -377,7 +377,7 @@
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
日志记录
|
日志记录
|
||||||
</el-button>
|
</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
|
|
|
@ -10,17 +10,28 @@
|
||||||
style="width: 850px;padding-left:10px; height: 50px;background-color: rgb(204,51,0);color:white;font-size: 30px;line-height: 50px">
|
style="width: 850px;padding-left:10px; height: 50px;background-color: rgb(204,51,0);color:white;font-size: 30px;line-height: 50px">
|
||||||
(when low carbon cement technology breakthroughs)
|
(when low carbon cement technology breakthroughs)
|
||||||
</div>
|
</div>
|
||||||
<!-- 柱状图 -->
|
|
||||||
<div id="main" style="width: 1200px; height: 600px;border: 4px solid rgb(204,51,0)"></div>
|
|
||||||
<!-- 折线图 155 / 205-->
|
|
||||||
<div id="mains" style="width: 1200px;height: 600px;position: absolute;top: 205px;"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
<div id="main" style="width: 1200px; height: 600px;border: 4px solid rgb(204,51,0)"></div>
|
||||||
|
|
||||||
|
<div id="mains" style="width: 1200px;height: 600px;position: absolute;top: 205px;"></div>
|
||||||
|
<div id="main1" style="width: 1200px;height: 600px;position: absolute;top: 205px;"></div>
|
||||||
|
<div id="main2" style="width: 1200px;height: 600px;position: absolute;top: 205px;"></div>
|
||||||
|
</div>
|
||||||
|
<div style="position: relative;">
|
||||||
|
<div id="title"
|
||||||
|
style="width: 600px;padding-left:10px; height: 50px;background-color: rgb(204,51,0);color:white;font-size: 30px;line-height: 50px">
|
||||||
|
水泥行业碳排放强度趋势图
|
||||||
|
</div>
|
||||||
|
<div class="yAxisText">碳排放强度(kg CO2/吨水泥)</div>
|
||||||
|
<div class="yearText">{{ currentYear }}</div>
|
||||||
|
<div id="mainLine" style="width: 700px;height: 600px;border: 4px solid rgb(204,51,0);padding-left: 20px;"></div>
|
||||||
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-main>
|
</el-main>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { stack } from "d3";
|
||||||
import * as echarts from "echarts";
|
import * as echarts from "echarts";
|
||||||
const updateFrequency = 2000;
|
const updateFrequency = 2000;
|
||||||
const dimension = 0;
|
const dimension = 0;
|
||||||
|
@ -43,9 +54,19 @@ const years = [2021, 2025, 2030, 2040, 2050, 2060];
|
||||||
export default {
|
export default {
|
||||||
name: "chart",
|
name: "chart",
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {
|
||||||
|
timeInterval:null,
|
||||||
|
currentYear: 2021,
|
||||||
|
currentIndex: 0,
|
||||||
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.intiLineChart();
|
||||||
|
this.intiLine();
|
||||||
|
this.intiBar();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
intiBar(){
|
||||||
//柱状
|
//柱状
|
||||||
var chartDom = document.getElementById("main");
|
var chartDom = document.getElementById("main");
|
||||||
var myChart = echarts.init(chartDom);
|
var myChart = echarts.init(chartDom);
|
||||||
|
@ -137,11 +158,8 @@ export default {
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
max: "dataMax",
|
max: "dataMax",
|
||||||
// max: "13",
|
|
||||||
// min: "0.0008",
|
|
||||||
position: "top",
|
position: "top",
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
// show: false,
|
|
||||||
formatter: function (n) {
|
formatter: function (n) {
|
||||||
return Math.round(n) + "";
|
return Math.round(n) + "";
|
||||||
},
|
},
|
||||||
|
@ -159,8 +177,6 @@ export default {
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
show: true,
|
show: true,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
// formatter: function (value) {
|
|
||||||
// },
|
|
||||||
rich: {
|
rich: {
|
||||||
flag: {
|
flag: {
|
||||||
fontSize: 25,
|
fontSize: 25,
|
||||||
|
@ -214,7 +230,7 @@ export default {
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
myChart.setOption(option);
|
// myChart.setOption(option);
|
||||||
for (let i = startIndex; i < years.length - 1; ++i) {
|
for (let i = startIndex; i < years.length - 1; ++i) {
|
||||||
(function (i) {
|
(function (i) {
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
|
@ -230,6 +246,8 @@ export default {
|
||||||
option.graphic.elements[0].style.text = year;
|
option.graphic.elements[0].style.text = year;
|
||||||
myChart.setOption(option);
|
myChart.setOption(option);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
intiLine(){
|
||||||
//折线
|
//折线
|
||||||
let countries = ["CementCO:Emissions"];
|
let countries = ["CementCO:Emissions"];
|
||||||
let datasetWithFilters = [];
|
let datasetWithFilters = [];
|
||||||
|
@ -272,6 +290,7 @@ export default {
|
||||||
datasetId: "dataset_CementCO:Emissions",
|
datasetId: "dataset_CementCO:Emissions",
|
||||||
showSymbol: false,
|
showSymbol: false,
|
||||||
name: "CementCO:Emissions",
|
name: "CementCO:Emissions",
|
||||||
|
// areaStyle: {},//面性
|
||||||
endLabel: {
|
endLabel: {
|
||||||
show: true,
|
show: true,
|
||||||
formatter: function (params) {
|
formatter: function (params) {
|
||||||
|
@ -337,5 +356,198 @@ export default {
|
||||||
};
|
};
|
||||||
myCharts.setOption(options);
|
myCharts.setOption(options);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
intiLineChart(){
|
||||||
|
let that = this;
|
||||||
|
let i=0;
|
||||||
|
let years = [2021,2025,2030,2040,2050,2060];
|
||||||
|
that.timeInterval=setInterval(function () {
|
||||||
|
that.currentYear = years[that.currentIndex];
|
||||||
|
if(that.currentIndex < 6){
|
||||||
|
that.currentIndex++;
|
||||||
|
}else{
|
||||||
|
that.currentYear = 2060
|
||||||
|
}
|
||||||
|
},1500)
|
||||||
|
let chartLineDom = document.getElementById('mainLine');
|
||||||
|
let myLineChart = echarts.init(chartLineDom);
|
||||||
|
const lineItems = [
|
||||||
|
'吨水泥碳排放',
|
||||||
|
'碳捕集',
|
||||||
|
'清洁能源电力',
|
||||||
|
'能效提升',
|
||||||
|
'替代燃料',
|
||||||
|
'低碳水泥'
|
||||||
|
];
|
||||||
|
let colors= ['rgb(43,140,190)', 'rgb(78,179,211)', 'rgb(123,204,196)', 'rgb(204,235,197)', 'rgb(224,243,219)', 'rgb(247,252,240)'];
|
||||||
|
let datasetWithFilters = [],seriesList =[];
|
||||||
|
lineItems.forEach((item,index) => {
|
||||||
|
var datasetId = 'dataset_' + item;
|
||||||
|
datasetWithFilters.push({
|
||||||
|
id: datasetId,
|
||||||
|
fromDatasetId: 'dataset_raw',
|
||||||
|
transform: {
|
||||||
|
type: 'filter',
|
||||||
|
config: {
|
||||||
|
and: [
|
||||||
|
{ dimension: 'Year', gte: 2020 },
|
||||||
|
{ dimension: 'Country', '=': item }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
seriesList.push({
|
||||||
|
type: 'line',
|
||||||
|
stack: 'Total',
|
||||||
|
datasetId: datasetId,
|
||||||
|
showSymbol: false,
|
||||||
|
name: item,
|
||||||
|
areaStyle: {
|
||||||
|
color:colors[index]
|
||||||
|
},
|
||||||
|
lineStyle:{
|
||||||
|
color:colors[index]
|
||||||
|
},
|
||||||
|
// endLabel: {
|
||||||
|
// show: true,
|
||||||
|
// formatter: function (params) {
|
||||||
|
// return params.value[3] + ': ' + params.value[0];
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
labelLayout: {
|
||||||
|
moveOverlap: 'shiftY'
|
||||||
|
},
|
||||||
|
emphasis: {
|
||||||
|
focus: 'series'
|
||||||
|
},
|
||||||
|
encode: {
|
||||||
|
x: 'Year',
|
||||||
|
y: 'Income',
|
||||||
|
label: ['Country', 'Income'],
|
||||||
|
itemName: 'Year',
|
||||||
|
tooltip: ['Income']
|
||||||
|
},
|
||||||
|
});
|
||||||
|
})
|
||||||
|
let _rawData = [
|
||||||
|
["Income", "Country", "Year"],
|
||||||
|
[573, "吨水泥碳排放", 2021],
|
||||||
|
[550, "吨水泥碳排放", 2025],
|
||||||
|
[520, "吨水泥碳排放", 2030],
|
||||||
|
[420, "吨水泥碳排放", 2040],
|
||||||
|
[296, "吨水泥碳排放", 2050],
|
||||||
|
[31, "吨水泥碳排放", 2060],
|
||||||
|
[0, "碳捕集", 2021],
|
||||||
|
[6, "碳捕集", 2025],
|
||||||
|
[10, "碳捕集", 2030],
|
||||||
|
[27, "碳捕集", 2040],
|
||||||
|
[79, "碳捕集", 2050],
|
||||||
|
[260, "碳捕集", 2060],
|
||||||
|
[0, "清洁能源电力", 2021],
|
||||||
|
[1, "清洁能源电力", 2025],
|
||||||
|
[4, "清洁能源电力", 2030],
|
||||||
|
[10, "清洁能源电力", 2040],
|
||||||
|
[15, "清洁能源电力", 2050],
|
||||||
|
[20, "清洁能源电力", 2060],
|
||||||
|
[0, "能效提升", 2021],
|
||||||
|
[6, "能效提升", 2025],
|
||||||
|
[15, "能效提升", 2030],
|
||||||
|
[15, "能效提升", 2040],
|
||||||
|
[15, "能效提升", 2050],
|
||||||
|
[15, "能效提升", 2060],
|
||||||
|
[0, "替代燃料", 2021],
|
||||||
|
[18, "替代燃料", 2025],
|
||||||
|
[32, "替代燃料", 2030],
|
||||||
|
[72, "替代燃料", 2040],
|
||||||
|
[90, "替代燃料", 2050],
|
||||||
|
[163, "替代燃料", 2060],
|
||||||
|
[0, "低碳水泥", 2021],
|
||||||
|
[5, "低碳水泥", 2025],
|
||||||
|
[10, "低碳水泥", 2030],
|
||||||
|
[50, "低碳水泥", 2040],
|
||||||
|
[100, "低碳水泥", 2050],
|
||||||
|
[105, "低碳水泥", 2060],
|
||||||
|
];
|
||||||
|
let lineOptions = {
|
||||||
|
color:colors,
|
||||||
|
animationDuration: 10000,
|
||||||
|
legend:{
|
||||||
|
// type: 'plain',
|
||||||
|
icon:'rect',
|
||||||
|
top:'95%'
|
||||||
|
|
||||||
|
},
|
||||||
|
dataset: [
|
||||||
|
{
|
||||||
|
id: "dataset_raw",
|
||||||
|
source: _rawData,
|
||||||
|
},
|
||||||
|
...datasetWithFilters,
|
||||||
|
],
|
||||||
|
tooltip: {
|
||||||
|
order: 'valueDesc',
|
||||||
|
trigger: 'axis'
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
nameLocation: 'middle',
|
||||||
|
boundaryGap: false,
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
max: '600', //取最大值为最大刻度
|
||||||
|
// name: '碳排放强度(kg CO2/吨水泥)'
|
||||||
|
},
|
||||||
|
|
||||||
|
// graphic: {
|
||||||
|
// elements: [
|
||||||
|
// {
|
||||||
|
// type: "text",
|
||||||
|
// left: "center",
|
||||||
|
// bottom: 60,
|
||||||
|
// style: {
|
||||||
|
// text: startYear,
|
||||||
|
// font: "bolder 80px monospace",
|
||||||
|
// fill: "#d6000f",
|
||||||
|
// },
|
||||||
|
// z: 100,
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
// },
|
||||||
|
series: seriesList
|
||||||
|
}
|
||||||
|
myLineChart.setOption(lineOptions);
|
||||||
|
// for (let i = startIndex; i < years.length - 1; ++i) {
|
||||||
|
// (function (i) {
|
||||||
|
// setTimeout(function () {
|
||||||
|
// updateYear(years[i + 1]);
|
||||||
|
// }, (i - startIndex) * updateFrequency);
|
||||||
|
// })(i);
|
||||||
|
// }
|
||||||
|
// function updateYear(year) {
|
||||||
|
// lineOptions.graphic.elements[0].style.text = year;
|
||||||
|
// myLineChart.setOption(lineOptions);
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.yAxisText{
|
||||||
|
position: absolute;
|
||||||
|
left: -78px;
|
||||||
|
top: 295px;
|
||||||
|
transform: rotateZ(-90deg);
|
||||||
|
font-size: 14px;
|
||||||
|
color: #666666;
|
||||||
|
}
|
||||||
|
.yearText{
|
||||||
|
position: absolute;
|
||||||
|
left: 286px;
|
||||||
|
bottom: 100px;
|
||||||
|
color: red;
|
||||||
|
width: 100px;
|
||||||
|
height: 50px;
|
||||||
|
z-index: 9999;
|
||||||
|
font-size: 50px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -135,7 +135,257 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-divider style="margin-top:0"></el-divider>
|
<el-divider style="margin-top:0"></el-divider>
|
||||||
<el-row>
|
<!-- 尺寸检验 -->
|
||||||
|
<el-row v-if="mgroupName=='size'">
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="黑圈内径">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="count_notok_json.count_n_hqnj"
|
||||||
|
style="width: 100%"
|
||||||
|
precision="0"
|
||||||
|
@change="handleCountChange"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="黑圈内径圆度">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="count_notok_json.count_n_hqnjyd"
|
||||||
|
style="width: 100%"
|
||||||
|
precision="0"
|
||||||
|
@change="handleCountChange"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="黑圈外径">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="count_notok_json.count_n_hqwj"
|
||||||
|
style="width: 100%"
|
||||||
|
precision="0"
|
||||||
|
@change="handleCountChange"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="黑圈外径圆度">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="count_notok_json.count_n_hqwjyd"
|
||||||
|
style="width: 100%"
|
||||||
|
precision="0"
|
||||||
|
@change="handleCountChange"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="产品外径">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="count_notok_json.count_n_wj"
|
||||||
|
style="width: 100%"
|
||||||
|
precision="0"
|
||||||
|
@change="handleCountChange"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="产品圆度">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="count_notok_json.count_n_yd"
|
||||||
|
style="width: 100%"
|
||||||
|
precision="0"
|
||||||
|
@change="handleCountChange"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="产品同心度">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="count_notok_json.count_n_txd"
|
||||||
|
style="width: 100%"
|
||||||
|
precision="0"
|
||||||
|
@change="handleCountChange"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="厚度">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="count_notok_json.count_n_hd"
|
||||||
|
style="width: 100%"
|
||||||
|
precision="0"
|
||||||
|
@change="handleCountChange"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="准合格">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="count_notok_json.count_n_zhg"
|
||||||
|
style="width: 100%"
|
||||||
|
precision="0"
|
||||||
|
@change="handleCountChange"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="圆准">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="count_notok_json.count_n_yz"
|
||||||
|
style="width: 100%"
|
||||||
|
precision="0"
|
||||||
|
@change="handleCountChange"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<!-- 外观检验 -->
|
||||||
|
<el-row v-else-if="mgroupName=='facade'">
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="脏">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="count_notok_json.count_n_z"
|
||||||
|
style="width: 100%"
|
||||||
|
precision="0"
|
||||||
|
@change="handleCountChange"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="气泡">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="count_notok_json.count_n_qp"
|
||||||
|
style="width: 100%"
|
||||||
|
precision="0"
|
||||||
|
@change="handleCountChange"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="水纹">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="count_notok_json.count_n_swen"
|
||||||
|
style="width: 100%"
|
||||||
|
precision="0"
|
||||||
|
@change="handleCountChange"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="崩边">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="count_notok_json.count_n_bb"
|
||||||
|
style="width: 100%"
|
||||||
|
precision="0"
|
||||||
|
@change="handleCountChange"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="棕边">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="count_notok_json.count_n_zb"
|
||||||
|
style="width: 100%"
|
||||||
|
precision="0"
|
||||||
|
@change="handleCountChange"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="棕圈">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="count_notok_json.count_n_zq"
|
||||||
|
style="width: 100%"
|
||||||
|
precision="0"
|
||||||
|
@change="handleCountChange"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="划伤">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="count_notok_json.count_n_hs"
|
||||||
|
style="width: 100%"
|
||||||
|
precision="0"
|
||||||
|
@change="handleCountChange"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="麻点">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="count_notok_json.count_n_md"
|
||||||
|
style="width: 100%"
|
||||||
|
precision="0"
|
||||||
|
@change="handleCountChange"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="黑圈变形">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="count_notok_json.count_n_hqbx"
|
||||||
|
style="width: 100%"
|
||||||
|
precision="0"
|
||||||
|
@change="handleCountChange"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="倒角">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="count_notok_json.count_n_dj"
|
||||||
|
style="width: 100%"
|
||||||
|
precision="0"
|
||||||
|
|
||||||
|
@change="handleCountChange"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="破损">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="count_notok_json.count_n_ps"
|
||||||
|
style="width: 100%"
|
||||||
|
precision="0"
|
||||||
|
@change="handleCountChange"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="蓝圈">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="count_notok_json.count_n_lq"
|
||||||
|
style="width: 100%"
|
||||||
|
precision="0"
|
||||||
|
@change="handleCountChange"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<!-- 过程检验 -->
|
||||||
|
<el-row v-else>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="厚度">
|
<el-form-item label="厚度">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
@ -288,6 +538,10 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: "",
|
||||||
},
|
},
|
||||||
|
mgroupName:{
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
itemObj:{
|
itemObj:{
|
||||||
type: Object,
|
type: Object,
|
||||||
default: null,
|
default: null,
|
||||||
|
|
|
@ -113,30 +113,34 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="处理备注">
|
||||||
|
<el-input v-model="form.note" placeholder="处理备注"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-form-item label="交接物料">
|
<el-form-item label="交接物料">
|
||||||
<el-button type="primary" @click="addMaterial" v-if="mode!=='show'">手动添加</el-button>
|
<el-button type="primary" @click="addMaterial" v-if="mode!=='show'">手动添加</el-button>
|
||||||
<scan-dialog ref="scanDialog" @closed="scanClose"> </scan-dialog>
|
<scan-dialog ref="scanDialog" @closed="scanClose"> </scan-dialog>
|
||||||
<!-- <el-button type="primary" @click="scanCode" v-if="mode!=='show'">扫码添加</el-button> -->
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row v-for="(listItem,$index) in form.handoverb" :key="listItem">
|
<el-row v-show="addShow">
|
||||||
<el-col :span="10">
|
<el-col>
|
||||||
<el-form-item label="交接物料">
|
<el-form-item label="交接物料">
|
||||||
<el-select
|
<el-select
|
||||||
v-if="mode!=='show'"
|
v-model="selectItems"
|
||||||
v-model="listItem.wm"
|
|
||||||
placeholder="交接物料"
|
placeholder="交接物料"
|
||||||
filterable
|
filterable
|
||||||
|
multiple
|
||||||
clearable
|
clearable
|
||||||
@change="materialChange($index)"
|
@change="materialChange"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in materialOptions"
|
v-for="item in materialOptions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.label"
|
:label="item.batch"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
>
|
>
|
||||||
<span>{{ item.batch }}</span>
|
<span>{{ item.batch }}</span>
|
||||||
|
@ -148,12 +152,18 @@
|
||||||
</div>
|
</div>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-input v-else v-model="listItem.batch" disabled></el-input>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-for="(listItem,$index) in form.handoverb" :key="listItem">
|
||||||
|
<el-col :span="10">
|
||||||
|
<el-form-item label="交接物料">
|
||||||
|
<el-input v-model="listItem.batch" disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item label="总数量">
|
<el-form-item label="总数量">
|
||||||
<span>{{ listItem.counts }}</span>
|
<span>{{ listItem.count_cando }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="7">
|
<el-col :span="7">
|
||||||
|
@ -163,11 +173,12 @@
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
:min="0"
|
:min="0"
|
||||||
step="1"
|
step="1"
|
||||||
:max="listItem.counts"
|
:max="listItem.count_cando"
|
||||||
:disabled="mode==='show'"
|
:disabled="mode==='show'"
|
||||||
:step-strictly="true"
|
:step-strictly="true"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="交接数量"
|
placeholder="交接数量"
|
||||||
|
@change="countChange"
|
||||||
>
|
>
|
||||||
</el-input-number>
|
</el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -176,6 +187,9 @@
|
||||||
<el-button type="danger" icon="el-icon-delete" @click="delMaterial($index)"></el-button>
|
<el-button type="danger" icon="el-icon-delete" @click="delMaterial($index)"></el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<div class="total-count">总计:{{ totalCount }}</div>
|
||||||
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-footer v-if="mode!=='show'">
|
<el-footer v-if="mode!=='show'">
|
||||||
<el-button type="primary" v-loading="isSaveing" @click="submit">确定</el-button>
|
<el-button type="primary" v-loading="isSaveing" @click="submit">确定</el-button>
|
||||||
|
@ -206,6 +220,7 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
selectItems:[],
|
||||||
yseorno: ["是", "否"],
|
yseorno: ["是", "否"],
|
||||||
loading: false,
|
loading: false,
|
||||||
mode: "add",
|
mode: "add",
|
||||||
|
@ -273,12 +288,17 @@ export default {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
listParams:{
|
||||||
|
|
||||||
|
},
|
||||||
|
totalCount: 0,
|
||||||
deptID:'',
|
deptID:'',
|
||||||
userList: [],
|
userList: [],
|
||||||
userList2: [],
|
userList2: [],
|
||||||
deptOptions:[],
|
deptOptions:[],
|
||||||
mgroupOptions: [],
|
mgroupOptions: [],
|
||||||
materialOptions: [],
|
materialOptions: [],
|
||||||
|
addShow: false,
|
||||||
visible: false,
|
visible: false,
|
||||||
scanVisible:false,
|
scanVisible:false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
|
@ -350,15 +370,9 @@ export default {
|
||||||
that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => {
|
that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => {
|
||||||
if(res.length>0){
|
if(res.length>0){
|
||||||
req.belong_dept=res[0].id;
|
req.belong_dept=res[0].id;
|
||||||
|
that.listParams = req;
|
||||||
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
||||||
let arr = [];
|
that.materialOptions = res;
|
||||||
res.forEach(item=>{
|
|
||||||
let obj = {};
|
|
||||||
Object.assign(obj,item);
|
|
||||||
obj.label = item.batch;
|
|
||||||
arr.push(obj);
|
|
||||||
})
|
|
||||||
that.materialOptions = arr;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -366,32 +380,19 @@ export default {
|
||||||
that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => {
|
that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => {
|
||||||
if(res.length>0){
|
if(res.length>0){
|
||||||
req.belong_dept=res[0].id;
|
req.belong_dept=res[0].id;
|
||||||
|
that.listParams = req;
|
||||||
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
||||||
let arr = [];
|
that.materialOptions = res;
|
||||||
res.forEach(item=>{
|
|
||||||
let obj = {};
|
|
||||||
Object.assign(obj,item);
|
|
||||||
obj.label = item.batch;
|
|
||||||
arr.push(obj);
|
|
||||||
})
|
|
||||||
that.materialOptions = arr;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
req.mgroupx = that.mgroupId;
|
req.mgroupx = that.mgroupId;
|
||||||
|
that.listParams = req;
|
||||||
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
||||||
let arr = [];
|
that.materialOptions = res;
|
||||||
res.forEach(item=>{
|
|
||||||
let obj = {};
|
|
||||||
Object.assign(obj,item);
|
|
||||||
obj.label = item.batch;
|
|
||||||
arr.push(obj);
|
|
||||||
})
|
|
||||||
that.materialOptions = arr;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
//获取车间不合格物料
|
//获取车间不合格物料
|
||||||
getMaterialNotok() {
|
getMaterialNotok() {
|
||||||
|
@ -402,15 +403,9 @@ export default {
|
||||||
notok_sign__isnull : 0,
|
notok_sign__isnull : 0,
|
||||||
count_xtest__isnull:1
|
count_xtest__isnull:1
|
||||||
};
|
};
|
||||||
|
that.listParams = req;
|
||||||
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
||||||
let arr = [];
|
that.materialOptions = res;
|
||||||
res.forEach(item=>{
|
|
||||||
let obj = {};
|
|
||||||
Object.assign(obj,item);
|
|
||||||
obj.label = item.batch+'('+item.notok_sign_name+')';
|
|
||||||
arr.push(obj);
|
|
||||||
})
|
|
||||||
that.materialOptions = arr;
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//获取交送工段人员
|
//获取交送工段人员
|
||||||
|
@ -451,10 +446,11 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
addMaterial(){
|
addMaterial(){
|
||||||
this.form.handoverb.push({wm:'',count:'',counts:null});
|
this.addShow = true;
|
||||||
},
|
},
|
||||||
delMaterial(index){
|
delMaterial(index){
|
||||||
this.form.handoverb.splice(index,1);
|
this.form.handoverb.splice(index,1);
|
||||||
|
this.countChange();
|
||||||
},
|
},
|
||||||
//显示
|
//显示
|
||||||
open(mode = "add") {
|
open(mode = "add") {
|
||||||
|
@ -462,14 +458,29 @@ export default {
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
materialChange(index) {
|
materialChange() {
|
||||||
let val = this.form.handoverb[index].wm;
|
let that = this;
|
||||||
let data = this.materialOptions.filter((item) => {
|
let totalCount = 0;
|
||||||
return item.id == val;
|
let data = that.materialOptions.filter((item) => {
|
||||||
|
return that.selectItems.indexOf(item.id)>-1;
|
||||||
});
|
});
|
||||||
this.form.handoverb[index].batch = data[0].batch;
|
data.forEach(item=>{
|
||||||
this.form.handoverb[index].counts = data[0].count;
|
item.wm = item.id;
|
||||||
this.form.handoverb[index].count = data[0].count;
|
item.count = item.count_cando;
|
||||||
|
totalCount += item.count_cando;
|
||||||
|
})
|
||||||
|
that.totalCount = totalCount;
|
||||||
|
that.form.handoverb = data;
|
||||||
|
},
|
||||||
|
countChange(){
|
||||||
|
let that = this;
|
||||||
|
let totalCount = 0;
|
||||||
|
if(this.form.handoverb.length>0){
|
||||||
|
this.form.handoverb.forEach(item=>{
|
||||||
|
totalCount += item.count;
|
||||||
|
})
|
||||||
|
that.totalCount = totalCount;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
//提交
|
//提交
|
||||||
submit() {
|
submit() {
|
||||||
|
@ -532,9 +543,6 @@ export default {
|
||||||
scanCode(){
|
scanCode(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.scanVisible = true;
|
that.scanVisible = true;
|
||||||
// that.$nextTick(() => {
|
|
||||||
// that.$refs.scanDialog.open();
|
|
||||||
// });
|
|
||||||
},
|
},
|
||||||
scanClose(data){
|
scanClose(data){
|
||||||
if(data==''||data==undefined||data==null){
|
if(data==''||data==undefined||data==null){
|
||||||
|
@ -544,17 +552,14 @@ export default {
|
||||||
let id = data.split('#')[1];
|
let id = data.split('#')[1];
|
||||||
console.log('id',id);
|
console.log('id',id);
|
||||||
this.$API.cm.labelmat.item.req(id).then((res) => {
|
this.$API.cm.labelmat.item.req(id).then((res) => {
|
||||||
// console.log('res',res);
|
|
||||||
let arr = that.form.handoverb.filter((item) => {
|
let arr = that.form.handoverb.filter((item) => {
|
||||||
return item.batch == res.batch;
|
return item.batch == res.batch;
|
||||||
})
|
})
|
||||||
// console.log('arr',arr);
|
|
||||||
if(arr.length>0){
|
if(arr.length>0){
|
||||||
that.$message.error("该批次已存在")
|
that.$message.error("该批次已存在")
|
||||||
}else{
|
}else{
|
||||||
that.materialOptions.forEach((item) => {
|
that.materialOptions.forEach((item) => {
|
||||||
if(item.batch == res.batch){
|
if(item.batch == res.batch){
|
||||||
// let arr = that.form.handoverb
|
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.wm = item.id;
|
obj.wm = item.id;
|
||||||
obj.batch = item.batch;
|
obj.batch = item.batch;
|
||||||
|
@ -577,4 +582,10 @@ export default {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
.total-count{
|
||||||
|
width: 100%;
|
||||||
|
text-align: right;
|
||||||
|
height: 50px;
|
||||||
|
line-height: 50px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -107,7 +107,6 @@
|
||||||
fixed="right"
|
fixed="right"
|
||||||
align="center"
|
align="center"
|
||||||
width="120"
|
width="120"
|
||||||
|
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -115,14 +114,15 @@
|
||||||
@click="table_Check(scope.row)"
|
@click="table_Check(scope.row)"
|
||||||
v-auth="'ftestwork.create'"
|
v-auth="'ftestwork.create'"
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="mgroupName!=='size'&&mgroupName!=='facade'&&scope.row.notok_sign_name == null"
|
v-if="scope.row.notok_sign_name == null"
|
||||||
>检验
|
>检验
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<!-- v-if="mgroupName!=='size'&&mgroupName!=='facade'&&scope.row.notok_sign_name == null" -->
|
||||||
<el-button
|
<el-button
|
||||||
link size="small"
|
link size="small"
|
||||||
type="warning"
|
type="warning"
|
||||||
@click="tableCheckList(scope.row)"
|
@click="tableCheckList(scope.row)"
|
||||||
v-if="mgroupName!=='size'&&mgroupName!=='facade'&&scope.row.notok_sign_name == null"
|
v-if="scope.row.notok_sign_name == null"
|
||||||
>检验记录
|
>检验记录
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
|
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
|
||||||
|
@ -142,6 +142,7 @@
|
||||||
v-if="dialog.save"
|
v-if="dialog.save"
|
||||||
ref="saveDialog"
|
ref="saveDialog"
|
||||||
:mgroup="mgroupId"
|
:mgroup="mgroupId"
|
||||||
|
:mgroupName="mgroupName"
|
||||||
:itemObj = "checkItem"
|
:itemObj = "checkItem"
|
||||||
@success="handleSaveSuccess"
|
@success="handleSaveSuccess"
|
||||||
@closed="dialog.save = false"
|
@closed="dialog.save = false"
|
||||||
|
@ -251,10 +252,12 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
console.log(that.mgroupName);
|
||||||
if(that.mgroupName=="size"){
|
if(that.mgroupName=="size"){
|
||||||
// that.params.material__process__name = "一次超洗";
|
// that.params.material__process__name = "一次超洗";
|
||||||
that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => {
|
that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => {
|
||||||
if(res.length>0){
|
if(res.length>0){
|
||||||
|
that.params.mgroupx = null;
|
||||||
that.params.belong_dept=res[0].id;
|
that.params.belong_dept=res[0].id;
|
||||||
}
|
}
|
||||||
that.apiObj = that.$API.wpm.wmaterial.list;
|
that.apiObj = that.$API.wpm.wmaterial.list;
|
||||||
|
@ -263,6 +266,7 @@ export default {
|
||||||
// that.params.material__process__name = "二次超洗";
|
// that.params.material__process__name = "二次超洗";
|
||||||
that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => {
|
that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => {
|
||||||
if(res.length>0){
|
if(res.length>0){
|
||||||
|
that.params.mgroupx = null;
|
||||||
that.params.belong_dept=res[0].id;
|
that.params.belong_dept=res[0].id;
|
||||||
}
|
}
|
||||||
that.apiObj = that.$API.wpm.wmaterial.list;
|
that.apiObj = that.$API.wpm.wmaterial.list;
|
||||||
|
@ -279,7 +283,7 @@ export default {
|
||||||
that.$TOOL.data.set('gx_deptID',res[0].belong_dept)
|
that.$TOOL.data.set('gx_deptID',res[0].belong_dept)
|
||||||
that.process = res[0].process;
|
that.process = res[0].process;
|
||||||
that.params.mgroupx = res[0].id;
|
that.params.mgroupx = res[0].id;
|
||||||
that.params.belong_dept = res[0].belong_dept;
|
// that.params.belong_dept = res[0].belong_dept;
|
||||||
that.apiObj = that.$API.wpm.wmaterial.list;
|
that.apiObj = that.$API.wpm.wmaterial.list;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,18 @@
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="可用批" v-if="mgroupName!='切片'">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
v-if="scope.row.state == 20"
|
||||||
|
@click="viewBatches(scope.row)">
|
||||||
|
查看
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" width="90">
|
<el-table-column label="操作" fixed="right" width="90">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -60,6 +72,27 @@
|
||||||
@closed="detailClose"
|
@closed="detailClose"
|
||||||
>
|
>
|
||||||
</deliver-drawer>
|
</deliver-drawer>
|
||||||
|
<el-dialog v-model="dialogVisible">
|
||||||
|
<scTable hidePagination hideDo :apiObj="m_apiObj" :query="m_query" ref="mTable">
|
||||||
|
<el-table-column
|
||||||
|
label="物料名称"
|
||||||
|
prop="material_name"
|
||||||
|
min-width="150"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.material_name }}
|
||||||
|
<span v-if="scope.row.material_origin != null"
|
||||||
|
>({{ scope.row.material_origin_name }})</span
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="批次号"
|
||||||
|
prop="batch"
|
||||||
|
min-width="120"
|
||||||
|
></el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-dialog>
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
@ -77,6 +110,9 @@ export default {
|
||||||
name: "mtask",
|
name: "mtask",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
dialogVisible: false,
|
||||||
|
m_apiObj: null,
|
||||||
|
m_query: null,
|
||||||
apiObj: null,
|
apiObj: null,
|
||||||
params: { mgroup: "",state:20 },
|
params: { mgroup: "",state:20 },
|
||||||
query: {},
|
query: {},
|
||||||
|
@ -123,6 +159,14 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
viewBatches(row){
|
||||||
|
this.dialogVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.m_query = {mtaskx: row.id};
|
||||||
|
this.m_apiObj = this.$API.wpm.wmaterial.list;
|
||||||
|
this.$refs.mTable.queryData(this.m_query);
|
||||||
|
});
|
||||||
|
},
|
||||||
elTagType(state) {
|
elTagType(state) {
|
||||||
return this.type_[state];
|
return this.type_[state];
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue