fix:日志mlog中添加操作项
This commit is contained in:
parent
ca1e8c9cb0
commit
95b3ecad9a
|
@ -17,7 +17,7 @@
|
|||
style="padding: 0 10px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="12" :xs="24" v-if="mlogtype!=='rework'">
|
||||
<!-- <el-col :md="12" :sm="12" :xs="24" v-if="mgroupMtype==20">
|
||||
<el-form-item label="生产类型" prop="mtype">
|
||||
<el-select
|
||||
v-model="form.mtype"
|
||||
|
@ -34,8 +34,8 @@
|
|||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24" v-if="form.mtype == 20">
|
||||
</el-col> -->
|
||||
<el-col :md="12" :sm="12" :xs="24" v-if="mgroupMtype == 20">
|
||||
<el-form-item
|
||||
label="外协单位"
|
||||
prop="supplier"
|
||||
|
@ -233,7 +233,7 @@
|
|||
|
||||
<script>
|
||||
const defaultForm = {
|
||||
mtype: "",
|
||||
mtype: 10,
|
||||
supplier:'',
|
||||
route: "",
|
||||
equipment: "",
|
||||
|
@ -265,6 +265,10 @@ export default {
|
|||
type: String,
|
||||
default: "",
|
||||
},
|
||||
mgroupMtype: {
|
||||
type: String,
|
||||
default: "",
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
|
|
|
@ -160,6 +160,7 @@
|
|||
:mgroup="mgroupId"
|
||||
:dept="deptId"
|
||||
:mgroupName = "mgroupName"
|
||||
:mgroupMtype="mgroupMtype"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialog.save = false"
|
||||
>
|
||||
|
@ -211,6 +212,7 @@ export default {
|
|||
deptId: null,
|
||||
processId: "",
|
||||
processCate: "",
|
||||
mgroupMtype: "",
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
@ -239,10 +241,11 @@ export default {
|
|||
}
|
||||
that.deptId = res.belong_dept;
|
||||
that.processId = res.process;
|
||||
that.mgroupMtype = res.mtype;
|
||||
that.processCate = res.process_cate;
|
||||
that.params.mgroup = res.id;
|
||||
that.apiObj = that.$API.wpm.mlog.list;
|
||||
that.$refs.table.refresh();
|
||||
// that.$refs.table.refresh();
|
||||
});
|
||||
},
|
||||
getRemaTime(row){
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
v-if="values == '日志'&&componentsShow"
|
||||
:mgroupName="mgroupName"
|
||||
:mgroupId="mgroupId"
|
||||
:mgroupMtype = "mgroupMtype"
|
||||
:mgroupcode="mgroup_code"
|
||||
:processId="processId"
|
||||
:deptId = "mgroupDept"
|
||||
|
@ -84,6 +85,7 @@ export default {
|
|||
selectedIndex:0,
|
||||
mgroup_code:'',
|
||||
mgroupDept:'',
|
||||
mgroupMtype:'',
|
||||
processtype:'',
|
||||
processId:'',
|
||||
componentsShow:false,
|
||||
|
@ -122,6 +124,7 @@ export default {
|
|||
that.mgroupName = res[0].name;
|
||||
that.mgroupId = res[0].id;
|
||||
that.processId = res[0].process;
|
||||
that.mgroupMtype = res[0].mtype;
|
||||
that.processtype = res[0].process_type;
|
||||
that.mgroupDept = res[0].belong_dept;
|
||||
that.componentsShow = true;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
style="padding: 0 10px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="24">
|
||||
<!-- <el-col :md="12" :sm="24">
|
||||
<el-form-item label="生产类型" prop="mtype">
|
||||
<el-select
|
||||
v-model="form.mtype"
|
||||
|
@ -34,12 +34,11 @@
|
|||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-if="form.mtype == 20">
|
||||
</el-col> -->
|
||||
<el-col :md="12" :sm="24" v-if="mgroupMtype == 20">
|
||||
<el-form-item
|
||||
label="外协单位"
|
||||
prop="supplier"
|
||||
v-if="form.mtype == 20"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.supplier"
|
||||
|
@ -142,7 +141,62 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-if="mgroupName=='黑化'||mgroupName=='退火'">
|
||||
<el-col :md="12" :sm="12" :xs="24" v-for="item in testitems" :key="item.id">
|
||||
<el-form-item :label="item.name">
|
||||
<el-input-number
|
||||
v-if="item.field_type=='input-number'"
|
||||
v-model="item.value"
|
||||
:min="0"
|
||||
class="width-100"
|
||||
controls-position="right"
|
||||
>
|
||||
</el-input-number>
|
||||
<el-input-number
|
||||
v-if="item.field_type=='input-int'"
|
||||
v-model="item.value"
|
||||
:min="0"
|
||||
class="width-100"
|
||||
controls-position="right"
|
||||
>
|
||||
</el-input-number>
|
||||
<el-input
|
||||
v-if="item.field_type=='input-text'"
|
||||
v-model="item.value"
|
||||
class="width-100"
|
||||
>
|
||||
</el-input>
|
||||
<el-select
|
||||
v-if="item.field_type=='select-text'"
|
||||
v-model="item.value"
|
||||
clearable
|
||||
class="width-100"
|
||||
>
|
||||
<el-option
|
||||
v-for="item0 in item.choices"
|
||||
:key="item0"
|
||||
:label="item0"
|
||||
:value="item0"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-if="item.field_type=='selects-text'"
|
||||
v-model="item.value"
|
||||
clearable
|
||||
multiple
|
||||
class="width-100"
|
||||
>
|
||||
<el-option
|
||||
v-for="item1 in item.choices"
|
||||
:key="item1"
|
||||
:label="item1"
|
||||
:value="item1"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :md="12" :sm="24" v-if="mgroupName=='黑化'||mgroupName=='退火'">
|
||||
<el-form-item label="保温时间" required>
|
||||
<el-input-number
|
||||
v-model="form.reminder_interval_list[0]"
|
||||
|
@ -159,7 +213,7 @@
|
|||
controls-position="right"
|
||||
/>(min)
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="操作人">
|
||||
<ehsSelect
|
||||
|
@ -184,7 +238,6 @@
|
|||
</sc-upload-file>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="备注">
|
||||
<el-input
|
||||
|
@ -237,6 +290,10 @@ export default {
|
|||
type: String,
|
||||
default: "",
|
||||
},
|
||||
mgroupMtype:{
|
||||
type: String,
|
||||
default: "",
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
|
@ -256,6 +313,7 @@ export default {
|
|||
},
|
||||
test_file:'',
|
||||
fileList:[],
|
||||
testitems:[],
|
||||
//表单数据
|
||||
form: Object.assign({}, defaultForm),
|
||||
//验证规则
|
||||
|
@ -308,6 +366,7 @@ export default {
|
|||
// this.getUser();
|
||||
this.getSupplier();
|
||||
this.getEquipment();
|
||||
this.gettestitem();
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -154,6 +154,7 @@
|
|||
:process="processId"
|
||||
:mgroup="mgroupId"
|
||||
:dept="deptId"
|
||||
:mgroupMtype="mgroupMtype"
|
||||
:mgroupName = "mgroupName"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialog.save = false"
|
||||
|
@ -195,6 +196,10 @@ export default {
|
|||
type: String,
|
||||
default: "",
|
||||
},
|
||||
mgroupMtype:{
|
||||
type: String,
|
||||
default: "",
|
||||
}
|
||||
},
|
||||
name: "mlog",
|
||||
components: {
|
||||
|
@ -228,12 +233,8 @@ export default {
|
|||
let times = 0;
|
||||
let nowTime = new Date().getTime();
|
||||
let startTiem = new Date(row.work_start_time).getTime();
|
||||
console.log('nowTime',nowTime)
|
||||
console.log('startTiem',startTiem)
|
||||
let remaTime = nowTime - startTiem;
|
||||
console.log('remaTime',remaTime)
|
||||
let temp = Math.floor(remaTime/1000*60);
|
||||
console.log('temp',temp)
|
||||
if(remaTime>0&&row.reminder_interval_list[0]){
|
||||
if(temp<row.reminder_interval_list[0]){
|
||||
times = row.reminder_interval_list[0]-temp;
|
||||
|
|
Loading…
Reference in New Issue