|
@@ -208,9 +208,8 @@
|
|
<script>
|
|
<script>
|
|
import {addProject, delProject, listProject, updateProject} from "@/api/biz/dataQuery/project";
|
|
import {addProject, delProject, listProject, updateProject} from "@/api/biz/dataQuery/project";
|
|
import {listAllDisabled} from "@/api/biz/dataQuery/windTowerStatusInfo";
|
|
import {listAllDisabled} from "@/api/biz/dataQuery/windTowerStatusInfo";
|
|
-import {companyListInfo} from "@/api/biz/dataQuery/company";
|
|
|
|
import {getPointMap} from "@/api/biz/dataQuery/largeScreenPage";
|
|
import {getPointMap} from "@/api/biz/dataQuery/largeScreenPage";
|
|
-import {uploadProjectProgressFile} from "@/api/biz/dataQuery/homePage";
|
|
|
|
|
|
+import {uploadProjectFile} from "@/api/biz/dataQuery/homePage";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "Project",
|
|
name: "Project",
|
|
@@ -227,22 +226,13 @@ export default {
|
|
callback()
|
|
callback()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- const checkLatitude = (rule, value, callback) => {
|
|
|
|
- if (!value) {
|
|
|
|
- callback(new Error('不许为空'))
|
|
|
|
- }
|
|
|
|
- if (reg1.test(value) == false) {
|
|
|
|
- callback(new Error('请输入正确纬度'));
|
|
|
|
- } else {
|
|
|
|
- callback()
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
return {
|
|
return {
|
|
projectName: null,
|
|
projectName: null,
|
|
// 遮罩层
|
|
// 遮罩层
|
|
loading: true,
|
|
loading: true,
|
|
// 选中数组
|
|
// 选中数组
|
|
ids: [],
|
|
ids: [],
|
|
|
|
+ fileList: [],
|
|
// 非单个禁用
|
|
// 非单个禁用
|
|
single: true,
|
|
single: true,
|
|
// 非多个禁用
|
|
// 非多个禁用
|
|
@@ -306,6 +296,11 @@ export default {
|
|
this.getList();
|
|
this.getList();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ show() {
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ console.log(this.$refs)
|
|
|
|
+ }, 0)
|
|
|
|
+ },
|
|
beforeUpload(file) {
|
|
beforeUpload(file) {
|
|
const isLt2M = file.size / 1024 / 1024 < 1024 // 这里做文件大小限制
|
|
const isLt2M = file.size / 1024 / 1024 < 1024 // 这里做文件大小限制
|
|
if (!isLt2M) {
|
|
if (!isLt2M) {
|
|
@@ -314,22 +309,26 @@ export default {
|
|
type: 'warning'
|
|
type: 'warning'
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+
|
|
return isLt2M
|
|
return isLt2M
|
|
},
|
|
},
|
|
dataUpload(item) {
|
|
dataUpload(item) {
|
|
this.fullscreenLoading = true
|
|
this.fullscreenLoading = true
|
|
const formData = new FormData()
|
|
const formData = new FormData()
|
|
formData.append('file', item.file)
|
|
formData.append('file', item.file)
|
|
- formData.append("projectNo", this.row.projectNo)
|
|
|
|
- uploadProjectProgressFile(formData).then((response) => {
|
|
|
|
- this.$refs.upload.clearFiles()
|
|
|
|
|
|
+ formData.append("id", this.form.projectNo)
|
|
|
|
+ uploadProjectFile(formData).then((response) => {
|
|
|
|
+
|
|
this.fullscreenLoading = false
|
|
this.fullscreenLoading = false
|
|
|
|
+ this.open = false
|
|
|
|
+ console.log(response)
|
|
if (response && response.code === 200) {
|
|
if (response && response.code === 200) {
|
|
- this.getProjectEvolve()
|
|
|
|
|
|
+ this.getList()
|
|
this.$message.success(response.msg)
|
|
this.$message.success(response.msg)
|
|
} else {
|
|
} else {
|
|
this.$message.error(response.msg)
|
|
this.$message.error(response.msg)
|
|
}
|
|
}
|
|
|
|
+ this.$refs.upload.clearFiles()
|
|
})
|
|
})
|
|
},
|
|
},
|
|
formatEquipment(data) {
|
|
formatEquipment(data) {
|
|
@@ -350,7 +349,6 @@ export default {
|
|
return b;
|
|
return b;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
},
|
|
},
|
|
/*条件查询*/
|
|
/*条件查询*/
|
|
selectList() {
|
|
selectList() {
|
|
@@ -377,11 +375,6 @@ export default {
|
|
this.relationEquipmentData = res.data
|
|
this.relationEquipmentData = res.data
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- getcompanyInfo() {
|
|
|
|
- companyListInfo().then(res => {
|
|
|
|
- this.companyData = res.rows
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
// 表单重置
|
|
// 表单重置
|
|
reset() {
|
|
reset() {
|
|
this.form = {
|
|
this.form = {
|
|
@@ -493,11 +486,6 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
/** 导出按钮操作 */
|
|
/** 导出按钮操作 */
|
|
- // handleExport() {
|
|
|
|
- // this.download('client/project/export', {
|
|
|
|
- // ...this.queryParams
|
|
|
|
- // }, `project_${new Date().getTime()}.xlsx`)
|
|
|
|
- // },
|
|
|
|
getPoint() {
|
|
getPoint() {
|
|
getPointMap().then(res => {
|
|
getPointMap().then(res => {
|
|
sessionStorage.setItem("allPointInfo", JSON.stringify({info: res.data}))
|
|
sessionStorage.setItem("allPointInfo", JSON.stringify({info: res.data}))
|