@@ -292,6 +288,7 @@ export default {
},
data() {
return {
+ uploadHeaders: { Authorization: this.$store.getters.token },
visible: false,
infoForm_loading: false,
infoForm: {
@@ -368,6 +365,16 @@ export default {
mounted() {},
created() {},
methods: {
+ handleAvatarSuccess(response, file, fileList) {
+ if(response.code != 200) return;
+ this.infoForm.systemIcon = response.data.url;
+ this.$forceUpdate();
+ this.$message({
+ showClose: true,
+ message: response.code == 200 ? '文件上传成功' : '文件上传失败',
+ type: response.code == 200 ? 'success' : 'error',
+ });
+ },
// 请求公司列表
async initCompanyList() {
let { data } = await getCompanyInfoList(this.listQuery_company);
@@ -431,7 +438,7 @@ export default {
let { data } = await getSystemDetail(this.systemId);
this.infoForm = data;
this.handleSystemTypeChange(data.systemType);
- await this.companyChange(data.companyId);
+ data.companyId && await this.companyChange(data.companyId);
this.$forceUpdate();
},
handleSystemTypeChange(val) {
@@ -440,6 +447,7 @@ export default {
this.initSystemClassList(val);
},
async confirm() {
+ console.log(this.infoForm);
this.$refs["infoForm"].validate((valid) => {
if (valid) {
this.btnLoading = true;
diff --git a/src/views/DisposalSuggestions/Form.vue b/src/views/DisposalSuggestions/Form.vue
index c5c2513..a2802a4 100644
--- a/src/views/DisposalSuggestions/Form.vue
+++ b/src/views/DisposalSuggestions/Form.vue
@@ -136,7 +136,7 @@
@@ -203,6 +203,7 @@ export default {
showarea: false,
judgmentClassOption: [],
areaOptions: [],
+ btnLoading: false,
};
},
computed: {
@@ -271,7 +272,9 @@ export default {
...this.suggestionForm,
id: this.dataForm.id,
};
+ this.btnLoading = true;
let res = await disposalSuggestions(obj);
+ if(res.code != 200) return this.btnLoading = false;
this.$message({
message: res.msg,
type: "success",
diff --git a/src/views/DisposalSuggestions/HandleForm.vue b/src/views/DisposalSuggestions/HandleForm.vue
index a2850c1..0dbd30f 100644
--- a/src/views/DisposalSuggestions/HandleForm.vue
+++ b/src/views/DisposalSuggestions/HandleForm.vue
@@ -112,7 +112,7 @@
@@ -174,6 +174,7 @@
showarea: false,
judgmentClassOption: [],
areaOptions: [],
+ btnLoading: false,
};
},
computed: {
@@ -242,7 +243,9 @@
...this.suggestionForm,
id: this.dataForm.id,
};
+ this.btnLoading = true;
let res = await disposalSuggestions(obj);
+ if(res.code != 200) return this.btnLoading = false;
this.$message({
message: res.msg,
type: "success",
diff --git a/src/views/baseComapnyInfo/index.vue b/src/views/baseComapnyInfo/index.vue
index e349cf3..6e71ff3 100644
--- a/src/views/baseComapnyInfo/index.vue
+++ b/src/views/baseComapnyInfo/index.vue
@@ -29,7 +29,7 @@
@@ -162,41 +161,48 @@ export default {
});
},
toUpload(response, file, fileList) {
- console.log(response, file, fileList);
+ this.$message({
+ showClose: true,
+ message: response.msg,
+ type: response.code == 200 ? 'success' : 'error',
+ close: () => {
+ response.code == 200 && this.initData();
+ }
+ });
},
exportData(type) {
let obj = {};
if(type) {
obj = {
url: '/Extend/basecomapnyinfo/Actions/GenerateImportTemplate',
+ responseType: 'blob',
method: "GET",
}
} else {
- let _query = {
- ...this.query,
- };
- let query = {};
- for (let key in _query) {
- if (Array.isArray(_query[key])) {
- query[key] = _query[key].join();
- } else {
- query[key] = _query[key];
- }
- }
- obj ={
- url: '/Extend/basecomapnyinfo/Actions/ImportByExcel',
+ obj = {
+ url: '/Extend/basecomapnyinfo/Actions/Export',
method: "POST",
- data: query,
+ data: this.query,
}
};
request(obj).then((res) => {
- console.log(res);
- const url = define.APIURl + res.data.url;
- const link = document.createElement("a");
- link.href = url;
- link.download = res.data.name;
- link.click();
- }).catch(() => this.exportBtnLoading = false);
+ if(type) {
+ const blob = new Blob([res], {type: 'application/json'});
+ const url = window.URL.createObjectURL(blob);
+ let link = document.createElement('a');
+ link.style.display = 'none';
+ link.href = url;
+ link.download = '公司录入模板.xlsx';
+ link.click();
+ } else {
+ if(res.code != 200) return;
+ const url = define.APIURl + res.data.url;
+ const link = document.createElement("a");
+ link.href = url;
+ link.download = res.data.name;
+ link.click();
+ }
+ })
},
exportForm(url) {
const link = document.createElement("a");
diff --git a/src/views/baseInspectionReport/Form.vue b/src/views/baseInspectionReport/Form.vue
index f5236b8..b64d594 100644
--- a/src/views/baseInspectionReport/Form.vue
+++ b/src/views/baseInspectionReport/Form.vue
@@ -134,21 +134,21 @@
问题来源:
- {{ dataForm.reportSource || '--' }}
+ {{ sourceOptions.find(v => v.Id == dataForm.reportSource).FullName || '--' }}
应用名称:
- {{ dataForm.platformName || '--' }}
+ {{ dataForm.platformNameStr || '--' }}
运营主体:
- {{ dataForm.company || '--' }}
+ {{ dataForm.companyStr || '--' }}
应用类型:
- {{ dataForm.platformType || '--' }}
+ {{ dataForm.platformTypeStr || '--' }}
-
+
归属平台:
{{ dataForm.selfMediaPlatformType || '--' }}
@@ -174,7 +174,7 @@
附件:
-
+