Merge branch 'dev-yjl' into 'shenzhen-dev'

修改(质量管理模块页面bug)

See merge request !97
This commit is contained in:
袁晶琳 2023-02-10 09:39:24 +08:00
commit 1c63ae37e6
6 changed files with 73 additions and 17 deletions

View File

@ -1,13 +1,17 @@
<template>
<Card title="质量亮点">
<div class="list">
<vue-scroll style="width: 100%; height: 550px">
<div class="list-item" v-for="(item, index) in showList" :key="index">
<p>{{ item.title }}</p>
<img :src="$store.state.FILEURL + item.imageUrl" alt="" />
<img
:preview="item.imageUrl[0] ? item.imageUrl[0].url : []"
:src="item.imageUrl[0] ? item.imageUrl[0].url : []"
alt=""
width="50px"
/>
<!-- <img :src="$store.state.FILEURL + item.imageUrl" alt="" /> -->
</div>
</vue-scroll>
</div>
<div class="tbody" v-if="showList == 0">
@ -52,6 +56,29 @@ export default {
if (res.code == 200) {
console.log("数据", res);
this.showList = res.result;
res.result.map((item) => {
if (item.imageUrl.includes("[")) {
item.imageUrl = JSON.parse(item.imageUrl);
console.log("亮点展示 ====");
if (
item.imageUrl.length !== 0 &&
!item.imageUrl[0].url.includes(this.$store.state.FILEURL)
) {
item.imageUrl[0].url =
this.$store.state.FILEURL + item.imageUrl[0].url;
}
} else {
let url = item.imageUrl;
if (
url.length !== 0 &&
!url.includes(this.$store.state.FILEURL)
) {
item.imageUrl = [{}];
item.imageUrl[0].url = this.$store.state.FILEURL + url;
}
}
});
}
});
},

View File

@ -292,6 +292,8 @@ export default {
getData() {
getSubdivisionAcceptanceApi({
projectSn: this.$store.state.projectSn,
size:this.size,
current:this.current
}).then((res) => {
res.result.records.map((item) => {
item.imageUrl = JSON.parse(item.imageUrl);
@ -434,11 +436,12 @@ export default {
this.fileList = fileList;
},
handleSizeChange(value) {
this.current = value;
this.size = value;
this.getData();
},
handleCurrentChange(value) {
this.size = value;
this.current = value;
this.getData();
},
},

View File

@ -145,6 +145,8 @@ export default {
getData() {
getMaterialDetectionReportApi({
projectSn: this.$store.state.projectSn,
size:this.size,
current:this.current
}).then((res) => {
console.log("材料检验报告", res);
this.tableData=res.result.records
@ -213,11 +215,12 @@ export default {
});
},
handleSizeChange(value) {
this.current = value;
this.size = value;
this.getData();
},
handleCurrentChange(value) {
this.size = value;
this.current = value;
this.getData();
},
},

View File

@ -241,6 +241,8 @@ export default {
getData() {
getMeasuredRealQuantityApi({
projectSn: this.$store.state.projectSn,
size:this.size,
current:this.current
}).then((res) => {
res.result.records.map((item) => {
item.imageUrl = JSON.parse(item.imageUrl);
@ -378,11 +380,11 @@ export default {
this.fileList = fileList;
},
handleSizeChange(value) {
this.current = value;
this.size = value;
this.getData();
},
handleCurrentChange(value) {
this.size = value;
this.current = value;
this.getData();
},
},

View File

@ -179,18 +179,33 @@ export default {
getData() {
getWindowDisplayApi({
projectSn: this.$store.state.projectSn,
size:this.size,
current:this.current
}).then((res) => {
console.log("亮点展示", res);
this.tableData = res.result.records;
this.total = res.result.total;
res.result.records.map((item) => {
item.imageUrl = JSON.parse(item.imageUrl);
if(item.imageUrl.includes("[")){
item.imageUrl = JSON.parse(item.imageUrl);
console.log("亮点展示 ====");
if (item.imageUrl.length !== 0 && !item.imageUrl[0].url.includes(this.$store.state.FILEURL)) {
item.imageUrl[0].url =
this.$store.state.FILEURL + item.imageUrl[0].url;
}
});
}else{
let url = item.imageUrl
if (url.length !== 0 && !url.includes(this.$store.state.FILEURL)) {
item.imageUrl = [{}]
item.imageUrl[0].url =
this.$store.state.FILEURL + url;
}
}
});
console.log("亮点展示", res);
this.tableData = res.result.records;
this.total = res.result.total;
});
},
//
@ -286,11 +301,11 @@ export default {
this.fileList = fileList;
},
handleSizeChange(value) {
this.current = value;
this.size = value;
this.getData();
},
handleCurrentChange(value) {
this.size = value;
this.current = value;
this.getData();
},
},

View File

@ -70,7 +70,7 @@
v-model="form.checkTime"
type="datetime"
:placeholder="$t('message.safeMangeCheck.chooseDateAndTime')"
value-format="yyyy-MM-dd" style="width:100%">
style="width:100%">
</el-date-picker>
</el-form-item>
<el-form-item
@ -169,6 +169,8 @@ import {
getCrewListDataApi,
addSecurityChecksApi
} from "@/assets/js/api/safeManage";
import moment from "moment";
export default {
data() {
return {
@ -328,6 +330,10 @@ export default {
this.form.notifier = this.informCrew.length>0? this.informCrew.join(','):'';
this.$refs.form.validate((valid)=>{
if(valid){
let time = moment(this.form.checkTime).format(
"YYYY-MM-DD HH:mm:ss"
);
this.form.checkTime=time
let data = JSON.parse(JSON.stringify(this.form));
data.projectSn = this.projectSn;
data.inspector = this.$store.state.userInfo.userId;