@@ -196,12 +215,13 @@ export default {
INVESTMENT_FUNDS: '', // 投入资金
RECTIFICATIONTIME: ''// 整改时间
},
+ imgUrl: '',
rectify_files: [],
hideUpload: false, // 整改照片
dialogImageVisible: false, // 放大照片的显示和隐藏
dialogImageUrl: '', // 照片的地址
scheme_files: [], // 整改方案图片
- temporaryFilePath: '',
+ temporaryFilePath: [],
formRule: {
RECTIFICATIONDEPT: [{ required: true, message: '请选择整改部门', trigger: 'blur' }],
RECTIFICATIONOR: [{ required: true, message: '请选择整改人', trigger: 'blur' }],
@@ -255,6 +275,53 @@ export default {
this.getEditMyInfo()
},
methods: {
+ uploadFiles(file) {
+ // 调用文件大小校验方法
+ if (this.beforeUpload(file.file)) {
+ this.formData = new FormData()
+ this.formData.append('FFILE', file.file)
+ // 请求接口
+ upload(
+ '/mfolder/upLoadTemporary',
+ this.formData
+ ).then((data) => {
+ if (data.result == 'success') {
+ this.$message({
+ message: '保存成功',
+ type: 'success'
+ })
+ this.loading = false
+ this.temporaryFilePath.push(data.temporaryFilePath)
+ console.info('this.temporaryFilePath========' + this.temporaryFilePath)
+ } else {
+ this.$message({
+ message: data.exception,
+ type: 'error'
+ })
+ this.loading = false
+ }
+ }).catch((e) => {
+ this.listLoading = false
+ this.loading = false
+ })
+ }
+ },
+ // 文件大小校验
+ beforeUpload(file) {
+ if (file.size > 10 * 1024 * 1024) {
+ this.$message('文件过大,请上传小于10MB的文件〜')
+ return false
+ }
+ return true
+ },
+ // 删除图片
+ imageRemove() {
+ this.imgUrl = ''
+ this.$message({
+ message: '删除图片成功',
+ type: 'success'
+ })
+ },
getEditMyInfo: function() {
requestFN(
'/user/goEditMyInfo',
@@ -417,7 +484,8 @@ export default {
},
saveRectify() { // 正常整改
this.loading = true
- if (this.$refs.zhenggaiupload.uploadFiles.length < 1) {
+ // if (this.$refs.zhenggaiupload.uploadFiles.length < 1) {
+ if (this.temporaryFilePath.length < 1) {
this.$message({
message: '请上传整改后照片',
type: 'error'
@@ -544,16 +612,24 @@ export default {
text: '加载中......',
background: 'rgba(0,0,0,0.5)'
})
- this.$refs.zhenggaiupload.submit()
+ // this.$refs.zhenggaiupload.submit()
var todata = new FormData()
- for (var i = 0; i < _this.rectify_files.length; i++) {
- if (_this.rectify_files[i]) {
- todata.append('FFILE', _this.rectify_files[i])
+ for (var i = 0; i < _this.temporaryFilePath.length; i++) {
+ if (_this.temporaryFilePath[i]) {
+ todata.append('temporaryFilePath', _this.temporaryFilePath[i])
}
}
- if (!todata.get('FFILE')) {
+ if (!todata.get('temporaryFilePath')) {
return
}
+ // for (var i = 0; i < _this.rectify_files.length; i++) {
+ // if (_this.rectify_files[i]) {
+ // todata.append('FFILE', _this.rectify_files[i])
+ // }
+ // }
+ // if (!todata.get('FFILE')) {f
+ // return
+ // }
todata.append('FOREIGN_KEY', this.HIDDEN_ID)
todata.append('TYPE', 4)
upload(
diff --git a/src/views/safetyenvironmental/archive/components/info.vue b/src/views/safetyenvironmental/archive/components/info.vue
index cdc7b26..c0c30af 100644
--- a/src/views/safetyenvironmental/archive/components/info.vue
+++ b/src/views/safetyenvironmental/archive/components/info.vue
@@ -243,7 +243,7 @@ export default {
getData() {
return new Promise((resolve) => {
requestFN(
- '/safetyenvironmental/goShow',
+ '/safetyenvironmental/V2/goShow',
{
INSPECTION_ID: this.$parent.INSPECTION_ID
}
diff --git a/src/views/safetyenvironmental/inspection/components/add.vue b/src/views/safetyenvironmental/inspection/components/add.vue
index 610d76d..c809ad0 100644
--- a/src/views/safetyenvironmental/inspection/components/add.vue
+++ b/src/views/safetyenvironmental/inspection/components/add.vue
@@ -13,16 +13,16 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 是
+ 否
+
+
+
+
@@ -33,26 +33,46 @@
:props="defaultProps"
v-model="form.INSPECTED_DEPARTMENT_ID"
placeholder="请选择被检查单位"
- style="width: 300px" />
+ style="width: 300px"/>
-
+
-
+
-
+
-
+
+ children-name="nodes"/>
-
+
-
+
-
检查人员 添加
-
+ 检查人员
+ 添加
+
+
@@ -95,26 +130,60 @@
-
-
+
+
-
+
- 检查情况 添加
-
+ 检查情况
+ 添加
+
+
-
-
+
+
- 发现问题 添加
+ 发现问题
+ 添加
+
@@ -125,11 +194,22 @@
- {{ index+1 }} |
+ {{ index + 1 }} |
{{ item.HIDDENDESCR }} |
- 修改
- 删除
+ 修改
+
+ 删除
+
|
@@ -145,9 +225,15 @@
-
+
-
+
-
+
- {{ hiddenPartType === 'select' ? '输入' : '选择' }}
+ placeholder="请选择"/>
+ {{
+ hiddenPartType === 'select' ? '输入' : '选择'
+ }}
+
@@ -201,12 +294,12 @@
:canparent="false"
children-name="nodes"
style="width: 100%;"
- placeholder="请选择" />
+ placeholder="请选择"/>
-
+
+ @focus="chooseMap"/>
+ @focus="chooseMap"/>
位置定位
@@ -237,7 +330,7 @@
-
+
-
+
@@ -292,7 +385,7 @@
multiple
accept=".jpg,.jpeg,.png"
list-type="picture-card">
-
+
* 最多只能上传四张图片
@@ -304,13 +397,17 @@
-
+
-
+
@@ -337,8 +434,17 @@
-
-
+
+
@@ -373,7 +479,7 @@
-
+