This commit is contained in:
caoqianming 2024-08-28 17:18:23 +08:00
commit f636d549c0
20 changed files with 1183 additions and 248 deletions

View File

@ -3025,7 +3025,7 @@ const routes = [
meta: { meta: {
title: "黑化车间", title: "黑化车间",
icon: "el-icon-trend-charts", icon: "el-icon-trend-charts",
perms: ["bigScreenP_dept10"], perms: ["bigScreenP_dept_hh"],
fullpage: true, fullpage: true,
}, },
component: "bigScreen/index_heihuadept.vue", component: "bigScreen/index_heihuadept.vue",

View File

@ -223,6 +223,21 @@
<el-col :span="12"> <el-col :span="12">
<div><span class="infotitle">TSP</span> 0.000 /h</div> <div><span class="infotitle">TSP</span> 0.000 /h</div>
</el-col> </el-col>
</el-row>
<div class="typeLine">
<div class="greenBlock">
<div class="greenBlockInner"></div>
</div>
<span>监控设备</span>
</div>
<div class="infoLine">
<span class="circles"></span>
<span>{{ eqj.name }}</span>
</div>
<el-row class="infoLine">
<el-col :span="12">
<div id="divPlugin" class="plugin"></div>
</el-col>
</el-row> </el-row>
</div> </div>
</div> </div>
@ -255,6 +270,7 @@ export default {
eqs: {}, eqs: {},
eqc: {}, eqc: {},
eqz: {}, eqz: {},
eqj: {},
pollutantDetail: false, pollutantDetail: false,
query: {}, query: {},
apiObj: this.$API.enp.drain.list, apiObj: this.$API.enp.drain.list,
@ -316,7 +332,8 @@ export default {
} }
}, },
mounted() { mounted() {
let that = this;
that.init();
}, },
methods: { methods: {
initDom() { initDom() {
@ -363,7 +380,13 @@ export default {
that.getDetailData(2, id); that.getDetailData(2, id);
} else if (res.type == 30) { // } else if (res.type == 30) { //
that.eqz = res; that.eqz = res;
that.getDetailData(3, id); that.getDetailData(3, id);
}
else if (res.type == 50) { //
debugger;
this.login(res);//
that.eqj = res;
} }
}) })
}); });
@ -425,6 +448,70 @@ export default {
this.pollutantDetail = false; this.pollutantDetail = false;
this.detailItem = {}; this.detailItem = {};
}, },
//
//
init() {
WebVideoCtrl.I_InsertOBJECTPlugin("divPlugin");
//
alert(1)
WebVideoCtrl.I_InitPlugin("divPlugin", 200, 200, {
iWndowType: 2, //N*N
bWndFull: true, //
cbInitPluginCompleted: function () {
alert(1)
WebVideoCtrl.I_InsertOBJECTPlugin("divPlugin").then(() => {
//
WebVideoCtrl.I_CheckPluginVersion().then((bFlag) => {
if (bFlag) {
alert("检测到新的插件版本双击开发包目录里的HCWebSDKPlugin.exe升级");
}
});
}, () => {
alert("插件初始化失败请确认是否已安装插件如果未安装请双击开发包目录里的HCWebSDKPlugin.exe安装");
});
},
});
},
//
login(jkdata){
WebVideoCtrl.I_Login(
jkdata.ip,
1,
jkdata.port,
jkdata.login_name,
jkdata.login_pwd,
{
async: true,
cgi: 1,
success: (xmlDoc) => {
console.log("登录成功", xmlDoc);
//
WebVideoCtrl.I_StartRealPlay(szIp + "_" + ipPort, {
success: () => {
console.log("预览成功");
},
});
},
error: (xmlDoc) => {
console.log("登录失败", xmlDoc);
},
}
);
}
} }
} }
</script> </script>
<style scoped>
.plugin {
width: 200px;
height: 200px;
/* background: #ffffff; */
}
</style>

View File

@ -58,27 +58,27 @@
background-color: rgb(4, 50, 83); background-color: rgb(4, 50, 83);
box-shadow: inset 0px 0px 30px 15px rgb(7, 79, 109)" v-model="dialogFormVisible" title="车辆运输台账详情" > box-shadow: inset 0px 0px 30px 15px rgb(7, 79, 109)" v-model="dialogFormVisible" title="车辆运输台账详情" >
<el-descriptions :column="3" width="600px"> <el-descriptions :column="3" width="600px">
<el-descriptions-item label="出入口编号">{{ ysdata.crkbh }}</el-descriptions-item> <el-descriptions-item label="出入口编号">{{ ysdata.crkbh }}</el-descriptions-item>
<el-descriptions-item label="道闸编号">{{ ysdata.dzbh }}</el-descriptions-item> <el-descriptions-item label="道闸编号">{{ ysdata.dzbh }}</el-descriptions-item>
<el-descriptions-item label="抬杆方式">{{ ysdata.tgfs }}</el-descriptions-item> <el-descriptions-item label="抬杆方式">{{ ysdata.tgfs }}</el-descriptions-item>
<el-descriptions-item label="进厂时间">{{ ysdata.jcsj }}</el-descriptions-item> <el-descriptions-item label="进厂时间">{{ ysdata.jcsj }}</el-descriptions-item>
<el-descriptions-item label="出厂时间">{{ ysdata.ccsj }}</el-descriptions-item> <el-descriptions-item label="出厂时间">{{ ysdata.ccsj }}</el-descriptions-item>
<el-descriptions-item label="车辆类型">{{ ysdata.cllx }}</el-descriptions-item> <el-descriptions-item label="车辆类型">{{ ysdata.cllx }}</el-descriptions-item>
<el-descriptions-item label="车牌颜色">{{ ysdata.clys }}</el-descriptions-item> <el-descriptions-item label="车牌颜色">{{ ysdata.clys }}</el-descriptions-item>
<el-descriptions-item label="车牌号">{{ ysdata.cph }}</el-descriptions-item> <el-descriptions-item label="车牌号">{{ ysdata.cph }}</el-descriptions-item>
<el-descriptions-item label="注册登记日期">{{ ysdata.zcdjsj }}</el-descriptions-item> <el-descriptions-item label="注册登记日期">{{ ysdata.zcdjsj }}</el-descriptions-item>
<el-descriptions-item label="车辆识别代码VIN">{{ ysdata.cpsbdm }}</el-descriptions-item> <el-descriptions-item label="车辆识别代码VIN">{{ ysdata.cpsbdm }}</el-descriptions-item>
<el-descriptions-item label="车辆品牌型号">{{ ysdata.clppxh }}</el-descriptions-item> <el-descriptions-item label="车辆品牌型号">{{ ysdata.clppxh }}</el-descriptions-item>
<el-descriptions-item label="发动机号码">{{ ysdata.fdjhm }}</el-descriptions-item> <el-descriptions-item label="发动机号码">{{ ysdata.fdjhm }}</el-descriptions-item>
<el-descriptions-item label="燃料类型">{{ ysdata.rllx }}</el-descriptions-item> <el-descriptions-item label="燃料类型">{{ ysdata.rllx }}</el-descriptions-item>
<el-descriptions-item label="排放阶段">{{ ysdata.pfjd }}</el-descriptions-item> <el-descriptions-item label="排放阶段">{{ ysdata.pfjd }}</el-descriptions-item>
<el-descriptions-item label="使用性质">{{ ysdata.syxz }}</el-descriptions-item> <el-descriptions-item label="使用性质">{{ ysdata.syxz }}</el-descriptions-item>
<el-descriptions-item label="联网状态">{{ ysdata.lwzt }}</el-descriptions-item> <el-descriptions-item label="联网状态">{{ ysdata.lwzt }}</el-descriptions-item>
<el-descriptions-item label="进厂运输货物名称">{{ ysdata.jcyshwmc }}</el-descriptions-item> <el-descriptions-item label="进厂运输货物名称">{{ ysdata.jcyshwmc }}</el-descriptions-item>
<el-descriptions-item label="进厂运输货物量">{{ ysdata.jchwl }}</el-descriptions-item> <el-descriptions-item label="进厂运输货物量">{{ ysdata.jchwl }}</el-descriptions-item>
<el-descriptions-item label="出厂运输货物名称">{{ ysdata.cchwmc }}</el-descriptions-item> <el-descriptions-item label="出厂运输货物名称">{{ ysdata.cchwmc }}</el-descriptions-item>
<el-descriptions-item label="出厂运输货物量">{{ ysdata.cchwl }}</el-descriptions-item> <el-descriptions-item label="出厂运输货物量">{{ ysdata.cchwl }}</el-descriptions-item>
<el-descriptions-item label="车队名称">{{ ysdata.cdmc }}</el-descriptions-item> <el-descriptions-item label="车队名称">{{ ysdata.cdmc }}</el-descriptions-item>
<el-descriptions-item label="进厂照片"> <el-descriptions-item label="进厂照片">
<div class="demo-image__preview"> <div class="demo-image__preview">

View File

@ -3,18 +3,29 @@
<el-main> <el-main>
<div class="about"> <div class="about">
<div id="divPlugin" class="plugin"></div> <div id="divPlugin" class="plugin"></div>
<el-button @click="Login" type="primary">登录</el-button> <div style="margin-top: 30px;">
<el-button @click="vShow" type="primary">预览</el-button> <el-button @click="Login" type="primary">登录</el-button>
<el-button @click="stopShow" type="warning">停止预览</el-button> <el-button @click="vShow" type="primary">预览</el-button>
<el-button @click="logOut" type="warning">登出设备</el-button> <el-button @click="stopShow" type="warning">停止预览</el-button>
<el-button @click="breakdom" type="warning">销毁设备</el-button> <el-button @click="logOut" type="warning">登出设备</el-button>
<el-button @click="init" type="warning">初始化设备</el-button> <el-button @click="breakdom" type="warning">销毁设备</el-button>
<el-button @click="init" type="warning">初始化设备</el-button>
<el-select v-model="video_value" placeholder="请选择" @change="changeWndNum()">
<el-option v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
</div> </div>
</el-main> </el-main>
</el-container> </el-container>
</template> </template>
<script> <script>
import { ThinRenderTargetTexture } from "babylonjs";
export default { export default {
data() { data() {
@ -23,8 +34,26 @@ export default {
szIp: "192.168.1.65", szIp: "192.168.1.65",
ipPort: "80", ipPort: "80",
username: "admin", username: "admin",
password: "9093QQww", password: "zc2024!!!",
iPrototocol: 1, //http:1:http2:https iPrototocol: 1, //http:1:http2:https
video_value:1,
options: [{
value: 1,
label: '1x1'
},
{
value: 2,
label: '2x2'
},
{
value: 3,
label: '3x3'
},
{
value: 4,
label: '4x4'
}
]
}; };
}, },
mounted() { mounted() {
@ -32,34 +61,29 @@ export default {
that.init(); that.init();
}, },
methods: { methods: {
//
init() { init() {
// alert('init') // alert('init')
WebVideoCtrl.I_InsertOBJECTPlugin("divPlugin"); WebVideoCtrl.I_InsertOBJECTPlugin("divPlugin");
WebVideoCtrl.I_InitPlugin("divPlugin", 500, 500, { WebVideoCtrl.I_InitPlugin("divPlugin", 600, 600, {
iWndowType: 2, //N*N iWndowType: 2, //N*N
bWndFull: true, // bWndFull: true, //
cbInitPluginCompleted: function () { cbInitPluginCompleted: function () {
WebVideoCtrl.I_InsertOBJECTPlugin("divPlugin").then(
() => { WebVideoCtrl.I_InsertOBJECTPlugin("divPlugin").then(() => {
WebVideoCtrl.I_CheckPluginVersion().then( //
(bFlog) => { WebVideoCtrl.I_CheckPluginVersion().then((bFlag) => {
if (bFlog) { if (bFlag) {
alert( alert("检测到新的插件版本双击开发包目录里的HCWebSDKPlugin.exe升级");
"插件版本有更新,请双击开发包里的HCWebSDKPlugin.exe升级" }
); });
} }, () => {
} alert("插件初始化失败请确认是否已安装插件如果未安装请双击开发包目录里的HCWebSDKPlugin.exe安装");
); });
},
() => {
alert(
"插件初始化失败,请确认是否安装插件,如果未安装,请请双击开发包里的HCWebSDKPlugin.exe安装"
);
}
);
}, },
}); });
}, },
//
Login() { Login() {
WebVideoCtrl.I_Login( WebVideoCtrl.I_Login(
this.szIp, this.szIp,
@ -86,35 +110,77 @@ export default {
console.log("预览成功"); console.log("预览成功");
}, },
}); });
}, },
// //
stopShow() { stopShow() {
WebVideoCtrl.I_Stop({ var oWndInfo = WebVideoCtrl.I_GetWindowStatus(),
iWndIndex: 1, //tingzhichuangkou szInfo = "";
success: () => { if (oWndInfo != null) {
console.log("停止预览成功"); WebVideoCtrl.I_Stop({
}, success: function () {
}); console.log("停止预览成功!")
},
error: function (oError) {
console.log("停止预览失败!")
}
});
}
}, },
// //
stopShowAll() { stopShowAll() {
WebVideoCtrl.I_StopAllPlay(); //WebVideoCtrl.I_StopAllPlay();
}, },
// //
logOut() { logOut() {
WebVideoCtrl.I_Logout(this.szIp + "_" + this.ipPort, {}); //WebVideoCtrl.I_Logout(this.szIp + "_" + this.ipPort, {});
var szDeviceIdentify =this.szIp;
if (null == szDeviceIdentify) {
return;
}
WebVideoCtrl.I_Logout(szDeviceIdentify).then(() => {
console.log(szDeviceIdentify + " " + "退出成功!");
}, () => {
console.log(szDeviceIdentify + " " + "退出失败!");
});
}, },
// //
breakdom() { breakdom() {
WebVideoCtrl.I_DestroyPlugin(); WebVideoCtrl.I_DestroyPlugin();
}, },
//
changeWndNum() {
var iType = this.video_value;
if ("1*2" === iType || "2*1" === iType) {
WebVideoCtrl.I_ArrangeWindow(iType).then(() => {
console.log("窗口分割成功!");
}, (oError) => {
var szInfo = "窗口分割失败!";
console.log(szInfo, oError.errorCode, oError.errorMsg);
});
} else {
iType = parseInt(iType, 10);
WebVideoCtrl.I_ChangeWndNum(iType).then(() => {
console.log("窗口分割成功!");
}, (oError) => {
var szInfo = "窗口分割失败!";
console.log(szInfo, oError.errorCode, oError.errorMsg);
});
}
}
}, },
}; };
</script> </script>
<style scoped> <style scoped>
.plugin { .plugin {
width: 500px; width: 600px;
height: 500px; height: 600px;
/* background: #ffffff; */ /* background: #ffffff; */
} }
</style> </style>

View File

@ -159,7 +159,7 @@
</span> </span>
</el-form-item> </el-form-item>
<!-- <el-form-item label="巡检人" prop="inspect_user"> <!-- <el-form-item label="巡检人" prop="inspect_user">
<el-select <el-select
v-model="form.inspect_user" v-model="form.inspect_user"
placeholder="巡检人" placeholder="巡检人"
clearable clearable
@ -384,4 +384,4 @@ export default {
}, },
}, },
}; };
</script> </script>

View File

@ -3,21 +3,15 @@
<el-container v-loading="loading"> <el-container v-loading="loading">
<el-main style="padding: 0 20px 20px 20px"> <el-main style="padding: 0 20px 20px 20px">
<el-form ref="dialogForm" :model="form" :rules="rules" :disabled="mode == 'show'" label-width="100px"> <el-form ref="dialogForm" :model="form" :rules="rules" :disabled="mode == 'show'" label-width="100px">
<el-row> <el-row>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="所属部门"> <el-form-item label="责任部门">
<el-cascader v-model="form.belong_dept" :options="group" :props="groupsProps" clearable <el-cascader v-model="form.belong_dept" :options="group" :props="groupsProps" clearable
:show-all-levels="false" style="width: 100%" @change="deptChange"> :show-all-levels="false" style="width: 100%" @change="deptChange">
</el-cascader> </el-cascader>
</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.mgroup" placeholder="所属工段" clearable style="width: 100%">
<el-option v-for="item in mgroups" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="设备名称" prop="name"> <el-form-item label="设备名称" prop="name">
<el-input v-model="form.name" placeholder="设备名称" /> <el-input v-model="form.name" placeholder="设备名称" />
@ -28,47 +22,53 @@
<el-input v-model="form.number" placeholder="设备编号" /> <el-input v-model="form.number" placeholder="设备编号" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24" v-if="form.type == 10"> <el-col :md="12" :sm="24">
<el-form-item <el-form-item label="规格型号" prop="model">
label="表明工段运行的方式" <el-input v-model="form.model" placeholder="规格型号" />
label-width="160" </el-form-item>
>
<el-select
v-model="form.indicate_mgroup_running"
style="width: 100%"
clearable
@clear="() => { form.indicate_mgroup_running=null } "
>
<el-option
v-for="e in iMEnum.values"
:key="e.key"
:value="e.key"
:label="e.text"
></el-option>
</el-select>
</el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :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">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-divider/> <el-col :md="12" :sm="24">
<el-col :md="12" :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-divider/>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="型号规格"> <el-form-item label="IP地址" prop="ip">
<el-input v-model="form.model" placeholder="规格型号规格" /> <el-input v-model="form.ip" placeholder="设备IP地址" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24">
<el-form-item label="端口号" prop="port">
<el-input v-model="form.port" placeholder="设备端口号" />
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="登录账号" prop="login_name">
<el-input v-model="form.login_name" placeholder="设备登录名" />
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="登录密码" prop="login_pwd">
<el-input v-model="form.login_pwd" placeholder="设备登录密码" />
</el-form-item>
</el-col>
<el-divider/>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="生产厂"> <el-form-item label="生产厂">
<el-input v-model="form.factory" placeholder="生产厂" /> <el-input v-model="form.factory" placeholder="生产厂" />
@ -110,7 +110,7 @@
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="责任人" prop="leader_name"> <el-form-item label="责任人" prop="leader_name">
<span style="display:flex"> <span style="display:flex">
<el-input readonly v-model="form.keeper_name"></el-input> <el-input readonly v-model="form.keeper"></el-input>
<ehsUserSelect :multiple="false" @submit="getReceptionist" /> <ehsUserSelect :multiple="false" @submit="getReceptionist" />
</span> </span>
</el-form-item> </el-form-item>
@ -121,70 +121,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :md="12" :sm="24">
<el-form-item label="简要技术参数">
<el-input type="textarea" :rows="3" v-model="form.parameter" placeholder="技术参数" />
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="备注">
<el-input type="textarea" :rows="3" v-model="form.description" placeholder="备注" />
</el-form-item>
</el-col>
</el-row>
<el-divider/>
<el-row v-if="form.type==20">
<el-col :md="12" :sm="24">
<el-form-item label="仪表类型">
<el-input v-model="form.meter_type" placeholder="仪表类型" />
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="量程范围">
<el-input v-model="form.measurement_range" placeholder="量范" />
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="管理等级">
<el-input v-model="form.management_level" placeholder="管理等级" />
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="精度等级">
<el-input v-model="form.accuracy_level" placeholder="精度等级" />
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="检定周期(月)">
<el-input-number v-model="form.cycle" :precision="1" :min="0" controls-position="right"
style="width: 100%;" placeholder="检定周期(月)" />
</el-form-item>
</el-col>
</el-row>
<el-divider v-if="form.type==20"/>
<el-row>
<el-col>
<el-form-item label="技术参数">
<el-button @click="addJsonItem" type="primary" size="small">添加</el-button>
</el-form-item>
</el-col>
</el-row>
<el-row v-for="(item, $index) in parameter_json" :key="item" :gutter="4">
<el-col :span="11">
<el-form-item label="参数名">
<el-input v-model="item.key" placeholder="参数名" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="参数值">
<el-input v-model="item.value" placeholder="参数值" />
</el-form-item>
</el-col>
<el-col :span="2">
<el-button @click="delJsonItem($index)" type="danger" size="small">删除</el-button>
</el-col>
</el-row>
</el-form> </el-form>
</el-main> </el-main>
<el-footer> <el-footer>
@ -222,8 +160,7 @@ export default {
rules: { rules: {
name: [{ required: true, message: "请输入", trigger: "blur" }], name: [{ required: true, message: "请输入", trigger: "blur" }],
number: [{ required: true, message: "请输入", trigger: "blur" }], number: [{ required: true, message: "请输入", trigger: "blur" }],
keeper_name: [{ required: true, message: "请输入", trigger: "blur" }], belong_dept: [{ required: true, message: "请选择责任部门", trigger: "blur" }]
belong_dept: [{ required: true, message: "请选择所属部门", trigger: "blur" }]
}, },
options: [{ options: [{
value: 10, value: 10,

View File

@ -24,17 +24,19 @@
<el-main class="nopadding"> <el-main class="nopadding">
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="query" @selection-change="selectionChange"> <scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="query" @selection-change="selectionChange">
<el-table-column type="selection" width="50" /> <el-table-column type="selection" width="50" />
<el-table-column label="设备名称" prop="name" width="200" show-overflow-tooltip> <el-table-column label="设备名称" prop="name" width="200" show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column label="设备编号" prop="number"> <el-table-column label="设备编号" prop="number">
</el-table-column> </el-table-column>
<el-table-column label="型号规格" prop="model"> <el-table-column label="型号规格" prop="model">
</el-table-column> </el-table-column>
<el-table-column label="生产厂" prop="factory" show-overflow-tooltip> <el-table-column label="设备IP" prop="ip" width="200" show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column label="生产日期" prop="production_date"> <el-table-column label="端口号" prop="port">
</el-table-column> </el-table-column>
<el-table-column label="购置日期" prop="buy_date"> <el-table-column label="登录账号" prop="login_name">
</el-table-column>
<el-table-column label="登录密码" prop="login_pwd">
</el-table-column> </el-table-column>
<el-table-column label="状态"> <el-table-column label="状态">
<template #default="scope"> <template #default="scope">
@ -52,27 +54,6 @@
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="运行状态">
<template #default="scope">
<el-tag :type="runningStateEnum[scope.row.running_state]?.type">{{
runningStateEnum[scope.row.running_state]?.text }}</el-tag>
</template>
</el-table-column>
<el-table-column label="所在车间" show-overflow-tooltip>
<template #default="scope">{{ scope.row.belong_dept_name }}</template>
</el-table-column>
<el-table-column label="所在工段" show-overflow-tooltip>
<template #default="scope">{{ scope.row.mgroup_name }}</template>
</el-table-column>
<el-table-column label="保管人">
<template #default="scope">{{ scope.row.keeper_name }}</template>
</el-table-column>
<el-table-column label="存放位置" show-overflow-tooltip>
<template #default="scope">{{ scope.row.place }}</template>
</el-table-column>
<el-table-column label="备注" show-overflow-tooltip>
<template #default="scope">{{ scope.row.description }}</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="left" width="180"> <el-table-column label="操作" fixed="right" align="left" width="180">
<template #default="scope"> <template #default="scope">
<el-button link type="primary" @click="table_record(scope.row)" v-auth="'echeckrecord.create'"> <el-button link type="primary" @click="table_record(scope.row)" v-auth="'echeckrecord.create'">
@ -159,7 +140,7 @@
</span> </span>
</el-form-item> </el-form-item>
<!-- <el-form-item label="巡检人" prop="inspect_user"> <!-- <el-form-item label="巡检人" prop="inspect_user">
<el-select <el-select
v-model="form.inspect_user" v-model="form.inspect_user"
placeholder="巡检人" placeholder="巡检人"
clearable clearable
@ -374,4 +355,4 @@ export default {
}, },
}, },
}; };
</script> </script>

View File

@ -66,8 +66,15 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="计量单位">
<el-input
v-model="form.unit"
placeholder="计量单位"
/>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24" v-if="form.type==10||form.type==20">
<el-form-item label="已到工序" prop="process"> <el-form-item label="已到工序" prop="process">
<el-select <el-select
v-model="form.process" v-model="form.process"

View File

@ -225,6 +225,7 @@ export default {
console.log("materialType", this.materialType); console.log("materialType", this.materialType);
this.apiObj = this.$API.mtm.material.list; this.apiObj = this.$API.mtm.material.list;
this.$refs.table.queryData(this.query); this.$refs.table.queryData(this.query);
this.materialTemplate = this.materialTemplate+"?t=" + new Date().getTime();
}, },
methods: { methods: {
rowClick(row) { rowClick(row) {

View File

@ -66,10 +66,10 @@
</el-form-item> </el-form-item>
</el-col> --> </el-col> -->
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="主要输入" prop="material_in"> <el-form-item label="输入物料" prop="material_in">
<el-select <el-select
v-model="form.material_in" v-model="form.material_in"
placeholder="物料" placeholder="输入物料"
clearable clearable
filterable filterable
:value-on-clear="null" :value-on-clear="null"
@ -99,10 +99,10 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="主要输出" prop="material_out"> <el-form-item label="输出物料" prop="material_out">
<el-select <el-select
v-model="form.material_out" v-model="form.material_out"
placeholder="物料" placeholder="输出物料"
clearable clearable
filterable filterable
:value-on-clear="null" :value-on-clear="null"
@ -131,10 +131,10 @@
</el-col> --> </el-col> -->
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="工时" prop="hour_work"> <el-form-item label="计划时长" prop="hour_work">
<el-input-number <el-input-number
v-model="form.hour_work" v-model="form.hour_work"
:min="1" :min="0"
style="width: 100%" style="width: 100%"
/> />
</el-form-item> </el-form-item>
@ -171,9 +171,12 @@ const defaultForm = {
process: null, process: null,
sort: 1, sort: 1,
out_rate: 100, out_rate: 100,
material_in:'',
material_out:'',
hour_work:0,
batch_bind: true, batch_bind: true,
is_autotask: true, // is_autotask: true,
is_count_utask: false, // is_count_utask: false,
}; };
export default { export default {
props: { props: {
@ -185,7 +188,7 @@ export default {
loading: false, loading: false,
mode: "add", mode: "add",
// //
form: defaultForm, form: Object.assign({}, defaultForm),
// //
rules: { rules: {
process: [ process: [

View File

@ -31,7 +31,7 @@
<el-descriptions-item label="抽检数">{{ <el-descriptions-item label="抽检数">{{
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>

View File

@ -291,6 +291,18 @@
></el-input-number> ></el-input-number>
</el-form-item> </el-form-item>
</el-col> </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"
:disabled="mode=='sizeShow'||mode=='facadeShow'"
@change="handleCountChange"
></el-input-number>
</el-form-item>
</el-col>
<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
@ -352,7 +364,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<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
controls-position="right" controls-position="right"
v-model="count_notok_json.count_n_lq" v-model="count_notok_json.count_n_lq"
@ -417,6 +429,7 @@ export default {
count_n_swen: 0, count_n_swen: 0,
count_n_bb: 0, count_n_bb: 0,
count_n_zb: 0, count_n_zb: 0,
count_n_zq: 0,
count_n_hs: 0, count_n_hs: 0,
count_n_md: 0, count_n_md: 0,
count_n_hqbx: 0, count_n_hqbx: 0,
@ -485,6 +498,7 @@ export default {
this.count_notok_json.count_n_qp= this.count_notok_json.count_n_qp=
this.count_notok_json.count_n_swen= this.count_notok_json.count_n_swen=
this.count_notok_json.count_n_zb= this.count_notok_json.count_n_zb=
this.count_notok_json.count_n_zq=
this.count_notok_json.count_n_hs= this.count_notok_json.count_n_hs=
this.count_notok_json.count_n_md= this.count_notok_json.count_n_md=
this.count_notok_json.count_n_hqbx= this.count_notok_json.count_n_hqbx=
@ -507,6 +521,7 @@ export default {
this.count_notok_json.count_n_z+ this.count_notok_json.count_n_z+
this.count_notok_json.count_n_swen+ this.count_notok_json.count_n_swen+
this.count_notok_json.count_n_zb+ this.count_notok_json.count_n_zb+
this.count_notok_json.count_n_zq+
this.count_notok_json.count_n_hs+ this.count_notok_json.count_n_hs+
this.count_notok_json.count_n_md+ this.count_notok_json.count_n_md+
this.count_notok_json.count_n_hqbx+ this.count_notok_json.count_n_hqbx+

View File

@ -32,7 +32,31 @@
</el-table-column> </el-table-column>
<el-table-column label="检验数" prop="检验数"></el-table-column> <el-table-column label="检验数" prop="检验数"></el-table-column>
<el-table-column label="合格数" prop="合格数量"></el-table-column> <el-table-column label="合格数" prop="合格数量"></el-table-column>
<el-table-column label="不合格数" prop="不合格数"></el-table-column> <el-table-column label="不合格数" align="center">
<el-table-column label="黑圈内径" prop="黑圈内径"></el-table-column>
<el-table-column label="黑圈内径圆度" prop="黑圈内径圆度"></el-table-column>
<el-table-column label="黑圈外径" prop="黑圈外径"></el-table-column>
<el-table-column label="黑圈外径圆度" prop="黑圈外径圆度"></el-table-column>
<el-table-column label="产品外径" prop="产品外径"></el-table-column>
<el-table-column label="产品圆度" prop="产品圆度"></el-table-column>
<el-table-column label="产品同心度" prop="产品同心度"></el-table-column>
<el-table-column label="厚度" prop="厚度"></el-table-column>
<el-table-column label="准合格" prop="准合格"></el-table-column>
<el-table-column label="圆准" prop="圆准"></el-table-column>
<el-table-column label="脏" prop="脏"></el-table-column>
<el-table-column label="气泡" prop="气泡"></el-table-column>
<el-table-column label="水纹" prop="水纹"></el-table-column>
<el-table-column label="崩边" prop="崩边"></el-table-column>
<el-table-column label="棕边" prop="棕边"></el-table-column>
<el-table-column label="棕圈" prop="棕圈"></el-table-column>
<el-table-column label="划伤" prop="划伤"></el-table-column>
<el-table-column label="麻点" prop="麻点"></el-table-column>
<el-table-column label="黑圈变形" prop="黑圈变形"></el-table-column>
<el-table-column label="倒角" prop="倒角"></el-table-column>
<el-table-column label="破损" prop="破损"></el-table-column>
<el-table-column label="蓝圈" prop="蓝圈"></el-table-column>
<el-table-column label="合计" prop="不合格数"></el-table-column>
</el-table-column>
</scTable> </scTable>
</el-main> </el-main>
</el-container> </el-container>

View File

@ -13,7 +13,7 @@
</el-option> </el-option>
</el-select> </el-select>
<el-date-picker <el-date-picker
v-model="query.start_date" v-model="queryDate"
type="date" type="date"
placeholder="查询日期" placeholder="查询日期"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
@ -97,6 +97,7 @@ import scEcharts from "@/components/scEcharts";
function deepCopy(obj) { function deepCopy(obj) {
return JSON.parse(JSON.stringify(obj)); return JSON.parse(JSON.stringify(obj));
} }
const ondDayTime = 86400000;
export default { export default {
name: "chart", name: "chart",
components: { components: {
@ -112,6 +113,7 @@ export default {
order_bys_material: "", order_bys_material: "",
select_cols_material: "" select_cols_material: ""
}, },
queryDate:'',
currentYear: "", currentYear: "",
currentMonth: "", currentMonth: "",
xAxisData: [], xAxisData: [],
@ -128,7 +130,7 @@ export default {
}, },
xAxis: { xAxis: {
type: "category", type: "category",
data: [], data: ["周一","周二","周三","周四","周五","周六","周日"],
}, },
yAxis: { yAxis: {
type: "value", type: "value",
@ -149,25 +151,37 @@ export default {
}, },
mounted() { mounted() {
let that = this; let that = this;
let date = new Date(); let nowDate = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
that.currentYear = year;
that.currentMonth = month;
month = month < 10 ? "0" + month : month;
day = day < 10 ? "0" + day : day;
that.query.start_date = that.query.end_date = year + "-" + month + "-" + day;
let days = new Date(year, month, 0).getDate();
for (let i = 0; i < that.days; i++) {
let day = i + 1;
let text = day + "日";
}
that.getMgroup(); that.getMgroup();
// that.getData(); that.getWeekDate(nowDate);
}, },
methods: { methods: {
getWeekDate(dates){
let that = this;
dates = new Date(dates);
let week =dates.getDay(); //week
let weekFirst = 0, weekLast = 0;
if (week == 0) {
weekFirst = 6;
weekLast = 0; //
} else {
weekFirst = week - 1;
weekLast = 7 - week;
}
let first = new Date(dates.getTime() - weekFirst * ondDayTime); //
let last = new Date(new Date(dates.getTime() + weekLast * ondDayTime)); //
let dateArr = [];
for (let i = 0; i < 7; i++) {
let itemDate = new Date(first.getTime() + i * ondDayTime);
let item = itemDate.getDate();
dateArr.push(item);
}
that.weekDateList = dateArr;
console.log('dateArr',dateArr);
that.query.start_date =first.getFullYear() +"-" +(first.getMonth() + 1) +"-" +first.getDate();
that.query.end_date =last.getFullYear() +"-" +(last.getMonth() + 1) +"-" +last.getDate();
that.getData();
},
setChart(name, option = null) { setChart(name, option = null) {
// name , optionoption // name , optionoption
var myChart = echarts.getInstanceByDom( var myChart = echarts.getInstanceByDom(
@ -205,21 +219,36 @@ export default {
let tableData = res.data2.ds0 ? res.data2.ds0 : []; let tableData = res.data2.ds0 ? res.data2.ds0 : [];
that.tableData = tableData; that.tableData = tableData;
if (tableData.length > 0) { if (tableData.length > 0) {
let seriesData = [], let dataList = [],
nameList = []; nameList = [],
datas = [];
tableData.forEach((ite) => { tableData.forEach((ite) => {
if (nameList.indexOf(ite.物料名) > -1) { if (nameList.indexOf(ite.物料名) > -1) {} else {
} else {
nameList.push(ite.物料名); nameList.push(ite.物料名);
seriesData.push(0); datas.push([0,0,0,0,0,0,0]);
} }
}); });
that.xAxisData = nameList;
tableData.forEach((item) => { tableData.forEach((item) => {
let indexX = nameList.indexOf(item.物料名); let indexX = nameList.indexOf(item.物料名);
seriesData[indexX] += item.合格数; dataList[indexX].push(item);
}); });
for(let i = 0;i<dataList.length;i++){
for(let j = 0;j<dataList[i].length;j++){
let index = that.weekDateList.indexOf(dataList[i][j].);
datas[i][index].push(dataList[i][j].合格数); //datas
}
}
ption.xAxis.data = nameList; ption.xAxis.data = nameList;
ption.series[0].data = serisData; nameList.forEach((index,item) => {
let obj = {
data: datas[index],
stack: "Ad",
type: "bar",
barWidth: "15px",
};
ption.series[index].data = serisData;
});
that.setChart("bachart1", option); that.setChart("bachart1", option);
} else { } else {
that.setChart("bachart1", option); that.setChart("bachart1", option);
@ -227,9 +256,7 @@ export default {
}); });
}, },
handleQuery() { handleQuery() {
let that = this; this.getWeekDate(this.queryDate);
that.query.end_date = that.query.start_date ;
that.getData();
}, },
handleExport(val) { handleExport(val) {
this.exportLoading = true; this.exportLoading = true;
@ -244,10 +271,7 @@ export default {
</script> </script>
<style scoped> <style scoped>
#bachart1, #bachart1{
#bachart2,
#bachart3,
#bachart4 {
width: 100%; width: 100%;
height: 300px; height: 300px;
} }

View File

@ -31,8 +31,32 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="检验数" prop="检验数"></el-table-column> <el-table-column label="检验数" prop="检验数"></el-table-column>
<el-table-column label="合格数" prop="合格数量"></el-table-column> <el-table-column label="合格数" prop="合格数"></el-table-column>
<el-table-column label="不合格数" prop="不合格数"></el-table-column> <el-table-column label="不合格数" align="center">
<el-table-column label="黑圈内径" prop="黑圈内径"></el-table-column>
<el-table-column label="黑圈内径圆度" prop="黑圈内径圆度"></el-table-column>
<el-table-column label="黑圈外径" prop="黑圈外径"></el-table-column>
<el-table-column label="黑圈外径圆度" prop="黑圈外径圆度"></el-table-column>
<el-table-column label="产品外径" prop="产品外径"></el-table-column>
<el-table-column label="产品圆度" prop="产品圆度"></el-table-column>
<el-table-column label="产品同心度" prop="产品同心度"></el-table-column>
<el-table-column label="厚度" prop="厚度"></el-table-column>
<el-table-column label="准合格" prop="准合格"></el-table-column>
<el-table-column label="圆准" prop="圆准"></el-table-column>
<el-table-column label="脏" prop="脏"></el-table-column>
<el-table-column label="气泡" prop="气泡"></el-table-column>
<el-table-column label="水纹" prop="水纹"></el-table-column>
<el-table-column label="崩边" prop="崩边"></el-table-column>
<el-table-column label="棕边" prop="棕边"></el-table-column>
<el-table-column label="棕圈" prop="棕圈"></el-table-column>
<el-table-column label="划伤" prop="划伤"></el-table-column>
<el-table-column label="麻点" prop="麻点"></el-table-column>
<el-table-column label="黑圈变形" prop="黑圈变形"></el-table-column>
<el-table-column label="倒角" prop="倒角"></el-table-column>
<el-table-column label="破损" prop="破损"></el-table-column>
<el-table-column label="蓝圈" prop="蓝圈"></el-table-column>
<el-table-column label="合计" prop="不合格数"></el-table-column>
</el-table-column>
</scTable> </scTable>
</el-main> </el-main>
</el-container> </el-container>

View File

@ -0,0 +1,252 @@
<template>
<el-container>
<el-header>
<div class="right-panel">
<el-select v-model="material__name">
<el-option
v-for="item in options"
:key="item"
:label="item"
:value="item"
>
</el-option>
</el-select>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
</div>
</el-header>
<el-main id="elMain">
<el-row :gutter="10" id="elCol">
<el-col :lg="12">
<el-card shadow="never">
<div id="bachart1"></div>
<!-- <scEcharts height="500px" :option="option"></scEcharts> -->
</el-card>
</el-col>
<el-col :lg="12">
<el-card shadow="never" style="position: relative">
<el-button
@click="handleExport"
class="tables"
type="primary"
>导出</el-button
>
<el-table
:data="tableData1"
id="exportDiv7"
:height="tableHeight"
>
<el-table-column type="index" width="50" />
<el-table-column
label="任务编号"
prop="number"
min-width="100px"
>
</el-table-column>
<el-table-column label="计划数" prop="count">
</el-table-column>
<el-table-column label="完成数" prop="count_ok">
</el-table-column>
<el-table-column label="完成率" prop="rate">
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
</el-main>
</el-container>
</template>
<script>
import * as echarts from "echarts";
import T from "@/components/scEcharts/echarts-theme-T.js";
echarts.registerTheme("T", T);
import scEcharts from "@/components/scEcharts";
function deepCopy(obj) {
return JSON.parse(JSON.stringify(obj));
}
export default {
name: "chart",
components: {
scEcharts,
},
data() {
return {
currentYear:'',
currentMonth:'',
start_date:'',
end_date:'',
queryDate:'',
option:{},
seriesData1:[],
seriesData2:[],
seriesData3:[],
material__name:'',
options:['白片','DDG片','一次抛','外协海富'],
basicOption: {
backgroundColor: "transparent",
title: {
text: "库存统计",
},
grid: {
top: "80px",
},
tooltip: {
trigger: "axis",
},
xAxis: {
type: "category",
data: ['库房','扫边车间','黑化车间','减薄车间','精雕车间','倒角车间','磨抛车间'],
},
yAxis: {
type: "value",
},
legend: {
top: "3",
right: "3%",
},
series: [
{
data: [0,0,0,0,0,0,0],
type: "bar",
name:'未处理',
barWidth: "15px",
},
{
data: [0,0,0,0,0,0,0],
type: "bar",
name:'处理中',
barWidth: "15px",
},
{
data: [0,0,0,0,0,0,0],
type: "bar",
name:'已处理',
barWidth: "15px",
},
],
},
};
},
mounted() {
let that = this;
that.getInmMaterial();
},
methods: {
getInmMaterial(){
let that = this;
let obj = {
name__contains:that.material__name,
page:0
};
this.$API.mtm.material.list.req(obj).then(res=>{
console.log('InmMaterial',res);
that.getWmaterial();
if(res.length>0){
res.forEach(item => {
that.seriesData3[0]+=item.count;
});
}
})
},
getWmaterial(){
let that = this;
let obj = {
material__name__contains:that.material__name,
page:0
};
this.$API.wpm.wmaterial.list.req(obj).then(res=>{
console.log('Wmaterial',res);
if(res.length>0){
res.forEach(item => {
if(item.belong_dept_name=="扫边车间"){
if(item.count_xtest==null){
seriesData3[1]+=item.count;
}else{
seriesData1[1]+=item.count;
}
}else if(item.belong_dept_name=="黑化车间"){
if(item.count_xtest==null){
seriesData3[2]+=item.count;
}else{
seriesData1[2]+=item.count;
}
}else if(item.belong_dept_name=="减薄车间"){
if(item.count_xtest==null){
seriesData3[3]+=item.count;
}else{
seriesData1[3]+=item.count;
}
}else if(item.belong_dept_name=="精雕车间"){
if(item.count_xtest==null){
seriesData3[4]+=item.count;
}else{
seriesData1[4]+=item.count;
}
}else if(item.belong_dept_name=="倒角车间"){
if(item.count_xtest==null){
seriesData3[5]+=item.count;
}else{
seriesData1[5]+=item.count;
}
}else if(item.belong_dept_name=="磨抛车间"){
if(item.count_xtest==null){
seriesData3[6]+=item.count;
}else{
seriesData1[6]+=item.count;
}
}
});
}
let option = deepCopy(that.basicOption);
that.setChart("bachart1", option);
})
},
handleQuery(){
this.getInmMaterial();
},
setChart(name, option = null) {
// name , optionoption
var myChart = echarts.getInstanceByDom(
document.getElementById(name)
);
if (myChart == undefined) {
myChart = echarts.init(document.getElementById(name), "T");
}
if (option == null) {
option = Object.assign({}, this.basicOption);
}
setTimeout(() => {
try {
myChart.setOption(option);
} catch (error) {}
}, 500);
},
},
};
</script>
<style scoped>
#bachart1{
width: 100%;
height: 500px;
}
.tables{
width:
}
.tableHead {
background:rgb(0,176,240);
height:40px;
}
.tableTh{
width:120px;
height:36px;
}
.tableTd{
width:120px;
height:36px;
}
</style>

View File

@ -0,0 +1,421 @@
<template>
<el-container>
<el-header>
<div class="right-panel">
<el-select v-model="queryType" @change="queryTypeChange">
<el-option
v-for="item in typeOptions"
:key="item"
:label="item"
:value="item"
>
</el-option>
</el-select>
<el-date-picker
v-if="queryType == '月'"
v-model="queryDate"
type="month"
placeholder="查询月期"
value-format="YYYY-MM"
>
</el-date-picker>
<el-date-picker
v-if="queryType == '年'"
v-model="queryDate"
type="year"
placeholder="查询年份"
value-format="YYYY"
>
</el-date-picker>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
</div>
</el-header>
<el-main id="elMain">
<el-row :gutter="15">
<table class="tables" border="1" cellspacing="0">
<tr>
<th class="tableTh tableHead" colspan="15">库存统计</th>
</tr>
<tr>
<th class="tableTh">生产</th>
<th class="tableTh" colspan="2">库房</th>
<th class="tableTh" colspan="2">道边车间</th>
<th class="tableTh" colspan="2">黑化车间</th>
<th class="tableTh" colspan="2">减薄车间</th>
<th class="tableTh" colspan="2">精雕车间</th>
<th class="tableTh" colspan="2">倒角车间</th>
<th class="tableTh" colspan="2">磨抛车间</th>
</tr>
<tr >
<td class="tableTd">原料片库存</td>
<td class="tableTd">大白片</td>
<td class="tableTd"></td>
<td class="tableTd">未处理大白片</td>
<td class="tableTd">3</td>
<td class="tableTd">2.5D白片待进炉</td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
</tr>
<tr >
<td class="tableTd">原料片库存</td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd">2.5D炉内黑化数</td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
</tr>
<tr >
<td class="tableTd">原料片库存</td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd">已处理白片</td>
<td class="tableTd"></td>
<td class="tableTd">2.5D炉内退火+待投</td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
</tr>
<tr >
<td class="tableTd" rowspan="2">DDG片</td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd">水纹片待进炉</td>
<td class="tableTd"></td>
<td class="tableTd">已加工</td>
<td class="tableTd"></td>
<td class="tableTd">已加工</td>
<td class="tableTd"></td>
<td class="tableTd">已加工</td>
<td class="tableTd"></td>
<td class="tableTd">精雕片已抛光</td>
<td class="tableTd"></td>
</tr>
<tr >
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd">未加工</td>
<td class="tableTd"></td>
<td class="tableTd">未加工</td>
<td class="tableTd"></td>
<td class="tableTd">未加工</td>
<td class="tableTd"></td>
<td class="tableTd">精雕片未抛光</td>
<td class="tableTd"></td>
</tr>
<tr >
<td class="tableTd" rowspan="2">外协百盛一次抛黑料</td>
<td class="tableTd">外协抛光</td>
<td class="tableTd">0</td>
<td class="tableTd">外协待扫边</td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd">外协已抛光</td>
<td class="tableTd"></td>
</tr>
<tr >
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd">外协已扫边</td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd">外协未抛光</td>
<td class="tableTd"></td>
</tr>
<tr >
<td class="tableTd" rowspan="2">外协海富</td>
<td class="tableTd">外协扫边</td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd">外扫已抛光</td>
<td class="tableTd"></td>
</tr>
<tr >
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd">外扫未抛光</td>
<td class="tableTd"></td>
</tr>
</table>
</el-row>
<el-row :gutter="15">
<table class="tables" border="1" cellspacing="0">
<tr>
<th class="tableTh tableHead" colspan="15">扫边车间数据汇总</th>
</tr>
<tr>
<th class="tableTh">扫边车间</th>
<th class="tableTh"></th>
<th class="tableTh"></th>
<th class="tableTh" colspan="4">8.20白班</th>
<th class="tableTh"></th>
<th class="tableTh" colspan="4">8.20夜班</th>
<th class="tableTh"></th>
<th class="tableTh"></th>
<th class="tableTh"></th>
</tr>
<tr >
<td class="tableTd">预处理片扫边A的产品</td>
<td class="tableTd">机器号</td>
<td class="tableTd">内置数</td>
<td class="tableTd">加工数</td>
<td class="tableTd">合格数</td>
<td class="tableTd">破损数</td>
<td class="tableTd">破损比</td>
<td class="tableTd">操作人</td>
<td class="tableTd">加工数</td>
<td class="tableTd">合格数</td>
<td class="tableTd">破损数</td>
<td class="tableTd">破损比</td>
<td class="tableTd">操作人</td>
<td class="tableTd">3</td>
<td class="tableTd">3</td>
</tr>
<tr >
<td class="tableTd">原料片库存</td>
<td class="tableTd">2</td>
<td class="tableTd">3</td>
<td class="tableTd">3</td>
<td class="tableTd">3</td>
<td class="tableTd">3</td>
<td class="tableTd">3</td>
<td class="tableTd">3</td>
<td class="tableTd">3</td>
<td class="tableTd">3</td>
<td class="tableTd">3</td>
<td class="tableTd">3</td>
<td class="tableTd">3</td>
<td class="tableTd">3</td>
<td class="tableTd">3</td>
</tr>
<tr >
<td class="tableTd" rowspan="2">DDG片</td>
<td class="tableTd">已加工</td>
<td class="tableTd">3</td>
<td class="tableTd">已加工</td>
<td class="tableTd">3</td>
<td class="tableTd">已加工</td>
<td class="tableTd">3</td>
<td class="tableTd">已加工</td>
<td class="tableTd">3</td>
<td class="tableTd">已加工</td>
<td class="tableTd">3</td>
<td class="tableTd">已加工</td>
<td class="tableTd">3</td>
<td class="tableTd">已加工</td>
<td class="tableTd">3</td>
</tr>
<tr >
<td class="tableTd">未加工</td>
<td class="tableTd">3</td>
<td class="tableTd">未加工</td>
<td class="tableTd">3</td>
<td class="tableTd">未加工</td>
<td class="tableTd">3</td>
<td class="tableTd">未加工</td>
<td class="tableTd">3</td>
<td class="tableTd">未加工</td>
<td class="tableTd">3</td>
<td class="tableTd">未加工</td>
<td class="tableTd">3</td>
<td class="tableTd">未加工</td>
<td class="tableTd">3</td>
</tr>
<tr >
<td class="tableTd" rowspan="2">外协百盛一次抛黑料</td>
<td class="tableTd">外协抛光</td>
<td class="tableTd">0</td>
<td class="tableTd">外协待扫边</td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd">外协已抛光</td>
<td class="tableTd"></td>
</tr>
<tr >
<td class="tableTd">外协抛光</td>
<td class="tableTd">0</td>
<td class="tableTd">外协待扫边</td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd">外协未抛光</td>
<td class="tableTd"></td>
</tr>
<tr >
<td class="tableTd" rowspan="2">外协海富</td>
<td class="tableTd">外协扫边</td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd">外扫已抛光</td>
<td class="tableTd"></td>
</tr>
<tr >
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd"></td>
<td class="tableTd">外扫未抛光</td>
<td class="tableTd"></td>
</tr>
</table>
</el-row>
</el-main>
</el-container>
</template>
<script>
function deepCopy(obj) {
return JSON.parse(JSON.stringify(obj));
}
export default {
name: "chart",
data() {
return {
currentYear:'',
currentMonth:'',
start_date:'',
end_date:'',
queryDate:'',
};
},
mounted() {
let that = this;
let date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let days = new Date(year, month, 0).getDate();
that.currentYear = year;
that.currentMonth = month;
that.start_date = year + "-" + month + "-01";
that.end_date =
year + "-" + month + "-" + new Date(year, month, 0).getDate();
let month1 = month;
if (month1 < 10) {
month1 = "0" + month1;
}
that.queryDate = year + "-" + month1;
},
methods: {
},
};
</script>
<style scoped>
.tables{
width:
}
.tableHead {
background:rgb(0,176,240);
height:40px;
}
.tableTh{
width:120px;
height:36px;
}
.tableTd{
width:120px;
height:36px;
}
</style>

View File

@ -30,12 +30,12 @@
</el-header> </el-header>
<el-main id="elMain"> <el-main id="elMain">
<el-row :gutter="10" id="elCol"> <el-row :gutter="10" id="elCol">
<el-col :lg="8"> <el-col :lg="10">
<el-card shadow="never"> <el-card shadow="never">
<scEcharts height="500px" :option="option"></scEcharts> <scEcharts height="500px" :option="option"></scEcharts>
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="16"> <el-col :lg="14">
<el-card shadow="never" style="position: relative"> <el-card shadow="never" style="position: relative">
<el-button <el-button
@click="handleExport('7')" @click="handleExport('7')"
@ -46,7 +46,7 @@
<el-table <el-table
:data="tableData1" :data="tableData1"
id="exportDiv7" id="exportDiv7"
:height="tableHeight" height="500px"
> >
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column <el-table-column
@ -145,7 +145,7 @@ export default {
that.options = res; that.options = res;
}); });
}, },
getData7() { getData() {
let that = this; let that = this;
that.tableData1 = []; that.tableData1 = [];
that.option.series.data[0].value = 0; that.option.series.data[0].value = 0;
@ -166,7 +166,6 @@ export default {
data.push(obj); data.push(obj);
}); });
that.tableData1 = data; that.tableData1 = data;
// that.option.series.data[0].value = count_ok1;
} }
that.option.series.data[0].value = count_ok1; that.option.series.data[0].value = count_ok1;
that.option.series.data[1].value = count_notok1; that.option.series.data[1].value = count_notok1;
@ -192,7 +191,7 @@ export default {
that.query.querys[0][0].value = that.start_date; that.query.querys[0][0].value = that.start_date;
that.query.querys[1][0].value = that.end_date; that.query.querys[1][0].value = that.end_date;
} }
that.getData7(); that.getData();
}, },
handleExport(val) { handleExport(val) {
this.exportLoading = true; this.exportLoading = true;

View File

@ -211,11 +211,14 @@
<script> <script>
const defaultForm = { const defaultForm = {
note: "", mtype: "",
supplier:'',
route: "", route: "",
equipment: "", equipment: "",
handle_user: null, handle_user: null,
work_start_time: "", work_start_time: "",
work_end_time:'',
note:'',
reminder_interval_list: [], reminder_interval_list: [],
}; };
@ -251,7 +254,7 @@ export default {
show: "查看日志", show: "查看日志",
}, },
// //
form: defaultForm, form: Object.assign({}, defaultForm),
// //
rules: { rules: {
supplier: [ supplier: [
@ -301,6 +304,7 @@ export default {
this.getUser(); this.getUser();
this.getSupplier(); this.getSupplier();
this.getEquipment(); this.getEquipment();
}, },
methods: { methods: {
disabledDateFn(time) { disabledDateFn(time) {

View File

@ -111,6 +111,18 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24">
<el-form-item label="小崩边">
<el-input-number
v-model="form.count_n_xbb"
:min="0"
class="width-100"
controls-position="right"
@change="countChange"
/>
</el-form-item>
</el-col>
<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
@ -144,6 +156,17 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :md="12" :sm="24">
<el-form-item label="棕圈">
<el-input-number
v-model="form.count_n_zq"
:min="0"
class="width-100"
controls-position="right"
@change="countChange"
/>
</el-form-item>
</el-col> -->
<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
@ -156,6 +179,49 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<!-- <el-row>
<el-col :span="24">
<el-form-item label="前道不良">
<el-button
type="primary"
icon="el-icon-plus"
@click="notok_add"
></el-button>
</el-form-item>
</el-col>
</el-row>
<el-row style="margin-bottom:10px" v-for="(item, $index) in notokList" :key="item">
<el-col :span="10">
<el-select v-model="item.file"
style="width:90%"
placeholder="请选择不合格项">
<el-option
v-for="notok in notokOptions"
:key="notok.value"
:label="notok.name"
:value="notok.value"
>
</el-option>
</el-select>
</el-col>
<el-col :span="12">
<el-input-number
style="width:90%"
v-model="item.value"
:min="0"
class="width-100"
controls-position="right"
@change="countChange"
/>
</el-col>
<el-col :span="2">
<el-button
type="danger"
icon="el-icon-delete"
@click="notok_del( $index)"
></el-button>
</el-col>
</el-row> -->
</el-form> </el-form>
</el-main> </el-main>
<el-footer> <el-footer>
@ -184,12 +250,27 @@ export default {
count_n_qp: 0, count_n_qp: 0,
count_n_swen: 0, count_n_swen: 0,
count_n_bb: 0, count_n_bb: 0,
count_n_xbb:0,
count_n_md: 0, count_n_md: 0,
count_n_xh: 0, count_n_xh: 0,
count_n_ps: 0, count_n_ps: 0,
count_n_qt: 0, count_n_qt: 0,
count_n_wm: 0, count_n_wm: 0,
count_n_zq:0
}, },
notokOptions:[
{name:"划伤",value:'count_n_hs'},
{name:"气泡",value:'count_n_qp'},
{name:"水纹",value:'count_n_swen'},
{name:"崩边",value:'count_n_bb'},
{name:"小崩边",value:'count_n_xbb'},
{name:"麻点",value:'count_n_md'},
{name:"划伤",value:'count_n_xh'},
{name:"破损",value:'count_n_ps'},
{name:"其他",value:'count_n_qt'},
{name:"雾面",value:'count_n_wm'},
{name:"棕圈",value:'count_n_zq'},
],
// //
rules: { rules: {
batch: [ batch: [
@ -208,6 +289,7 @@ export default {
], ],
}, },
options: [], options: [],
notokList:[],
materialOptions: [], materialOptions: [],
visible: false, visible: false,
isSaveing: false, isSaveing: false,
@ -225,15 +307,23 @@ export default {
Object.assign(this.form, data); Object.assign(this.form, data);
console.log(this.form); console.log(this.form);
}, },
notok_add(){
this.notokList.push({file:'',value:0});
},
notok_del(index){
this.notokList.splice(index, 1)
},
countChange() { countChange() {
this.form.count_notok = this.form.count_notok =
this.form.count_n_hs + this.form.count_n_hs +
this.form.count_n_qp + this.form.count_n_qp +
this.form.count_n_swen + this.form.count_n_swen +
this.form.count_n_bb + this.form.count_n_bb +
this.form.count_n_xbb +
this.form.count_n_md + this.form.count_n_md +
this.form.count_n_xh + this.form.count_n_xh +
this.form.count_n_ps + this.form.count_n_ps +
this.form.count_n_zq +
this.form.count_n_qt + this.form.count_n_qt +
this.form.count_n_wm; this.form.count_n_wm;
this.form.count_ok = this.form.count_real - this.form.count_notok; this.form.count_ok = this.form.count_real - this.form.count_notok;
@ -250,9 +340,11 @@ export default {
this.form.count_n_qp + this.form.count_n_qp +
this.form.count_n_swen + this.form.count_n_swen +
this.form.count_n_bb + this.form.count_n_bb +
this.form.count_n_xbb +
this.form.count_n_md + this.form.count_n_md +
this.form.count_n_xh + this.form.count_n_xh +
this.form.count_n_ps + this.form.count_n_ps +
this.form.count_n_zq +
this.form.count_n_qt + this.form.count_n_qt +
this.form.count_n_wm; this.form.count_n_wm;
let sum = this.form.count_ok + this.form.count_notok; let sum = this.form.count_ok + this.form.count_notok;
@ -269,9 +361,7 @@ export default {
that.isSaveing = false; that.isSaveing = false;
}); });
} else { } else {
this.$message.error( this.$message.error("使用数量与合格数不合格数数量不对等");
"使用数量与合格数不合格数数量不对等"
);
} }
} }
}); });