Commit a242b994768bc567f614ffd0eba9932945f158ed

Authored by monkeyhouyi
1 parent 94f06e38

附件调试

src/components/Generator/components/Upload/UploadFz.vue
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <div class="UploadFile-container"> 2 <div class="UploadFile-container">
3 <el-upload :action="define.comUploadUrl+'/'+type" :headers="uploadHeaders" ref="elUpload" 3 <el-upload :action="define.comUploadUrl+'/'+type" :headers="uploadHeaders" ref="elUpload"
4 :on-success="handleSuccess" :multiple="limit!==1" :show-file-list="false" :accept="accept" 4 :on-success="handleSuccess" :multiple="limit!==1" :show-file-list="false" :accept="accept"
5 - :before-upload="beforeUpload" :on-exceed="handleExceed" :disabled="disabled" :limit="limit"> 5 + :before-upload="beforeUpload" :on-exceed="handleExceed" :disabled="disabled" :limit="limit" v-if="!disabled">
6 <el-button size="small" icon="el-icon-upload" :disabled="disabled">{{buttonText}}</el-button> 6 <el-button size="small" icon="el-icon-upload" :disabled="disabled">{{buttonText}}</el-button>
7 <div slot="tip" class="el-upload__tip" v-show="showTip"> 7 <div slot="tip" class="el-upload__tip" v-show="showTip">
8 只能上传不超过{{fileSize}}{{sizeUnit}}的{{accept}}文件 8 只能上传不超过{{fileSize}}{{sizeUnit}}的{{accept}}文件
src/components/InfoForm/index.vue
1 <template> 1 <template>
2 - <div class="infoForm"> 2 + <div class="infoFormDialog">
3 <div class="userSelect-input" @click="openDialog"> 3 <div class="userSelect-input" @click="openDialog">
4 <slot></slot> 4 <slot></slot>
5 </div> 5 </div>
@@ -230,17 +230,13 @@ @@ -230,17 +230,13 @@
230 <el-form-item label="应用图标" prop="systemIcon"> 230 <el-form-item label="应用图标" prop="systemIcon">
231 <el-upload 231 <el-upload
232 class="avatar-uploader" 232 class="avatar-uploader"
233 - action="#" 233 + :action="define.APIURl + '/api/file/Uploader/annex'"
  234 + :headers="uploadHeaders"
234 :show-file-list="false" 235 :show-file-list="false"
235 - :limit="1"  
236 - :multiple="false"  
237 - :http-request="httpRequest"  
238 - >  
239 - <img  
240 - v-if="infoForm.systemIcon"  
241 - :src="infoForm.systemIcon"  
242 - class="avatar"  
243 - /> 236 + :on-success="handleAvatarSuccess"
  237 + accept="image/*"
  238 + >
  239 + <img v-if="infoForm.systemIcon" :src="define.comUrl + infoForm.systemIcon" class="avatar">
244 <i v-else class="el-icon-plus avatar-uploader-icon"></i> 240 <i v-else class="el-icon-plus avatar-uploader-icon"></i>
245 </el-upload> 241 </el-upload>
246 </el-form-item> 242 </el-form-item>
@@ -292,6 +288,7 @@ export default { @@ -292,6 +288,7 @@ export default {
292 }, 288 },
293 data() { 289 data() {
294 return { 290 return {
  291 + uploadHeaders: { Authorization: this.$store.getters.token },
295 visible: false, 292 visible: false,
296 infoForm_loading: false, 293 infoForm_loading: false,
297 infoForm: { 294 infoForm: {
@@ -368,6 +365,16 @@ export default { @@ -368,6 +365,16 @@ export default {
368 mounted() {}, 365 mounted() {},
369 created() {}, 366 created() {},
370 methods: { 367 methods: {
  368 + handleAvatarSuccess(response, file, fileList) {
  369 + if(response.code != 200) return;
  370 + this.infoForm.systemIcon = response.data.url;
  371 + this.$forceUpdate();
  372 + this.$message({
  373 + showClose: true,
  374 + message: response.code == 200 ? '文件上传成功' : '文件上传失败',
  375 + type: response.code == 200 ? 'success' : 'error',
  376 + });
  377 + },
371 // 请求公司列表 378 // 请求公司列表
372 async initCompanyList() { 379 async initCompanyList() {
373 let { data } = await getCompanyInfoList(this.listQuery_company); 380 let { data } = await getCompanyInfoList(this.listQuery_company);
@@ -431,7 +438,7 @@ export default { @@ -431,7 +438,7 @@ export default {
431 let { data } = await getSystemDetail(this.systemId); 438 let { data } = await getSystemDetail(this.systemId);
432 this.infoForm = data; 439 this.infoForm = data;
433 this.handleSystemTypeChange(data.systemType); 440 this.handleSystemTypeChange(data.systemType);
434 - await this.companyChange(data.companyId); 441 + data.companyId && await this.companyChange(data.companyId);
435 this.$forceUpdate(); 442 this.$forceUpdate();
436 }, 443 },
437 handleSystemTypeChange(val) { 444 handleSystemTypeChange(val) {
@@ -440,6 +447,7 @@ export default { @@ -440,6 +447,7 @@ export default {
440 this.initSystemClassList(val); 447 this.initSystemClassList(val);
441 }, 448 },
442 async confirm() { 449 async confirm() {
  450 + console.log(this.infoForm);
443 this.$refs["infoForm"].validate((valid) => { 451 this.$refs["infoForm"].validate((valid) => {
444 if (valid) { 452 if (valid) {
445 this.btnLoading = true; 453 this.btnLoading = true;
src/views/DisposalSuggestions/Form.vue
@@ -136,7 +136,7 @@ @@ -136,7 +136,7 @@
136 </el-row> 136 </el-row>
137 <span slot="footer" class="dialog-footer"> 137 <span slot="footer" class="dialog-footer">
138 <el-button @click="visible = false">取 消</el-button> 138 <el-button @click="visible = false">取 消</el-button>
139 - <el-button type="primary" @click="dataFormSubmit()">确 定</el-button> 139 + <el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading">确 定</el-button>
140 </span> 140 </span>
141 </el-dialog> 141 </el-dialog>
142 </template> 142 </template>
@@ -203,6 +203,7 @@ export default { @@ -203,6 +203,7 @@ export default {
203 showarea: false, 203 showarea: false,
204 judgmentClassOption: [], 204 judgmentClassOption: [],
205 areaOptions: [], 205 areaOptions: [],
  206 + btnLoading: false,
206 }; 207 };
207 }, 208 },
208 computed: { 209 computed: {
@@ -271,7 +272,9 @@ export default { @@ -271,7 +272,9 @@ export default {
271 ...this.suggestionForm, 272 ...this.suggestionForm,
272 id: this.dataForm.id, 273 id: this.dataForm.id,
273 }; 274 };
  275 + this.btnLoading = true;
274 let res = await disposalSuggestions(obj); 276 let res = await disposalSuggestions(obj);
  277 + if(res.code != 200) return this.btnLoading = false;
275 this.$message({ 278 this.$message({
276 message: res.msg, 279 message: res.msg,
277 type: "success", 280 type: "success",
src/views/DisposalSuggestions/HandleForm.vue
@@ -112,7 +112,7 @@ @@ -112,7 +112,7 @@
112 </el-row> 112 </el-row>
113 <span slot="footer" class="dialog-footer"> 113 <span slot="footer" class="dialog-footer">
114 <el-button @click="visible = false">取 消</el-button> 114 <el-button @click="visible = false">取 消</el-button>
115 - <el-button type="primary" @click="dataFormSubmit()">确 定</el-button> 115 + <el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading">确 定</el-button>
116 </span> 116 </span>
117 </el-dialog> 117 </el-dialog>
118 </template> 118 </template>
@@ -174,6 +174,7 @@ @@ -174,6 +174,7 @@
174 showarea: false, 174 showarea: false,
175 judgmentClassOption: [], 175 judgmentClassOption: [],
176 areaOptions: [], 176 areaOptions: [],
  177 + btnLoading: false,
177 }; 178 };
178 }, 179 },
179 computed: { 180 computed: {
@@ -242,7 +243,9 @@ @@ -242,7 +243,9 @@
242 ...this.suggestionForm, 243 ...this.suggestionForm,
243 id: this.dataForm.id, 244 id: this.dataForm.id,
244 }; 245 };
  246 + this.btnLoading = true;
245 let res = await disposalSuggestions(obj); 247 let res = await disposalSuggestions(obj);
  248 + if(res.code != 200) return this.btnLoading = false;
246 this.$message({ 249 this.$message({
247 message: res.msg, 250 message: res.msg,
248 type: "success", 251 type: "success",
src/views/baseComapnyInfo/index.vue
@@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
29 </el-form> 29 </el-form>
30 <div class="NCC-common-search-box-right"> 30 <div class="NCC-common-search-box-right">
31 <el-button type="success" icon="el-icon-plus" @click="addOrUpdateHandle()" size="mini" >新增</el-button> 31 <el-button type="success" icon="el-icon-plus" @click="addOrUpdateHandle()" size="mini" >新增</el-button>
32 - <!-- <el-button type="primary" icon="el-icon-download" size="mini" @click="exportData('demo')">导出模板</el-button> 32 + <el-button type="primary" icon="el-icon-download" size="mini" @click="exportData('demo')">导出模板</el-button>
33 <el-upload 33 <el-upload
34 class="uploadXlax" 34 class="uploadXlax"
35 :action="define.APIURl + '/api/Extend/basecomapnyinfo/Actions/ImportByExcel'" 35 :action="define.APIURl + '/api/Extend/basecomapnyinfo/Actions/ImportByExcel'"
@@ -37,13 +37,12 @@ @@ -37,13 +37,12 @@
37 :on-success="toUpload" 37 :on-success="toUpload"
38 :show-file-list="false" 38 :show-file-list="false"
39 name="excelfile" 39 name="excelfile"
40 - accept="image/*"  
41 > 40 >
42 <div class="avatar-box"> 41 <div class="avatar-box">
43 - <el-button type="primary" icon="el-icon-download" size="mini">导入</el-button> 42 + <el-button type="info" icon="el-icon-upload" size="mini">导入</el-button>
44 </div> 43 </div>
45 </el-upload> 44 </el-upload>
46 - <el-button type="primary" icon="el-icon-download" :loading="exportBtnLoading" size="mini" @click="exportData()">导出</el-button> --> 45 + <el-button type="primary" icon="el-icon-download" :loading="exportBtnLoading" size="mini" @click="exportData()">导出</el-button>
47 </div> 46 </div>
48 </el-row> 47 </el-row>
49 <div class="NCC-common-layout-main NCC-flex-main"> 48 <div class="NCC-common-layout-main NCC-flex-main">
@@ -162,41 +161,48 @@ export default { @@ -162,41 +161,48 @@ export default {
162 }); 161 });
163 }, 162 },
164 toUpload(response, file, fileList) { 163 toUpload(response, file, fileList) {
165 - console.log(response, file, fileList); 164 + this.$message({
  165 + showClose: true,
  166 + message: response.msg,
  167 + type: response.code == 200 ? 'success' : 'error',
  168 + close: () => {
  169 + response.code == 200 && this.initData();
  170 + }
  171 + });
166 }, 172 },
167 exportData(type) { 173 exportData(type) {
168 let obj = {}; 174 let obj = {};
169 if(type) { 175 if(type) {
170 obj = { 176 obj = {
171 url: '/Extend/basecomapnyinfo/Actions/GenerateImportTemplate', 177 url: '/Extend/basecomapnyinfo/Actions/GenerateImportTemplate',
  178 + responseType: 'blob',
172 method: "GET", 179 method: "GET",
173 } 180 }
174 } else { 181 } else {
175 - let _query = {  
176 - ...this.query,  
177 - };  
178 - let query = {};  
179 - for (let key in _query) {  
180 - if (Array.isArray(_query[key])) {  
181 - query[key] = _query[key].join();  
182 - } else {  
183 - query[key] = _query[key];  
184 - }  
185 - }  
186 - obj ={  
187 - url: '/Extend/basecomapnyinfo/Actions/ImportByExcel', 182 + obj = {
  183 + url: '/Extend/basecomapnyinfo/Actions/Export',
188 method: "POST", 184 method: "POST",
189 - data: query, 185 + data: this.query,
190 } 186 }
191 }; 187 };
192 request(obj).then((res) => { 188 request(obj).then((res) => {
193 - console.log(res);  
194 - const url = define.APIURl + res.data.url;  
195 - const link = document.createElement("a");  
196 - link.href = url;  
197 - link.download = res.data.name;  
198 - link.click();  
199 - }).catch(() => this.exportBtnLoading = false); 189 + if(type) {
  190 + const blob = new Blob([res], {type: 'application/json'});
  191 + const url = window.URL.createObjectURL(blob);
  192 + let link = document.createElement('a');
  193 + link.style.display = 'none';
  194 + link.href = url;
  195 + link.download = '公司录入模板.xlsx';
  196 + link.click();
  197 + } else {
  198 + if(res.code != 200) return;
  199 + const url = define.APIURl + res.data.url;
  200 + const link = document.createElement("a");
  201 + link.href = url;
  202 + link.download = res.data.name;
  203 + link.click();
  204 + }
  205 + })
200 }, 206 },
201 exportForm(url) { 207 exportForm(url) {
202 const link = document.createElement("a"); 208 const link = document.createElement("a");
src/views/baseInspectionReport/Form.vue
@@ -134,21 +134,21 @@ @@ -134,21 +134,21 @@
134 <el-row v-else> 134 <el-row v-else>
135 <el-col class="form-item"> 135 <el-col class="form-item">
136 <div class="label">问题来源:</div> 136 <div class="label">问题来源:</div>
137 - <div class="text">{{ dataForm.reportSource || '--' }}</div> 137 + <div class="text">{{ sourceOptions.find(v => v.Id == dataForm.reportSource).FullName || '--' }}</div>
138 </el-col> 138 </el-col>
139 <el-col class="form-item"> 139 <el-col class="form-item">
140 <div class="label">应用名称:</div> 140 <div class="label">应用名称:</div>
141 - <div class="text">{{ dataForm.platformName || '--' }}</div> 141 + <div class="text">{{ dataForm.platformNameStr || '--' }}</div>
142 </el-col> 142 </el-col>
143 <el-col class="form-item"> 143 <el-col class="form-item">
144 <div class="label">运营主体:</div> 144 <div class="label">运营主体:</div>
145 - <div class="text">{{ dataForm.company || '--' }}</div> 145 + <div class="text">{{ dataForm.companyStr || '--' }}</div>
146 </el-col> 146 </el-col>
147 <el-col class="form-item"> 147 <el-col class="form-item">
148 <div class="label">应用类型:</div> 148 <div class="label">应用类型:</div>
149 - <div class="text">{{ dataForm.platformType || '--' }}</div> 149 + <div class="text">{{ dataForm.platformTypeStr || '--' }}</div>
150 </el-col> 150 </el-col>
151 - <el-col class="form-item"> 151 + <el-col class="form-item" v-if="dataForm.platformType == '580634746028033285'">
152 <div class="label">归属平台:</div> 152 <div class="label">归属平台:</div>
153 <div class="text">{{ dataForm.selfMediaPlatformType || '--' }}</div> 153 <div class="text">{{ dataForm.selfMediaPlatformType || '--' }}</div>
154 </el-col> 154 </el-col>
@@ -174,7 +174,7 @@ @@ -174,7 +174,7 @@
174 </el-col> 174 </el-col>
175 <el-col class="form-item"> 175 <el-col class="form-item">
176 <div class="label">附件:</div> 176 <div class="label">附件:</div>
177 - <!-- <div class="text">{{ dataForm.questionContent || '--' }}</div> --> 177 + <NCC-UploadFz v-model="dataForm.annex" :fileSize="5" sizeUnit="MB" :limit="9" buttonText="点击上传" disabled/>
178 </el-col> 178 </el-col>
179 </el-row> 179 </el-row>
180 <span slot="footer" class="dialog-footer"> 180 <span slot="footer" class="dialog-footer">
@@ -201,6 +201,9 @@ export default { @@ -201,6 +201,9 @@ export default {
201 dataForm: { 201 dataForm: {
202 id: undefined, 202 id: undefined,
203 reportSource: undefined, 203 reportSource: undefined,
  204 + platformNameStr: undefined,
  205 + platformTypeStr: undefined,
  206 + companyStr: undefined,
204 platformName: '', 207 platformName: '',
205 selfMediaPlatformType: '', 208 selfMediaPlatformType: '',
206 platformType: undefined, 209 platformType: undefined,
@@ -277,6 +280,7 @@ export default { @@ -277,6 +280,7 @@ export default {
277 if(!obj) return; 280 if(!obj) return;
278 this.dataForm.platformName = obj ? obj.id : val; 281 this.dataForm.platformName = obj ? obj.id : val;
279 this.dataForm.company = this.companyOptions.find(v => v.id == obj.companyId || v.companyName == obj.companyId).id; 282 this.dataForm.company = this.companyOptions.find(v => v.id == obj.companyId || v.companyName == obj.companyId).id;
  283 + console.log(this.dataForm.company, 'this.dataForm.company');
280 this.dataForm.platformType = this.platformTypeOptions.find(v => v.Id == obj.systemType || v.FullName == obj.systemType).Id; 284 this.dataForm.platformType = this.platformTypeOptions.find(v => v.Id == obj.systemType || v.FullName == obj.systemType).Id;
281 this.dataForm.selfMediaPlatformType = obj ? obj.platform : ''; 285 this.dataForm.selfMediaPlatformType = obj ? obj.platform : '';
282 }, 286 },
@@ -331,7 +335,6 @@ export default { @@ -331,7 +335,6 @@ export default {
331 this.dataForm.questionType = '其他'; 335 this.dataForm.questionType = '其他';
332 } 336 }
333 this.dataForm.selfMediaPlatformType = res.data.selfMediaPlatformType || '--'; 337 this.dataForm.selfMediaPlatformType = res.data.selfMediaPlatformType || '--';
334 - if (!this.dataForm.annex) this.dataForm.annex = [];  
335 } 338 }
336 }); 339 });
337 }, 340 },
src/views/baseInspectionReport/index.vue
@@ -39,7 +39,6 @@ @@ -39,7 +39,6 @@
39 :on-error="uploadError" 39 :on-error="uploadError"
40 :show-file-list="false" 40 :show-file-list="false"
41 name="excelfile" 41 name="excelfile"
42 - accept="image/*"  
43 > 42 >
44 <div class="avatar-box"> 43 <div class="avatar-box">
45 <el-button type="info" icon="el-icon-upload" size="mini">导入</el-button> 44 <el-button type="info" icon="el-icon-upload" size="mini">导入</el-button>
@@ -89,7 +88,7 @@ @@ -89,7 +88,7 @@
89 import infoMixin from "@/mixins/info"; 88 import infoMixin from "@/mixins/info";
90 import ExportBox from './ExportBox' 89 import ExportBox from './ExportBox'
91 import { getList, previewDataInterface } from '@/api/systemData/dataInterface' 90 import { getList, previewDataInterface } from '@/api/systemData/dataInterface'
92 -import { message } from '@/utils/message'; 91 + import define from '@/utils/define'
93 export default { 92 export default {
94 mixins: [infoMixin], 93 mixins: [infoMixin],
95 components: { NCCForm, ExportBox }, 94 components: { NCCForm, ExportBox },
@@ -196,6 +195,9 @@ import { message } from &#39;@/utils/message&#39;; @@ -196,6 +195,9 @@ import { message } from &#39;@/utils/message&#39;;
196 showClose: true, 195 showClose: true,
197 message: response.msg, 196 message: response.msg,
198 type: response.code == 200 ? 'success' : 'error', 197 type: response.code == 200 ? 'success' : 'error',
  198 + close: () => {
  199 + response.code == 200 && this.initData();
  200 + }
199 }); 201 });
200 }, 202 },
201 uploadError() { 203 uploadError() {
@@ -203,7 +205,6 @@ import { message } from &#39;@/utils/message&#39;; @@ -203,7 +205,6 @@ import { message } from &#39;@/utils/message&#39;;
203 }, 205 },
204 exportData(type) { 206 exportData(type) {
205 let obj = {} 207 let obj = {}
206 - this.listLoading = true;  
207 if(type) { 208 if(type) {
208 obj = { 209 obj = {
209 url: '/Extend/BaseInspectionReport/Actions/GenerateImportTemplate', 210 url: '/Extend/BaseInspectionReport/Actions/GenerateImportTemplate',
@@ -211,23 +212,10 @@ import { message } from &#39;@/utils/message&#39;; @@ -211,23 +212,10 @@ import { message } from &#39;@/utils/message&#39;;
211 responseType: 'blob', 212 responseType: 'blob',
212 } 213 }
213 } else { 214 } else {
214 - let _query = {  
215 - ...this.listQuery,  
216 - ...this.query  
217 - };  
218 - let query = {}  
219 - for (let key in _query) {  
220 - if (Array.isArray(_query[key])) {  
221 - query[key] = _query[key].join()  
222 - } else {  
223 - query[key] = _query[key]  
224 - }  
225 - }  
226 obj = { 215 obj = {
227 url: '/Extend/BaseInspectionReport/Actions/Export', 216 url: '/Extend/BaseInspectionReport/Actions/Export',
228 method: "POST", 217 method: "POST",
229 - data: query,  
230 - responseType: 'blob', 218 + data: this.query,
231 } 219 }
232 } 220 }
233 request(obj).then((res) => { 221 request(obj).then((res) => {
@@ -248,7 +236,6 @@ import { message } from &#39;@/utils/message&#39;; @@ -248,7 +236,6 @@ import { message } from &#39;@/utils/message&#39;;
248 link.click(); 236 link.click();
249 } 237 }
250 }); 238 });
251 - this.listLoading = false;  
252 }, 239 },
253 search() { 240 search() {
254 this.listQuery = { 241 this.listQuery = {
src/views/baseListHazardousSamples/index.vue
@@ -40,7 +40,7 @@ @@ -40,7 +40,7 @@
40 <el-form-item label=""> 40 <el-form-item label="">
41 <el-select 41 <el-select
42 v-model="query.company" 42 v-model="query.company"
43 - placeholder="请选择主体企业" 43 + placeholder="请选择运营主体"
44 clearable 44 clearable
45 > 45 >
46 <el-option 46 <el-option
@@ -54,18 +54,7 @@ @@ -54,18 +54,7 @@
54 </el-col> 54 </el-col>
55 <el-col :span="5"> 55 <el-col :span="5">
56 <el-form-item label=""> 56 <el-form-item label="">
57 - <el-select  
58 - v-model="query.websitePlatform"  
59 - placeholder="请选择网站平台"  
60 - clearable  
61 - >  
62 - <el-option  
63 - v-for="(item, index) in websitePlatformOptions"  
64 - :key="index"  
65 - :label="item.systemName"  
66 - :value="item.id"  
67 - />  
68 - </el-select> 57 + <el-input v-model="query.questionType" clearable placeholder="请输入问题类型" />
69 </el-form-item> 58 </el-form-item>
70 </el-col> 59 </el-col>
71 <el-col :span="3"> 60 <el-col :span="3">
@@ -129,7 +118,7 @@ export default { @@ -129,7 +118,7 @@ export default {
129 content: undefined, 118 content: undefined,
130 harmfulInformationTypes: undefined, // 有害类型 119 harmfulInformationTypes: undefined, // 有害类型
131 company: undefined, 120 company: undefined,
132 - websitePlatform: undefined, 121 + questionType: undefined,
133 }, 122 },
134 list: [], 123 list: [],
135 listLoading: false, 124 listLoading: false,
@@ -157,13 +146,11 @@ export default { @@ -157,13 +146,11 @@ export default {
157 { prop: "lastModifyUserId", label: "修改用户" }, 146 { prop: "lastModifyUserId", label: "修改用户" },
158 { prop: "lastModifyTime", label: "修改时间" }, 147 { prop: "lastModifyTime", label: "修改时间" },
159 ], 148 ],
160 - harmfulInformationTypesOptions: [],  
161 levelOptions: [ 149 levelOptions: [
162 - { fullName: "巡查上报", id: "巡查上报" },  
163 - { fullName: "案件处理", id: "案件处理" }, 150 + { fullName: "核查处置", id: "核查处置" },
  151 + { fullName: "网信执法", id: "网信执法" },
164 ], 152 ],
165 companyOptions: [], 153 companyOptions: [],
166 - websitePlatformOptions: [],  
167 154
168 // 导出 155 // 导出
169 exportBtnLoading: false, 156 exportBtnLoading: false,
@@ -174,25 +161,16 @@ export default { @@ -174,25 +161,16 @@ export default {
174 computed: {}, 161 computed: {},
175 created() { 162 created() {
176 this.initData(); 163 this.initData();
177 - this.getharmfulInformationTypesOptions();  
178 this.getcompanyOptions(); 164 this.getcompanyOptions();
179 - // this.getwebsitePlatformOptions();  
180 }, 165 },
181 methods: { 166 methods: {
182 - getharmfulInformationTypesOptions() {  
183 - getDictionaryDataSelector("577006896326640901").then((res) => {  
184 - this.harmfulInformationTypesOptions = res.data.list;  
185 - });  
186 - },  
187 getcompanyOptions() { 167 getcompanyOptions() {
188 - previewDataInterface("576296400682222853").then((res) => {  
189 - this.companyOptions = res.data;  
190 - });  
191 - },  
192 - getwebsitePlatformOptions() {  
193 - previewDataInterface("576295179435115781").then((res) => {  
194 - this.websitePlatformOptions = res.data;  
195 - }); 168 + request({
  169 + url: `/Extend/basecomapnyinfo/GetNoPagingList`,
  170 + method: "GET",
  171 + }).then(({data}) => {
  172 + this.companyOptions = data;
  173 + })
196 }, 174 },
197 initData() { 175 initData() {
198 this.listLoading = true; 176 this.listLoading = true;
src/views/basePrincipalResponsibility/Form.vue
@@ -148,7 +148,6 @@ @@ -148,7 +148,6 @@
148 }).then(res =>{ 148 }).then(res =>{
149 this.dataForm = res.data; 149 this.dataForm = res.data;
150 this.setTileType(res.data.fileType); 150 this.setTileType(res.data.fileType);
151 - if(!this.dataForm.fileUrl)this.dataForm.fileUrl=[];  
152 this.dialogLoading = false; 151 this.dialogLoading = false;
153 }).catch(() => this.dialogLoading = false) 152 }).catch(() => this.dialogLoading = false)
154 } 153 }
@@ -166,7 +165,6 @@ @@ -166,7 +165,6 @@
166 }, 165 },
167 dataFormSubmit() { 166 dataFormSubmit() {
168 this.$refs['elForm'].validate((valid) => { 167 this.$refs['elForm'].validate((valid) => {
169 - console.log(valid);  
170 if (valid) { 168 if (valid) {
171 this.dataForm.fileType = this.dataForm.fileType == '0' ? this.dataForm.otherFileType : this.dataForm.fileType; 169 this.dataForm.fileType = this.dataForm.fileType == '0' ? this.dataForm.otherFileType : this.dataForm.fileType;
172 this.btnLoading = true; 170 this.btnLoading = true;
@@ -176,6 +174,7 @@ @@ -176,6 +174,7 @@
176 method: 'post', 174 method: 'post',
177 data: this.dataForm, 175 data: this.dataForm,
178 }).then((res) => { 176 }).then((res) => {
  177 + if(res.code != 200) return this.btnLoading = false;
179 this.$message({ 178 this.$message({
180 message: res.msg, 179 message: res.msg,
181 type: 'success', 180 type: 'success',
@@ -190,6 +189,7 @@ @@ -190,6 +189,7 @@
190 method: 'PUT', 189 method: 'PUT',
191 data: this.dataForm 190 data: this.dataForm
192 }).then((res) => { 191 }).then((res) => {
  192 + if(res.code != 200) return this.btnLoading = false;
193 this.$message({ 193 this.$message({
194 message: res.msg, 194 message: res.msg,
195 type: 'success', 195 type: 'success',
src/views/baseSpecialAction/Form.vue
@@ -293,6 +293,7 @@ export default { @@ -293,6 +293,7 @@ export default {
293 ...this.dataForm, 293 ...this.dataForm,
294 state: type 294 state: type
295 } 295 }
  296 + console.log(obj);
296 let url = !this.dataForm.id ? '/Extend/BaseSpecialAction/Release' : '/Extend/BaseSpecialAction/Update'; 297 let url = !this.dataForm.id ? '/Extend/BaseSpecialAction/Release' : '/Extend/BaseSpecialAction/Update';
297 let method = !this.dataForm.id ? 'PUT' : 'POST'; 298 let method = !this.dataForm.id ? 'PUT' : 'POST';
298 this.toPostForm(url, method, obj); 299 this.toPostForm(url, method, obj);
src/views/baseSpecialAction/FormPage.vue
@@ -23,6 +23,18 @@ @@ -23,6 +23,18 @@
23 {{ v }} 23 {{ v }}
24 </el-tag> 24 </el-tag>
25 </div> 25 </div>
  26 + <div class="tag-group">
  27 + <span class="tag-group__title title-tag">附件:</span>
  28 + <NCC-UploadFz
  29 + v-model="dataForm.annex"
  30 + :fileSize="5"
  31 + sizeUnit="MB"
  32 + :limit="9"
  33 + buttonText="点击上传"
  34 + disabled
  35 + >
  36 + </NCC-UploadFz>
  37 + </div>
26 <div class="tag-group" v-if="dataForm.deadline"> 38 <div class="tag-group" v-if="dataForm.deadline">
27 <span class="tag-group__title title-tag">截止时间:</span> 39 <span class="tag-group__title title-tag">截止时间:</span>
28 {{ ncc.dateFormat(dataForm.deadline) || '--' }} 40 {{ ncc.dateFormat(dataForm.deadline) || '--' }}
src/views/baseSystemInfo/DetailForm.vue
@@ -117,7 +117,8 @@ @@ -117,7 +117,8 @@
117 <el-col :span="24"> 117 <el-col :span="24">
118 <div class="form-item"> 118 <div class="form-item">
119 <div class="label w-100">应用图标:</div> 119 <div class="label w-100">应用图标:</div>
120 - {{ dataForm.systemIcon || "--" }} 120 + <img v-if="dataForm.systemIcon" class="avatar" :src="define.comUrl + dataForm.systemIcon">
  121 + <span v-else>无</span>
121 </div> 122 </div>
122 </el-col> 123 </el-col>
123 </div> 124 </div>
@@ -275,6 +276,7 @@ export default { @@ -275,6 +276,7 @@ export default {
275 link: undefined, 276 link: undefined,
276 obtainEvidence: [], 277 obtainEvidence: [],
277 annex: [], 278 annex: [],
  279 + systemIcon: '',
278 }, 280 },
279 systemTypeOptions: [], 281 systemTypeOptions: [],
280 systemClassOptions: [], 282 systemClassOptions: [],
@@ -485,4 +487,12 @@ export default { @@ -485,4 +487,12 @@ export default {
485 // } 487 // }
486 // } 488 // }
487 // } 489 // }
  490 +.avatar {
  491 + width: 100px;
  492 + height: 100px;
  493 + display: block;
  494 + border: 1px dashed #d9d9d9;
  495 + border-radius: 6px;
  496 + margin-left: 10px;
  497 +}
488 </style> 498 </style>
src/views/baseSystemInfo/index.vue
@@ -50,7 +50,7 @@ @@ -50,7 +50,7 @@
50 </el-select> 50 </el-select>
51 </el-form-item> 51 </el-form-item>
52 </el-col> 52 </el-col>
53 - <el-col :span="4"> 53 + <el-col :span="3">
54 <el-form-item label=""> 54 <el-form-item label="">
55 <el-input 55 <el-input
56 v-model="query.principalName" 56 v-model="query.principalName"
@@ -58,7 +58,7 @@ @@ -58,7 +58,7 @@
58 /> 58 />
59 </el-form-item> 59 </el-form-item>
60 </el-col> 60 </el-col>
61 - <el-col :span="4"> 61 + <el-col :span="3">
62 <el-form-item label=""> 62 <el-form-item label="">
63 <el-input 63 <el-input
64 v-model="query.principalPhone" 64 v-model="query.principalPhone"
@@ -79,7 +79,18 @@ @@ -79,7 +79,18 @@
79 </el-form> 79 </el-form>
80 <div class="NCC-common-search-box-right"> 80 <div class="NCC-common-search-box-right">
81 <el-button type="primary" icon="el-icon-download" size="mini" @click="exportData('demo')">导出模板</el-button> 81 <el-button type="primary" icon="el-icon-download" size="mini" @click="exportData('demo')">导出模板</el-button>
82 - <!-- <el-button type="success" icon="el-icon-upload2" size="mini">导入</el-button> --> 82 + <el-upload
  83 + class="uploadXlax"
  84 + :action="define.APIURl + '/api/Extend/basesysteminfo/Actions/ImportByExcel'"
  85 + :headers="uploadHeaders"
  86 + :on-success="uploadSuccess"
  87 + :show-file-list="false"
  88 + name="excelfile"
  89 + >
  90 + <div class="avatar-box">
  91 + <el-button type="info" icon="el-icon-upload" size="mini">导入</el-button>
  92 + </div>
  93 + </el-upload>
83 <el-button type="primary" icon="el-icon-download" size="mini" @click="exportData()">导出</el-button> 94 <el-button type="primary" icon="el-icon-download" size="mini" @click="exportData()">导出</el-button>
84 </div> 95 </div>
85 </el-row> 96 </el-row>
@@ -216,6 +227,7 @@ export default { @@ -216,6 +227,7 @@ export default {
216 data() { 227 data() {
217 return { 228 return {
218 loading: false, 229 loading: false,
  230 + uploadHeaders: { Authorization: this.$store.getters.token },
219 query: { 231 query: {
220 keyword: "", 232 keyword: "",
221 systemType: "", 233 systemType: "",
@@ -294,6 +306,16 @@ export default { @@ -294,6 +306,16 @@ export default {
294 }, 306 },
295 }, 307 },
296 methods: { 308 methods: {
  309 + uploadSuccess(response, file, fileList) {
  310 + this.$message({
  311 + showClose: true,
  312 + message: response.msg,
  313 + type: response.code == 200 ? 'success' : 'error',
  314 + close: () => {
  315 + response.code == 200 && this.initData();
  316 + }
  317 + });
  318 + },
297 handleSystemTypeChange(val) { 319 handleSystemTypeChange(val) {
298 this.query.systemClass = ""; 320 this.query.systemClass = "";
299 this.initSystemClassList(val); 321 this.initSystemClassList(val);
@@ -398,6 +420,7 @@ export default { @@ -398,6 +420,7 @@ export default {
398 obj = { 420 obj = {
399 url: '/Extend/basesysteminfo/Actions/GenerateImportTemplate', 421 url: '/Extend/basesysteminfo/Actions/GenerateImportTemplate',
400 method: "GET", 422 method: "GET",
  423 + responseType: 'blob',
401 } 424 }
402 } else { 425 } else {
403 obj ={ 426 obj ={
@@ -466,4 +489,8 @@ export default { @@ -466,4 +489,8 @@ export default {
466 overflow-y: scroll; 489 overflow-y: scroll;
467 } 490 }
468 } 491 }
  492 +.uploadXlax {
  493 + display: inline-block;
  494 + margin: 0 8px;
  495 +}
469 </style> 496 </style>