Browse Source

调整隐患排查和打包配置的

master
xzt 1 month ago
parent
commit
9a5ee4c13a
  1. 3
      jwtech-admin-page/package.json
  2. 125
      jwtech-admin-page/src/views/building/projectInfo/projectProcess/dangerRegistration.vue
  3. 5
      jwtech-system/src/main/java/com/kms/build/domain/BsSgcJsjdBuiHazardRecord.java

3
jwtech-admin-page/package.json

@ -6,7 +6,7 @@
"license": "MIT",
"scripts": {
"dev": "vue-cli-service serve",
"build": "vue-cli-service build",
"build": "cross-env NODE_OPTIONS=--max-old-space-size=4096 vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src",
@ -114,6 +114,7 @@
"chalk": "2.4.2",
"chokidar": "2.1.5",
"connect": "3.6.6",
"cross-env": "^7.0.3",
"docx-preview": "^0.1.14",
"eslint": "6.7.2",
"eslint-plugin-vue": "6.2.2",

125
jwtech-admin-page/src/views/building/projectInfo/projectProcess/dangerRegistration.vue

@ -181,6 +181,29 @@
prop="rectificationResponsibleUnit"
min-width="120"
/>
<el-table-column
label="文档附件"
align="left"
prop="hazardAttachment"
min-width="180"
>
<template slot-scope="scope">
<div
v-for="(item, index) in JSON.parse(
scope.row.hazardAttachment
)"
:key="item + index"
>
<i class="el-icon-document"></i>
{{ item.name }}
<i
class="el-icon-download"
@click="downloadFile1(scope, index)"
style="cursor: pointer"
></i>
</div>
</template>
</el-table-column>
<el-table-column
label="操作"
align="right"
@ -339,6 +362,43 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="15" class="pad12">
<el-col :span="12">
<el-form-item
label="照片"
prop="acceptDocumentAttachment"
>
<!-- <el-input
v-model="form.acceptDocumentAttachment"
placeholder="请输入规划项目验收文档附件"
/> -->
<el-upload
class="upload-demo"
action="thinking/common/upload"
accept="image/png, image/gif, image/jpeg, image/bmp"
:headers="headers"
:before-upload="
(file) => $fileBeforeUpload(file, 'acceptDocumentFileList')
"
:on-preview="handlePreview"
:on-remove="handleRemove"
:before-remove="beforeRemove"
multiple
:on-exceed="handleExceed"
:on-success="submitAcceptDocumentUpload"
:file-list="acceptDocumentFileList"
>
<el-button size="small" type="primary" plain>
<i class="el-icon-upload el-icon--right"></i>
点击上传
</el-button>
<div slot="tip" class="el-upload__tip">
支持jpg/png文件等
</div>
</el-upload>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-row>
<div class="dialog-footer" slot="footer">
@ -439,6 +499,8 @@ export default {
headers: {
jianwei: "jwtech " + getToken(),
},
//
acceptDocumentFileList: [],
//
whetherOptions: [],
};
@ -546,6 +608,12 @@ export default {
this.reset();
const id = row.id || this.ids;
getRecord(id).then((response) => {
if (response.data.hazardAttachment) {
this.acceptDocumentFileList = JSON.parse(
response.data.hazardAttachment
);
}
this.form = response.data;
});
this.open = true;
@ -584,6 +652,7 @@ export default {
hazardLevel: null,
rectificationDeadline: null,
rectificationResponsibleUnit: null,
hazardAttachment: null
};
this.resetForm("form");
},
@ -648,6 +717,10 @@ export default {
if (valid) {
this.form.proNo = this.proNo;
this.form.proCode = this.proCode;
//
this.form.hazardAttachment = JSON.stringify(
this.acceptDocumentFileList
);
console.log("this.formthis.form", this.form);
if (this.form.id != null) {
@ -691,6 +764,58 @@ export default {
this.$message.warning("请选择要删除的数据!!");
}
},
//
downloadFile1(scope, index) {
// console.log(scope);
let file = JSON.parse(scope.row.hazardAttachment)[index];
this.handlePreview(file);
},
//
handlePreview(file) {
// console.log(file);
getFileStream({ fileName: file.fileName }).then((res) => {
const blob = new Blob([res], {
// type
// application/xlsx application/zip
type: "application/xlsx",
}); //excel,pdf
const href = URL.createObjectURL(blob); //URLblob
const a = document.createElement("a"); //a
a.style.display = "none";
a.href = href; //
a.download = file.name; //
a.click(); //
URL.revokeObjectURL(a.href); //URL
});
},
handleRemove(file, fileList) {
// console.log(file, fileList);
let index = this.acceptDocumentFileList.findIndex(
(item) => item.uid === file.uid
);
//
this.acceptDocumentFileList.splice(index, 1);
},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}`);
},
handleExceed(files, fileList) {
this.$message.warning(
`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
files.length + fileList.length
} 个文件`
);
},
//
submitAcceptDocumentUpload(_, fileList) {
console.log("fileList", fileList);
this.acceptDocumentFileList.push({
name: fileList.name,
fileName: fileList.response.fileName,
url: fileList.response.url,
uid: fileList.uid,
});
},
},
};
</script>

5
jwtech-system/src/main/java/com/kms/build/domain/BsSgcJsjdBuiHazardRecord.java

@ -115,4 +115,9 @@ public class BsSgcJsjdBuiHazardRecord extends BaseEntity
@ApiModelProperty("数源部门")
private String owerDept;
/** 数源部门 */
@Excel(name = "附件")
@ApiModelProperty("附件")
private String hazardAttachment;
}

Loading…
Cancel
Save