Commit 94f06e38321658505d3a83057063082e2f837e87

Authored by monkeyhouyi
1 parent a2d1a53f

优化

src/views/DisposalSuggestions/index.vue
... ... @@ -46,7 +46,7 @@
46 46 </el-table-column>
47 47 <el-table-column show-overflow-tooltip prop="link" label="有害链接" align="left" />
48 48 <el-table-column show-overflow-tooltip prop="questionClass" label="关键词" align="left" />
49   - <el-table-column show-overflow-tooltip prop="" label="录入时间" align="left" />
  49 + <el-table-column show-overflow-tooltip prop="creatorTime" label="录入时间" align="left" :formatter="ncc.tableDateFormat"/>
50 50 <!-- <el-table-column show-overflow-tooltip prop="disposalSuggestions" label="处置建议" align="left" />
51 51 <el-table-column show-overflow-tooltip prop="id" label="主键" align="left" />
52 52 <el-table-column show-overflow-tooltip prop="department" label="部门" align="left" />
... ...
src/views/baseCaseHandling/Form.vue
... ... @@ -201,7 +201,10 @@ export default {
201 201 },
202 202 rules: {
203 203 systemName: [
204   - { required: true, message: "请选择系统名称", trigger: "change" }
  204 + { required: true, message: "请选择应用名称", trigger: "bulr" }
  205 + ],
  206 + registeredEntity: [
  207 + { required: true, message: "请选择运营主体", trigger: "bulr" }
205 208 ],
206 209 districtCounty: [
207 210 { required: true, message: "请选择所属区域", trigger: "change" }
... ...
src/views/baseInspectionReport/Form.vue
... ... @@ -24,8 +24,8 @@
24 24 </el-form-item>
25 25 </el-col>
26 26 <el-col :span="23">
27   - <el-form-item label="问题来源" prop="source">
28   - <el-radio-group v-model="dataForm.source">
  27 + <el-form-item label="问题来源" prop="reportSource">
  28 + <el-radio-group v-model="dataForm.reportSource">
29 29 <el-radio v-for="(item, index) in sourceOptions" :key="index" :label="item.Id">{{ item.FullName }}</el-radio>
30 30 </el-radio-group>
31 31 </el-form-item>
... ... @@ -49,6 +49,26 @@
49 49 </el-form-item>
50 50 </el-col>
51 51 <el-col :span="23">
  52 + <el-form-item label="运营主体" prop="company">
  53 + <el-select
  54 + v-model="dataForm.company"
  55 + placeholder="请选择运营主体"
  56 + clearable
  57 + filterable
  58 + style="width: 100%"
  59 + :disabled='isDisabledTypeByName || !!this.dataForm.id'
  60 + >
  61 + <el-option
  62 + v-for="item in companyOptions"
  63 + :key="item.id"
  64 + :label="item.companyName"
  65 + :value="item.id"
  66 + >
  67 + </el-option>
  68 + </el-select>
  69 + </el-form-item>
  70 + </el-col>
  71 + <el-col :span="23">
52 72 <el-form-item label="应用类型" prop="platformType">
53 73 <el-radio-group v-model="dataForm.platformType" :disabled='isDisabledTypeByName || !!this.dataForm.id'>
54 74 <el-radio v-for="(item, index) in platformTypeOptions" :key="index" :label="item.Id">{{ item.FullName }}</el-radio>
... ... @@ -105,8 +125,8 @@
105 125 </el-form-item>
106 126 </el-col>
107 127 <el-col :span="23">
108   - <el-form-item label="附件" prop="obtainEvidence">
109   - <NCC-UploadFz v-model="dataForm.obtainEvidence" :fileSize="5" sizeUnit="MB" :limit="9" buttonText="点击上传" />
  128 + <el-form-item label="附件" prop="annex">
  129 + <NCC-UploadFz v-model="dataForm.annex" :fileSize="5" sizeUnit="MB" :limit="9" buttonText="点击上传" />
110 130 </el-form-item>
111 131 </el-col>
112 132 </el-form>
... ... @@ -114,13 +134,17 @@
114 134 <el-row v-else>
115 135 <el-col class="form-item">
116 136 <div class="label">问题来源:</div>
117   - <div class="text">{{ dataForm.source || '--' }}</div>
  137 + <div class="text">{{ dataForm.reportSource || '--' }}</div>
118 138 </el-col>
119 139 <el-col class="form-item">
120 140 <div class="label">应用名称:</div>
121 141 <div class="text">{{ dataForm.platformName || '--' }}</div>
122 142 </el-col>
123 143 <el-col class="form-item">
  144 + <div class="label">运营主体:</div>
  145 + <div class="text">{{ dataForm.company || '--' }}</div>
  146 + </el-col>
  147 + <el-col class="form-item">
124 148 <div class="label">应用类型:</div>
125 149 <div class="text">{{ dataForm.platformType || '--' }}</div>
126 150 </el-col>
... ... @@ -155,7 +179,7 @@
155 179 </el-row>
156 180 <span slot="footer" class="dialog-footer">
157 181 <el-button @click="visible = false">取 消</el-button>
158   - <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button>
  182 + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail" :loading="btnLoading">确 定</el-button>
159 183 </span>
160 184 </el-dialog>
161 185 </template>
... ... @@ -176,7 +200,7 @@ export default {
176 200 isDetail: false,
177 201 dataForm: {
178 202 id: undefined,
179   - source: undefined,
  203 + reportSource: undefined,
180 204 platformName: '',
181 205 selfMediaPlatformType: '',
182 206 platformType: undefined,
... ... @@ -186,17 +210,20 @@ export default {
186 210 link: undefined,
187 211 accurateDescription: undefined,
188 212 incorrectDescription: undefined,
189   - obtainEvidence: [],
190 213 annex: [],
191 214 otherQuestionType: undefined,
192 215 selfMediaPlatformTypeOther: undefined,
  216 + company: undefined,
193 217 },
194 218 rules: {
195 219 platformName: [
196   - { required: true, message: "请选择系统名称", trigger: "blur" },
  220 + { required: true, message: "请选择应用名称", trigger: "blur" },
  221 + ],
  222 + company: [
  223 + { required: true, message: "请选择运营主体", trigger: "blur" },
197 224 ],
198 225 platformType: [
199   - { required: true, message: "请选择系统类型", trigger: "blur" },
  226 + { required: true, message: "请选择应用类型", trigger: "blur" },
200 227 ],
201 228 questionType: [
202 229 { required: true, message: "请选择问题类型", trigger: "blur" },
... ... @@ -210,6 +237,8 @@ export default {
210 237 questionTypeOptions: [],
211 238 nameOptions: [],
212 239 mediaPlatList: MediaPlatList,
  240 + companyOptions: [],
  241 + btnLoading: false,
213 242 };
214 243 },
215 244 computed: {
... ... @@ -221,6 +250,7 @@ export default {
221 250 },
222 251 watch: {},
223 252 created() {
  253 + this.initCompanyList();
224 254 this.loadList();
225 255 this.getSourceOptions();
226 256 this.getplatformTypeOptions();
... ... @@ -228,6 +258,14 @@ export default {
228 258 },
229 259 mounted() {},
230 260 methods: {
  261 + async initCompanyList() {
  262 + request({
  263 + url: `/Extend/basecomapnyinfo/GetNoPagingList`,
  264 + method: "GET",
  265 + }).then(({data}) => {
  266 + this.companyOptions = data;
  267 + })
  268 + },
231 269 selectBlur(e) {
232 270 let value = e.target.value;
233 271 if(!value) return;
... ... @@ -238,6 +276,7 @@ export default {
238 276 let obj = this.nameOptions.find(v => type == 'blur' ? val == v.fullName : val == v.id);
239 277 if(!obj) return;
240 278 this.dataForm.platformName = obj ? obj.id : val;
  279 + this.dataForm.company = this.companyOptions.find(v => v.id == obj.companyId || v.companyName == obj.companyId).id;
241 280 this.dataForm.platformType = this.platformTypeOptions.find(v => v.Id == obj.systemType || v.FullName == obj.systemType).Id;
242 281 this.dataForm.selfMediaPlatformType = obj ? obj.platform : '';
243 282 },
... ... @@ -292,7 +331,6 @@ export default {
292 331 this.dataForm.questionType = '其他';
293 332 }
294 333 this.dataForm.selfMediaPlatformType = res.data.selfMediaPlatformType || '--';
295   - if (!this.dataForm.obtainEvidence) this.dataForm.obtainEvidence = [];
296 334 if (!this.dataForm.annex) this.dataForm.annex = [];
297 335 }
298 336 });
... ... @@ -305,7 +343,9 @@ export default {
305 343 questionType: this.dataForm.questionType == '其他' ? this.dataForm.otherQuestionType : this.dataForm.questionType,
306 344 selfMediaPlatformType: this.dataForm.selfMediaPlatformType == '其他' ? this.dataForm.selfMediaPlatformTypeOther : this.dataForm.questionType,
307 345 }
  346 + this.btnLoading = true;
308 347 let res = !this.dataForm.id ? await addForm(obj) : await updataForm(obj);
  348 + if (res.code != 200) return this.btnLoading = false;
309 349 this.$message({
310 350 message: res.msg,
311 351 type: "success",
... ...
src/views/baseInspectionReport/index.vue
... ... @@ -58,7 +58,7 @@
58 58 <el-table-column show-overflow-tooltip label="问题类型" prop="questionType" align="left" />
59 59 <!-- <el-table-column show-overflow-tooltip prop="link" label="有害链接" align="left" /> -->
60 60 <el-table-column show-overflow-tooltip prop="questionClass" label="关键词" align="left" />
61   - <el-table-column show-overflow-tooltip prop="" label="录入时间" align="left" />
  61 + <el-table-column show-overflow-tooltip prop="creatorTime" label="录入时间" align="left" :formatter="ncc.tableDateFormat"/>
62 62 <!-- <el-table-column show-overflow-tooltip prop="department" label="部门" align="left" /> -->
63 63 <!-- <el-table-column show-overflow-tooltip label="问题分类" prop="questionClass" align="left">
64 64 <template slot-scope="scope">{{ scope.row.questionClass | dynamicText(questionClassOptions) }}</template>
... ... @@ -203,13 +203,14 @@ import { message } from &#39;@/utils/message&#39;;
203 203 },
204 204 exportData(type) {
205 205 let obj = {}
  206 + this.listLoading = true;
206 207 if(type) {
207 208 obj = {
208 209 url: '/Extend/BaseInspectionReport/Actions/GenerateImportTemplate',
209 210 method: "GET",
  211 + responseType: 'blob',
210 212 }
211 213 } else {
212   - this.listLoading = true;
213 214 let _query = {
214 215 ...this.listQuery,
215 216 ...this.query
... ... @@ -226,15 +227,26 @@ import { message } from &#39;@/utils/message&#39;;
226 227 url: '/Extend/BaseInspectionReport/Actions/Export',
227 228 method: "POST",
228 229 data: query,
  230 + responseType: 'blob',
229 231 }
230 232 }
231 233 request(obj).then((res) => {
232   - console.log(res);
233   - const url = define.APIURl + res.data.url;
234   - const link = document.createElement("a");
235   - link.href = url;
236   - link.download = res.data.name;
237   - link.click();
  234 + if(type) {
  235 + const blob = new Blob([res], {type: 'application/json'});
  236 + const url = window.URL.createObjectURL(blob);
  237 + let link = document.createElement('a');
  238 + link.style.display = 'none';
  239 + link.href = url;
  240 + link.download = '线索录入模板.xlsx';
  241 + link.click();
  242 + } else {
  243 + if(res.code != 200) return;
  244 + const url = define.APIURl + res.data.url;
  245 + const link = document.createElement("a");
  246 + link.href = url;
  247 + link.download = res.data ? res.data.name : '线索录入模板.xlsx';
  248 + link.click();
  249 + }
238 250 });
239 251 this.listLoading = false;
240 252 },
... ...
src/views/baseSystemInfo/index.vue
... ... @@ -78,8 +78,9 @@
78 78 </el-col>
79 79 </el-form>
80 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 82 <!-- <el-button type="success" icon="el-icon-upload2" size="mini">导入</el-button> -->
82   - <el-button type="primary" icon="el-icon-download" size="mini" @click="toExport">导出</el-button>
  83 + <el-button type="primary" icon="el-icon-download" size="mini" @click="exportData()">导出</el-button>
83 84 </div>
84 85 </el-row>
85 86 <div class="NCC-common-layout-main NCC-flex-main">
... ... @@ -206,6 +207,7 @@ import InspectionForm from &quot;./InspectForm.vue&quot;;
206 207 import DetailForm from './DetailForm.vue';
207 208 import ChangeRecord from "./ChangeRecord.vue";
208 209 import ExportBox from "./ExportBox.vue";
  210 +import define from '@/utils/define'
209 211  
210 212 export default {
211 213 name: "SystemInfo",
... ... @@ -390,29 +392,38 @@ export default {
390 392 this.initList();
391 393 });
392 394 },
393   - toExport() {
394   - let _query = {
395   - ...this.query,
  395 + exportData(type) {
  396 + let obj = {};
  397 + if(type) {
  398 + obj = {
  399 + url: '/Extend/basesysteminfo/Actions/GenerateImportTemplate',
  400 + method: "GET",
  401 + }
  402 + } else {
  403 + obj ={
  404 + url: '/Extend/basesysteminfo/Actions/Export',
  405 + method: "POST",
  406 + data: this.query,
  407 + }
396 408 };
397   - let query = {};
398   - for (let key in _query) {
399   - if (Array.isArray(_query[key])) {
400   - query[key] = _query[key].join();
  409 + request(obj).then((res) => {
  410 + if(type) {
  411 + const blob = new Blob([res], {type: 'application/json'});
  412 + const url = window.URL.createObjectURL(blob);
  413 + let link = document.createElement('a');
  414 + link.style.display = 'none';
  415 + link.href = url;
  416 + link.download = '应用信息模板.xlsx';
  417 + link.click();
401 418 } else {
402   - query[key] = _query[key];
  419 + if(res.code != 200) return;
  420 + const url = define.APIURl + res.data.url;
  421 + const link = document.createElement("a");
  422 + link.href = url;
  423 + link.download = res.data.name;
  424 + link.click();
403 425 }
404   - }
405   - request({
406   - url: `/Extend/basesysteminfo/Actions/Export`,
407   - method: "POST",
408   - data: query,
409   - }).then((res) => {
410   - const url = process.env.VUE_APP_BASE_API + res.data.url;
411   - const link = document.createElement("a");
412   - link.href = url;
413   - link.download = res.data.name;
414   - link.click();
415   - });
  426 + })
416 427 },
417 428 download(data) {
418 429 let query = { ...data, ...this.listQuery, ...this.query };
... ...