Loading src/assets/upload/file.png −2.63 KiB (426 B) Loading image diff... src/assets/upload/pic.png 0 → 100644 +443 B Loading image diff... src/assets/upload/video.png −2.89 KiB (449 B) Loading image diff... src/views/danger/addDanger/addDanger.vue +61 −15 Original line number Original line Diff line number Diff line Loading @@ -27,7 +27,11 @@ @click="showProjectName = true" @click="showProjectName = true" :rules="[{ required: true, message: '所属项目不能为空' }]" :rules="[{ required: true, message: '所属项目不能为空' }]" /> /> <van-popup v-model="showProjectName" position="bottom" v-if="!isShowreturnCause"> <van-popup v-model="showProjectName" position="bottom" v-if="!isShowreturnCause" > <van-picker <van-picker show-toolbar show-toolbar value-key="projectName" value-key="projectName" Loading @@ -47,7 +51,11 @@ @click="showRange = true" @click="showRange = true" :rules="[{ required: true, message: '适用范围不能为空' }]" :rules="[{ required: true, message: '适用范围不能为空' }]" /> /> <van-popup v-model="showRange" position="bottom" v-if="!isShowreturnCause"> <van-popup v-model="showRange" position="bottom" v-if="!isShowreturnCause" > <van-picker <van-picker show-toolbar show-toolbar value-key="hdRange" value-key="hdRange" Loading @@ -66,6 +74,7 @@ placeholder="请选择" placeholder="请选择" @click="showType = true" @click="showType = true" :rules="[{ required: true, message: '隐患类型不能为空' }]" :rules="[{ required: true, message: '隐患类型不能为空' }]" :class="{'gray':isShowreturnCause}" /> /> <van-popup v-model="showType" position="bottom" v-if="!isShowreturnCause"> <van-popup v-model="showType" position="bottom" v-if="!isShowreturnCause"> <van-picker <van-picker Loading @@ -87,7 +96,11 @@ @click="showDangerName = true" @click="showDangerName = true" :rules="[{ required: true, message: '隐患项目名称不能为空' }]" :rules="[{ required: true, message: '隐患项目名称不能为空' }]" /> /> <van-popup v-model="showDangerName" position="bottom" v-if="!isShowreturnCause"> <van-popup v-model="showDangerName" position="bottom" v-if="!isShowreturnCause" > <van-picker <van-picker show-toolbar show-toolbar value-key="hdName" value-key="hdName" Loading Loading @@ -216,7 +229,29 @@ :max-count="5" :max-count="5" upload-text="最多上传五个" upload-text="最多上传五个" v-model="uploaderImg" v-model="uploaderImg" > <template slot="default"> <!-- 11111111111 --> <div style=" width: 2.13333rem; height: 2.13333rem; background: #f7f8fa; display: flex; align-items: center; justify-content: center; flex-direction: column; " > <img src="@/assets/upload/pic.png" alt="" style="width: 0.64rem; height: 0.64rem" /> /> <span class="van-uploader__upload-text">最多上传五个</span> </div> </template> </van-uploader> </template> </template> </van-field> </van-field> Loading Loading @@ -392,6 +427,7 @@ export default { data() { data() { return { return { id: 0, text: "新增隐患", text: "新增隐患", taskId: "", taskId: "", projectId: "", // 所属工程 projectId: "", // 所属工程 Loading Loading @@ -465,6 +501,7 @@ export default { onSubmit(values) { onSubmit(values) { let formdata = new FormData(); let formdata = new FormData(); formdata.append("id", this.id); formdata.append("proId", this.projectId); formdata.append("proId", this.projectId); // formdata.append("projectName", this.projectName); // formdata.append("projectName", this.projectName); formdata.append("hdRange", values.hdRange); formdata.append("hdRange", values.hdRange); Loading Loading @@ -548,8 +585,9 @@ export default { // 对数据进行赋值 // 对数据进行赋值 this.returnCause = res.data.reason; this.returnCause = res.data.reason; let msg = res.data.hdReport; let msg = res.data.hdReport; msg.hdPictureList=msg.hdPictureList||[]; // msg.hdPictureList=msg.hdPictureList||[]; msg.hdVideoList=msg.hdVideoList||[]; // msg.hdVideoList=msg.hdVideoList||[]; this.id = msg.id; this.projectId = msg.proId; this.projectId = msg.proId; this.projectName = res.data.projectInformations.filter( this.projectName = res.data.projectInformations.filter( (item) => item.id == msg.proId (item) => item.id == msg.proId Loading @@ -566,20 +604,28 @@ export default { this.describe = msg.hdDescribe; this.describe = msg.hdDescribe; this.expireTime = msg.hdExpirationTime; this.expireTime = msg.hdExpirationTime; this.recPeople = msg.rectificationUser; this.recPeople = msg.rectificationUser; this.uploaderImg = msg.hdPictureList.map(item=>{ this.uploaderImg = (res.data.imgsysFiles || []).map((item) => { return { return { ...item, ...item, url:item.filePath url: item.filePath, } }; }) }); this.uploaderVideo = msg.hdVideoList.map(item=>{ console.log(this.uploaderImg); this.uploaderVideo = (res.data.videosysFiles || []).map((item) => { return { return { ...item, ...item, url:item.filePath url: item.filePath, }; }); postHdShowPeople(`/hdreport/showPeople/${msg.proId}`).then( (res) => { this.columnsRecPeople = res.data; } } ); }) }) }) .catch((err) => { .catch(() => { console.log(err); this.$toast.clear(); this.$toast.clear(); this.$toast.fail("加载失败,请稍后再试"); this.$toast.fail("加载失败,请稍后再试"); }); }); Loading src/views/danger/majorDanger/majorSurvey.vue +2 −2 Original line number Original line Diff line number Diff line Loading @@ -34,7 +34,7 @@ :scroll-to-error="true" :scroll-to-error="true" validate-trigger="onSubmit" validate-trigger="onSubmit" > > <van-field name="isResult" label="隐患复查结果"> <van-field name="isResult" label="审批结果"> <template #input> <template #input> <van-radio-group <van-radio-group v-model="radio" v-model="radio" Loading @@ -42,7 +42,7 @@ @change="selectResult" @change="selectResult" > > <van-radio name="1">同意</van-radio> <van-radio name="1">同意</van-radio> <van-radio name="0">重新认定隐患级别</van-radio> <van-radio name="0">退回</van-radio> </van-radio-group> </van-radio-group> </template> </template> </van-field> </van-field> Loading Loading
src/views/danger/addDanger/addDanger.vue +61 −15 Original line number Original line Diff line number Diff line Loading @@ -27,7 +27,11 @@ @click="showProjectName = true" @click="showProjectName = true" :rules="[{ required: true, message: '所属项目不能为空' }]" :rules="[{ required: true, message: '所属项目不能为空' }]" /> /> <van-popup v-model="showProjectName" position="bottom" v-if="!isShowreturnCause"> <van-popup v-model="showProjectName" position="bottom" v-if="!isShowreturnCause" > <van-picker <van-picker show-toolbar show-toolbar value-key="projectName" value-key="projectName" Loading @@ -47,7 +51,11 @@ @click="showRange = true" @click="showRange = true" :rules="[{ required: true, message: '适用范围不能为空' }]" :rules="[{ required: true, message: '适用范围不能为空' }]" /> /> <van-popup v-model="showRange" position="bottom" v-if="!isShowreturnCause"> <van-popup v-model="showRange" position="bottom" v-if="!isShowreturnCause" > <van-picker <van-picker show-toolbar show-toolbar value-key="hdRange" value-key="hdRange" Loading @@ -66,6 +74,7 @@ placeholder="请选择" placeholder="请选择" @click="showType = true" @click="showType = true" :rules="[{ required: true, message: '隐患类型不能为空' }]" :rules="[{ required: true, message: '隐患类型不能为空' }]" :class="{'gray':isShowreturnCause}" /> /> <van-popup v-model="showType" position="bottom" v-if="!isShowreturnCause"> <van-popup v-model="showType" position="bottom" v-if="!isShowreturnCause"> <van-picker <van-picker Loading @@ -87,7 +96,11 @@ @click="showDangerName = true" @click="showDangerName = true" :rules="[{ required: true, message: '隐患项目名称不能为空' }]" :rules="[{ required: true, message: '隐患项目名称不能为空' }]" /> /> <van-popup v-model="showDangerName" position="bottom" v-if="!isShowreturnCause"> <van-popup v-model="showDangerName" position="bottom" v-if="!isShowreturnCause" > <van-picker <van-picker show-toolbar show-toolbar value-key="hdName" value-key="hdName" Loading Loading @@ -216,7 +229,29 @@ :max-count="5" :max-count="5" upload-text="最多上传五个" upload-text="最多上传五个" v-model="uploaderImg" v-model="uploaderImg" > <template slot="default"> <!-- 11111111111 --> <div style=" width: 2.13333rem; height: 2.13333rem; background: #f7f8fa; display: flex; align-items: center; justify-content: center; flex-direction: column; " > <img src="@/assets/upload/pic.png" alt="" style="width: 0.64rem; height: 0.64rem" /> /> <span class="van-uploader__upload-text">最多上传五个</span> </div> </template> </van-uploader> </template> </template> </van-field> </van-field> Loading Loading @@ -392,6 +427,7 @@ export default { data() { data() { return { return { id: 0, text: "新增隐患", text: "新增隐患", taskId: "", taskId: "", projectId: "", // 所属工程 projectId: "", // 所属工程 Loading Loading @@ -465,6 +501,7 @@ export default { onSubmit(values) { onSubmit(values) { let formdata = new FormData(); let formdata = new FormData(); formdata.append("id", this.id); formdata.append("proId", this.projectId); formdata.append("proId", this.projectId); // formdata.append("projectName", this.projectName); // formdata.append("projectName", this.projectName); formdata.append("hdRange", values.hdRange); formdata.append("hdRange", values.hdRange); Loading Loading @@ -548,8 +585,9 @@ export default { // 对数据进行赋值 // 对数据进行赋值 this.returnCause = res.data.reason; this.returnCause = res.data.reason; let msg = res.data.hdReport; let msg = res.data.hdReport; msg.hdPictureList=msg.hdPictureList||[]; // msg.hdPictureList=msg.hdPictureList||[]; msg.hdVideoList=msg.hdVideoList||[]; // msg.hdVideoList=msg.hdVideoList||[]; this.id = msg.id; this.projectId = msg.proId; this.projectId = msg.proId; this.projectName = res.data.projectInformations.filter( this.projectName = res.data.projectInformations.filter( (item) => item.id == msg.proId (item) => item.id == msg.proId Loading @@ -566,20 +604,28 @@ export default { this.describe = msg.hdDescribe; this.describe = msg.hdDescribe; this.expireTime = msg.hdExpirationTime; this.expireTime = msg.hdExpirationTime; this.recPeople = msg.rectificationUser; this.recPeople = msg.rectificationUser; this.uploaderImg = msg.hdPictureList.map(item=>{ this.uploaderImg = (res.data.imgsysFiles || []).map((item) => { return { return { ...item, ...item, url:item.filePath url: item.filePath, } }; }) }); this.uploaderVideo = msg.hdVideoList.map(item=>{ console.log(this.uploaderImg); this.uploaderVideo = (res.data.videosysFiles || []).map((item) => { return { return { ...item, ...item, url:item.filePath url: item.filePath, }; }); postHdShowPeople(`/hdreport/showPeople/${msg.proId}`).then( (res) => { this.columnsRecPeople = res.data; } } ); }) }) }) .catch((err) => { .catch(() => { console.log(err); this.$toast.clear(); this.$toast.clear(); this.$toast.fail("加载失败,请稍后再试"); this.$toast.fail("加载失败,请稍后再试"); }); }); Loading
src/views/danger/majorDanger/majorSurvey.vue +2 −2 Original line number Original line Diff line number Diff line Loading @@ -34,7 +34,7 @@ :scroll-to-error="true" :scroll-to-error="true" validate-trigger="onSubmit" validate-trigger="onSubmit" > > <van-field name="isResult" label="隐患复查结果"> <van-field name="isResult" label="审批结果"> <template #input> <template #input> <van-radio-group <van-radio-group v-model="radio" v-model="radio" Loading @@ -42,7 +42,7 @@ @change="selectResult" @change="selectResult" > > <van-radio name="1">同意</van-radio> <van-radio name="1">同意</van-radio> <van-radio name="0">重新认定隐患级别</van-radio> <van-radio name="0">退回</van-radio> </van-radio-group> </van-radio-group> </template> </template> </van-field> </van-field> Loading