Commit 218a983783c0d486250685ecdff2073d3a4a10c1

Authored by monkeyhouyi
1 parent b51a1859

运营主体优化

src/components/CompanySelect/index.vue 0 → 100644
  1 +<template>
  2 + <!-- 运营主体选择 -->
  3 + <el-select
  4 + v-model="inputValue"
  5 + :placeholder="placeholder"
  6 + clearable
  7 + style="width: 100%"
  8 + @change="inputValueChange"
  9 + filterable
  10 + remote
  11 + :filter-method="filterFunction"
  12 + @visible-change="inputVisibleChange"
  13 + :loading="listLoading"
  14 + v-selectLoadMore="initMoreList"
  15 + >
  16 + <el-option
  17 + v-for="item in options"
  18 + :key="item.id"
  19 + :label="item.label"
  20 + :value="item.id"
  21 + >
  22 + </el-option>
  23 + </el-select>
  24 +</template>
  25 +
  26 + <script>
  27 + import request from "@/utils/request";
  28 + import { getCompanyInfoList } from "@/api/baseData/company";
  29 + export default {
  30 + name: "el-company-select",
  31 + computed: {},
  32 + props: {
  33 + value: {
  34 + request: true,
  35 + type: String,
  36 + default: '',
  37 + },
  38 + isInput: { type: Boolean, default: false },
  39 + placeholder: { type: String, default: '请选择' },
  40 + },
  41 +
  42 + data() {
  43 + return {
  44 + inputValue: '',
  45 + options: [],
  46 + currentPage: 1,
  47 + total: 0,
  48 + listLoading: false,
  49 + searchVal: '', // 输入查询内容
  50 + searchVisibla: false, // 是否需要打开下拉时重新请求
  51 + searchBlur: false, // 是否输入
  52 + valid: true, // 防抖使用
  53 + timer: null, // 节流
  54 + }
  55 + },
  56 + created() {
  57 + this.loadList(true);
  58 + },
  59 + watch:{
  60 + value(val) {
  61 + this.initInputValue()
  62 + },
  63 + },
  64 + methods: {
  65 + async initInputValue() {
  66 + this.searchVisibla = true;
  67 + if(!this.searchBlur) {
  68 + this.listLoading = true;
  69 + await this.loadList(true, this.value);
  70 + };
  71 + this.inputValue = this.value;
  72 + this.searchBlur = false;
  73 + },
  74 + loadList(type, id) {
  75 + // type: true-替换 false-添加
  76 + if(!type && this.total < this.options.length) return;
  77 + let obj = {
  78 + currentPage: this.currentPage,
  79 + pageSize: 20,
  80 + sort: "desc",
  81 + sidx: "",
  82 + companyId: id,
  83 + companyName: this.searchVal,
  84 + }
  85 + getCompanyInfoList(obj).then((res) => {
  86 + let list = res.data.list.map(v => {
  87 + return { label: v.companyName, id: v.id}
  88 + })
  89 + let allList = type ? list : [...this.options, ...list];
  90 + this.options = _.uniqBy(allList, 'id');
  91 + this.total = res.data.pagination.total;
  92 + this.listLoading = false;
  93 + });
  94 + },
  95 + inputValueChange(val) {
  96 + this.inputValue = val;
  97 + this.$emit('input', val, 'change');
  98 + this.$emit('change', val, 'change');
  99 + },
  100 + inputValueBlur(val) {
  101 + this.searchBlur = true;
  102 + this.inputValue = val;
  103 + this.$emit('input', val, 'blur');
  104 + this.$emit('change', val, 'blur');
  105 + },
  106 + filterFunction(val) {
  107 + clearTimeout(this.timer);
  108 + this.timer = setTimeout(() => {
  109 + !this.isInput && this.inputValueBlur(val)
  110 + this.currentPage = 1;
  111 + this.searchVal = val;
  112 + this.loadList(true);
  113 + }, 300);
  114 + },
  115 + async inputVisibleChange(val) {
  116 + if(!val) return;
  117 + console.log(this.searchVal);
  118 + if(this.searchVal) {
  119 + this.searchVal = '';
  120 + this.currentPage = 1;
  121 + await this.loadList(true);
  122 + }
  123 + if(this.searchVisibla) {
  124 + await this.loadList(false);
  125 + this.searchVisibla = false;
  126 + }
  127 + },
  128 + initMoreList() {
  129 + if (this.valid) {
  130 + this.valid = false; // 关闭阀门
  131 + // 如果阀门已经打开,就继续往下
  132 + setTimeout(() => {
  133 + ++this.currentPage;
  134 + this.loadList(false);
  135 + this.valid = true; // 执行完成后打开阀门
  136 + }, 300);
  137 + }
  138 + }
  139 + },
  140 + }
  141 + </script>
0 \ No newline at end of file 142 \ No newline at end of file
src/components/InfoForm/index.vue
@@ -28,7 +28,8 @@ @@ -28,7 +28,8 @@
28 <el-col :span="24"> 28 <el-col :span="24">
29 <el-col :span="12"> 29 <el-col :span="12">
30 <el-form-item label="运营主体/个人" prop="companyId"> 30 <el-form-item label="运营主体/个人" prop="companyId">
31 - <el-select 31 + <CompanySelect v-model="infoForm.companyId" :isInput="true" @change="companyChange"></CompanySelect>
  32 + <!-- <el-select
32 v-model="infoForm.companyId" 33 v-model="infoForm.companyId"
33 placeholder="请选择运营主体/个人" 34 placeholder="请选择运营主体/个人"
34 clearable 35 clearable
@@ -46,11 +47,11 @@ @@ -46,11 +47,11 @@
46 :value="item.id" 47 :value="item.id"
47 > 48 >
48 </el-option> 49 </el-option>
49 - </el-select> 50 + </el-select> -->
50 </el-form-item> 51 </el-form-item>
51 </el-col> 52 </el-col>
52 <el-col :span="4"> 53 <el-col :span="4">
53 - <companyForm @refresh="initCompanyList"/> 54 + <companyForm/>
54 </el-col> 55 </el-col>
55 </el-col> 56 </el-col>
56 <el-col :span="24" v-if="isShowCompanyInfo"> 57 <el-col :span="24" v-if="isShowCompanyInfo">
@@ -448,24 +449,24 @@ export default { @@ -448,24 +449,24 @@ export default {
448 mounted() {}, 449 mounted() {},
449 created() {}, 450 created() {},
450 methods: { 451 methods: {
451 - initCompanyList() {  
452 - if(this.company_currentPage > this.companyOptions.length) return  
453 - this.company_currentPage += 10;  
454 - },  
455 - filterMethod(val) {  
456 - this.name_loading = true;  
457 - request({  
458 - url: `/Extend/basecomapnyinfo/GetNoPagingList`,  
459 - method: "GET",  
460 - params: {  
461 - companyName: val,  
462 - }  
463 - }).then(({data}) => {  
464 - this.companyOptions = data;  
465 - this.name_loading = false; 452 + // initCompanyList() {
  453 + // if(this.company_currentPage > this.companyOptions.length) return
  454 + // this.company_currentPage += 10;
  455 + // },
  456 + // filterMethod(val) {
  457 + // this.name_loading = true;
  458 + // request({
  459 + // url: `/Extend/basecomapnyinfo/GetNoPagingList`,
  460 + // method: "GET",
  461 + // params: {
  462 + // companyName: val,
  463 + // }
  464 + // }).then(({data}) => {
  465 + // this.companyOptions = data;
  466 + // this.name_loading = false;
466 467
467 - })  
468 - }, 468 + // })
  469 + // },
469 handleAvatarSuccess(response, file, fileList) { 470 handleAvatarSuccess(response, file, fileList) {
470 if(response.code != 200) return; 471 if(response.code != 200) return;
471 this.infoForm.systemIconModel = { 472 this.infoForm.systemIconModel = {
@@ -481,16 +482,16 @@ export default { @@ -481,16 +482,16 @@ export default {
481 }); 482 });
482 }, 483 },
483 // 请求公司列表 484 // 请求公司列表
484 - async initCompanyList() {  
485 - this.name_loading = true;  
486 - request({  
487 - url: `/Extend/basecomapnyinfo/GetNoPagingList`,  
488 - method: "GET",  
489 - }).then(({data}) => {  
490 - this.companyOptions = data;  
491 - this.name_loading = false;  
492 - })  
493 - }, 485 + // async initCompanyList() {
  486 + // this.name_loading = true;
  487 + // request({
  488 + // url: `/Extend/basecomapnyinfo/GetNoPagingList`,
  489 + // method: "GET",
  490 + // }).then(({data}) => {
  491 + // this.companyOptions = data;
  492 + // this.name_loading = false;
  493 + // })
  494 + // },
494 async companyChange(val) { 495 async companyChange(val) {
495 // 公司信息 496 // 公司信息
496 let { data } = await getCompanyInfoById(val); 497 let { data } = await getCompanyInfoById(val);
@@ -543,7 +544,7 @@ export default { @@ -543,7 +544,7 @@ export default {
543 this.isFilings = false; 544 this.isFilings = false;
544 this.reset(); 545 this.reset();
545 this.infoForm_loading = true; 546 this.infoForm_loading = true;
546 - await this.initCompanyList(); 547 + // await this.initCompanyList();
547 await this.initSystemTypeList(); 548 await this.initSystemTypeList();
548 // await this.initCommunicationOutOptions(); 549 // await this.initCommunicationOutOptions();
549 await this.initAreaTypeList(); 550 await this.initAreaTypeList();
src/components/index.js
@@ -35,6 +35,7 @@ import RelationFormAttr from &#39;@/components/Generator/components/RelationFormAttr @@ -35,6 +35,7 @@ import RelationFormAttr from &#39;@/components/Generator/components/RelationFormAttr
35 import RelationFlow from '@/components/Generator/components/RelationFlow' 35 import RelationFlow from '@/components/Generator/components/RelationFlow'
36 import RelationFlowAttr from '@/components/Generator/components/RelationFlowAttr' 36 import RelationFlowAttr from '@/components/Generator/components/RelationFlowAttr'
37 import Calculate from '@/components/Generator/components/Calculate' 37 import Calculate from '@/components/Generator/components/Calculate'
  38 +import CompanySelect from '@/components/CompanySelect'
38 39
39 export default { 40 export default {
40 install(Vue, options) { 41 install(Vue, options) {
@@ -74,6 +75,6 @@ export default { @@ -74,6 +75,6 @@ export default {
74 Vue.component('Screenfull', Screenfull) 75 Vue.component('Screenfull', Screenfull)
75 Vue.component('ColumnSettings', ColumnSettings) 76 Vue.component('ColumnSettings', ColumnSettings)
76 Vue.component('FormDialog', FormDialog) 77 Vue.component('FormDialog', FormDialog)
77 - 78 + Vue.component('CompanySelect', CompanySelect)
78 } 79 }
79 } 80 }
80 \ No newline at end of file 81 \ No newline at end of file
src/views/baseCaseHandling/Form.vue
@@ -36,7 +36,8 @@ @@ -36,7 +36,8 @@
36 </el-col> --> 36 </el-col> -->
37 <el-col :span="24"> 37 <el-col :span="24">
38 <el-form-item label="运营主体/个人" prop="registeredEntity"> 38 <el-form-item label="运营主体/个人" prop="registeredEntity">
39 - <el-select 39 + <CompanySelect v-model="dataForm.registeredEntity" @change="(val, type) => companyChange(val, type)"></CompanySelect>
  40 + <!-- <el-select
40 ref="companySelect" 41 ref="companySelect"
41 v-model="dataForm.registeredEntity" 42 v-model="dataForm.registeredEntity"
42 placeholder="请选择运营主体/个人" 43 placeholder="请选择运营主体/个人"
@@ -59,7 +60,7 @@ @@ -59,7 +60,7 @@
59 :value="item.id" 60 :value="item.id"
60 > 61 >
61 </el-option> 62 </el-option>
62 - </el-select> 63 + </el-select> -->
63 </el-form-item> 64 </el-form-item>
64 </el-col> 65 </el-col>
65 <el-col :span="24"> 66 <el-col :span="24">
@@ -454,7 +455,7 @@ export default { @@ -454,7 +455,7 @@ export default {
454 this.getplatformTypeOptions(); 455 this.getplatformTypeOptions();
455 this.initSystemTypeList(); 456 this.initSystemTypeList();
456 this.initAreaTypeList(); 457 this.initAreaTypeList();
457 - this.initCompanyList(); 458 + // this.initCompanyList();
458 }, 459 },
459 mounted() {}, 460 mounted() {},
460 methods: { 461 methods: {
@@ -464,31 +465,31 @@ export default { @@ -464,31 +465,31 @@ export default {
464 this.platformTypeOptions = list; 465 this.platformTypeOptions = list;
465 }, 466 },
466 // 请求公司列表 467 // 请求公司列表
467 - async initCompanyList() {  
468 - request({  
469 - url: `/Extend/basecomapnyinfo/GetNoPagingList`,  
470 - method: "GET",  
471 - }).then(({data}) => {  
472 - this.companyOptions = data;  
473 - })  
474 - },  
475 - moreCompanyList() {  
476 - if(this.company_currentPage > this.companyOptions.length) return;  
477 - this.company_currentPage += 10;  
478 - },  
479 - async filterMethod(val) {  
480 - this.company_currentPage = 20;  
481 - this.name_loading = true  
482 - let companyRes = await request({  
483 - url: `/Extend/basecomapnyinfo/GetNoPagingList`,  
484 - method: "GET",  
485 - params: {  
486 - companyName: val  
487 - }  
488 - });  
489 - this.companyOptions = companyRes.data;  
490 - this.name_loading = false;  
491 - }, 468 + // async initCompanyList() {
  469 + // request({
  470 + // url: `/Extend/basecomapnyinfo/GetNoPagingList`,
  471 + // method: "GET",
  472 + // }).then(({data}) => {
  473 + // this.companyOptions = data;
  474 + // })
  475 + // },
  476 + // moreCompanyList() {
  477 + // if(this.company_currentPage > this.companyOptions.length) return;
  478 + // this.company_currentPage += 10;
  479 + // },
  480 + // async filterMethod(val) {
  481 + // this.company_currentPage = 20;
  482 + // this.name_loading = true
  483 + // let companyRes = await request({
  484 + // url: `/Extend/basecomapnyinfo/GetNoPagingList`,
  485 + // method: "GET",
  486 + // params: {
  487 + // companyName: val
  488 + // }
  489 + // });
  490 + // this.companyOptions = companyRes.data;
  491 + // this.name_loading = false;
  492 + // },
492 // 获取系统列表 493 // 获取系统列表
493 getSystemSelect(companyId) { 494 getSystemSelect(companyId) {
494 this.system_loading = true; 495 this.system_loading = true;
@@ -549,24 +550,38 @@ export default { @@ -549,24 +550,38 @@ export default {
549 let input = this.$refs.select.$children[0].$refs.input; 550 let input = this.$refs.select.$children[0].$refs.input;
550 input.blur(); 551 input.blur();
551 }, 552 },
552 - companyChange(val, type) {  
553 - let obj = this.companyOptions.find(v => val == v.id);  
554 - obj ? this.getSystemSelect(val) : (this.systemOption == []);  
555 - this.dataForm.systemName = '';  
556 - this.dataForm.category = '';  
557 - },  
558 - // 运营主体改变  
559 - selectCompanyBlur(e) {  
560 - let value = e.target.value;  
561 - if(!value) return;  
562 - this.dataForm.registeredEntity = e.target.value;  
563 - this.companyChange(value, 'blur');  
564 - },  
565 - visibleNameCompanyChange(val) {  
566 - if (val) return  
567 - let input = this.$refs.companySelect.$children[0].$refs.input;  
568 - input.blur(); 553 + async companyChange(val, type) {
  554 + switch (type) {
  555 + case 'change':
  556 + this.getSystemSelect(val)
  557 + break;
  558 + case 'blur':
  559 + this.systemOption == [];
  560 + this.dataForm.systemName = '';
  561 + this.dataForm.category = '';
  562 + break;
  563 + default:
  564 + break;
  565 + }
569 }, 566 },
  567 + // companyChange(val, type) {
  568 + // let obj = this.companyOptions.find(v => val == v.id);
  569 + // obj ? this.getSystemSelect(val) : (this.systemOption == []);
  570 + // this.dataForm.systemName = '';
  571 + // this.dataForm.category = '';
  572 + // },
  573 + // // 运营主体改变
  574 + // selectCompanyBlur(e) {
  575 + // let value = e.target.value;
  576 + // if(!value) return;
  577 + // this.dataForm.registeredEntity = e.target.value;
  578 + // this.companyChange(value, 'blur');
  579 + // },
  580 + // visibleNameCompanyChange(val) {
  581 + // if (val) return
  582 + // let input = this.$refs.companySelect.$children[0].$refs.input;
  583 + // input.blur();
  584 + // },
570 goBack() { 585 goBack() {
571 this.$emit("refresh"); 586 this.$emit("refresh");
572 }, 587 },
@@ -602,6 +617,7 @@ export default { @@ -602,6 +617,7 @@ export default {
602 !res.data.closingReportFileModel && (res.data.closingReportFileModel = []); 617 !res.data.closingReportFileModel && (res.data.closingReportFileModel = []);
603 this.isEmpty(res.data.other) && (res.data.other = ''); 618 this.isEmpty(res.data.other) && (res.data.other = '');
604 !res.data.otherFileModel && (res.data.otherFileModel = []); 619 !res.data.otherFileModel && (res.data.otherFileModel = []);
  620 + this.companyChange(res.data.registeredEntity, 'change');
605 this.dataForm = res.data; 621 this.dataForm = res.data;
606 this.loading = false; 622 this.loading = false;
607 }).catch(() => { 623 }).catch(() => {
src/views/baseInspectionReport/Form.vue
@@ -34,7 +34,8 @@ @@ -34,7 +34,8 @@
34 </el-col> 34 </el-col>
35 <el-col :span="24"> 35 <el-col :span="24">
36 <el-form-item label="运营主体" prop="company"> 36 <el-form-item label="运营主体" prop="company">
37 - <el-select 37 + <CompanySelect v-model="dataForm.company" @change="(val, type) => companyChange(val, type)"></CompanySelect>
  38 + <!-- <el-select
38 ref="companySelect" 39 ref="companySelect"
39 v-model="dataForm.company" 40 v-model="dataForm.company"
40 placeholder="请选择运营主体" 41 placeholder="请选择运营主体"
@@ -51,7 +52,7 @@ @@ -51,7 +52,7 @@
51 :filter-method="filterMethod" 52 :filter-method="filterMethod"
52 > 53 >
53 <el-option v-for="item in companyOptions.slice(0, company_currentPage)" :key="item.id" :label="item.companyName" :value="item.id"/> 54 <el-option v-for="item in companyOptions.slice(0, company_currentPage)" :key="item.id" :label="item.companyName" :value="item.id"/>
54 - </el-select> 55 + </el-select> -->
55 </el-form-item> 56 </el-form-item>
56 </el-col> 57 </el-col>
57 <el-col :span="24"> 58 <el-col :span="24">
@@ -398,11 +399,11 @@ export default { @@ -398,11 +399,11 @@ export default {
398 mounted() {}, 399 mounted() {},
399 methods: { 400 methods: {
400 async initAllList() { 401 async initAllList() {
401 - let companyRes = await request({  
402 - url: `/Extend/basecomapnyinfo/GetNoPagingList`,  
403 - method: "GET",  
404 - });  
405 - this.companyOptions = companyRes.data; 402 + // let companyRes = await request({
  403 + // url: `/Extend/basecomapnyinfo/GetNoPagingList`,
  404 + // method: "GET",
  405 + // });
  406 + // this.companyOptions = companyRes.data;
406 let SourceRes = await request({ 407 let SourceRes = await request({
407 url: `/Extend/baseinspectionreport/GetReportSourceList`, 408 url: `/Extend/baseinspectionreport/GetReportSourceList`,
408 method: "GET", 409 method: "GET",
@@ -417,23 +418,23 @@ export default { @@ -417,23 +418,23 @@ export default {
417 // this.name_loading = true 418 // this.name_loading = true
418 // this.name_loading = false; 419 // this.name_loading = false;
419 }, 420 },
420 - async initCompanyList() {  
421 - if(this.company_currentPage > this.companyOptions.length) return;  
422 - this.company_currentPage += 10;  
423 - },  
424 - async filterMethod(val) {  
425 - this.company_currentPage = 20;  
426 - this.name_loading = true  
427 - let companyRes = await request({  
428 - url: `/Extend/basecomapnyinfo/GetNoPagingList`,  
429 - method: "GET",  
430 - params: {  
431 - companyName: val  
432 - }  
433 - });  
434 - this.companyOptions = companyRes.data;  
435 - this.name_loading = false;  
436 - }, 421 + // async initCompanyList() {
  422 + // if(this.company_currentPage > this.companyOptions.length) return;
  423 + // this.company_currentPage += 10;
  424 + // },
  425 + // async filterMethod(val) {
  426 + // this.company_currentPage = 20;
  427 + // this.name_loading = true
  428 + // let companyRes = await request({
  429 + // url: `/Extend/basecomapnyinfo/GetNoPagingList`,
  430 + // method: "GET",
  431 + // params: {
  432 + // companyName: val
  433 + // }
  434 + // });
  435 + // this.companyOptions = companyRes.data;
  436 + // this.name_loading = false;
  437 + // },
437 selectBlur(e) { 438 selectBlur(e) {
438 let value = e.target.value; 439 let value = e.target.value;
439 if(!value) return; 440 if(!value) return;
@@ -461,34 +462,54 @@ export default { @@ -461,34 +462,54 @@ export default {
461 let input = this.$refs.select.$children[0].$refs.input; 462 let input = this.$refs.select.$children[0].$refs.input;
462 input.blur(); 463 input.blur();
463 }, 464 },
464 -  
465 - // 运营主体改变  
466 - selectCompanyBlur(e) {  
467 - let value = e.target.value;  
468 - if(!value) return;  
469 - this.dataForm.company = e.target.value;  
470 - this.companyChange(value, 'blur');  
471 - },  
472 async companyChange(val, type) { 465 async companyChange(val, type) {
473 - let obj = this.companyOptions.find(v => val == v.id);  
474 - obj && await request({  
475 - url: `/Extend/basesysteminfo/GetNoPagingList`,  
476 - method: "GET",  
477 - params: { companyId: val }  
478 - }).then(({data}) => {  
479 - if(!data) return;  
480 - this.nameOptions = data;  
481 - });  
482 - if(!type) return;  
483 - !obj && this.nameOptions == [];  
484 - this.dataForm.platformName = '';  
485 - this.dataForm.platformType = '';  
486 - },  
487 - visibleNameCompanyChange(val) {  
488 - if (val) return  
489 - let input = this.$refs.companySelect.$children[0].$refs.input;  
490 - input.blur(); 466 + switch (type) {
  467 + case 'change':
  468 + let { data } = await request({
  469 + url: `/Extend/basesysteminfo/GetNoPagingList`,
  470 + method: "GET",
  471 + params: { companyId: val }
  472 + });
  473 + if(!data) return;
  474 + this.nameOptions = data;
  475 + break;
  476 + case 'blur':
  477 + this.nameOptions == [];
  478 + this.dataForm.platformName = '';
  479 + this.dataForm.platformType = '';
  480 + break;
  481 + default:
  482 + break;
  483 + }
491 }, 484 },
  485 +
  486 + // // 运营主体改变
  487 + // selectCompanyBlur(e) {
  488 + // let value = e.target.value;
  489 + // if(!value) return;
  490 + // this.dataForm.company = e.target.value;
  491 + // this.companyChange(value, 'blur');
  492 + // },
  493 + // async companyChange(val, type) {
  494 + // let obj = this.companyOptions.find(v => val == v.id);
  495 + // obj && await request({
  496 + // url: `/Extend/basesysteminfo/GetNoPagingList`,
  497 + // method: "GET",
  498 + // params: { companyId: val }
  499 + // }).then(({data}) => {
  500 + // if(!data) return;
  501 + // this.nameOptions = data;
  502 + // });
  503 + // if(!type) return;
  504 + // !obj && this.nameOptions == [];
  505 + // this.dataForm.platformName = '';
  506 + // this.dataForm.platformType = '';
  507 + // },
  508 + // visibleNameCompanyChange(val) {
  509 + // if (val) return
  510 + // let input = this.$refs.companySelect.$children[0].$refs.input;
  511 + // input.blur();
  512 + // },
492 loadList() { 513 loadList() {
493 this.name_loading = true; 514 this.name_loading = true;
494 request({ 515 request({
@@ -528,6 +549,7 @@ export default { @@ -528,6 +549,7 @@ export default {
528 this.visible = true; 549 this.visible = true;
529 this.isDetail = isDetail || false; 550 this.isDetail = isDetail || false;
530 this.form_loading = true; 551 this.form_loading = true;
  552 + this.btnLoading = false;
531 await this.initAreaTypeList(); 553 await this.initAreaTypeList();
532 await this.initAllList(); 554 await this.initAllList();
533 this.$nextTick(async () => { 555 this.$nextTick(async () => {
@@ -535,7 +557,7 @@ export default { @@ -535,7 +557,7 @@ export default {
535 if (this.dataForm.id) { 557 if (this.dataForm.id) {
536 this.form_loading = true; 558 this.form_loading = true;
537 let res = await getDetail(this.dataForm.id); 559 let res = await getDetail(this.dataForm.id);
538 - await this.companyChange(res.data.company, false); 560 + await this.companyChange(res.data.company, 'change');
539 if(res.code != 200) return this.form_loading = false; 561 if(res.code != 200) return this.form_loading = false;
540 if(!res.data) return; 562 if(!res.data) return;
541 this.dataForm = res.data; 563 this.dataForm = res.data;
@@ -551,6 +573,7 @@ export default { @@ -551,6 +573,7 @@ export default {
551 } 573 }
552 this.dataForm.selfMediaPlatformType = res.data.selfMediaPlatformType || '--'; 574 this.dataForm.selfMediaPlatformType = res.data.selfMediaPlatformType || '--';
553 this.form_loading = false; 575 this.form_loading = false;
  576 + console.log(this.dataForm, 'this.dataForm');
554 } else { 577 } else {
555 this.form_loading = false; 578 this.form_loading = false;
556 } 579 }
@@ -559,6 +582,7 @@ export default { @@ -559,6 +582,7 @@ export default {
559 dataFormSubmit() { 582 dataFormSubmit() {
560 this.$refs["elForm"].validate(async (valid) => { 583 this.$refs["elForm"].validate(async (valid) => {
561 if (valid) { 584 if (valid) {
  585 + console.log(this.dataForm, 'this.dataForm');
562 let obj = { 586 let obj = {
563 ...this.dataForm, 587 ...this.dataForm,
564 questionType: this.dataForm.questionType == '0' ? this.dataForm.otherQuestionType : this.dataForm.questionType, 588 questionType: this.dataForm.questionType == '0' ? this.dataForm.otherQuestionType : this.dataForm.questionType,
src/views/baseListHazardousSamples/index.vue
@@ -38,7 +38,8 @@ @@ -38,7 +38,8 @@
38 </el-col> 38 </el-col>
39 <el-col :span="5"> 39 <el-col :span="5">
40 <el-form-item label=""> 40 <el-form-item label="">
41 - <el-select 41 + <CompanySelect v-model="query.company" :isInput="true" placeholder="请选择运营主体"></CompanySelect>
  42 + <!-- <el-select
42 v-model="query.company" 43 v-model="query.company"
43 placeholder="请选择运营主体" 44 placeholder="请选择运营主体"
44 clearable 45 clearable
@@ -54,7 +55,7 @@ @@ -54,7 +55,7 @@
54 :label="item.companyName" 55 :label="item.companyName"
55 :value="item.id" 56 :value="item.id"
56 /> 57 />
57 - </el-select> 58 + </el-select> -->
58 </el-form-item> 59 </el-form-item>
59 </el-col> 60 </el-col>
60 <el-col :span="5"> 61 <el-col :span="5">
@@ -170,35 +171,35 @@ export default { @@ -170,35 +171,35 @@ export default {
170 computed: {}, 171 computed: {},
171 created() { 172 created() {
172 this.initData(); 173 this.initData();
173 - this.getcompanyOptions(); 174 + // this.getcompanyOptions();
174 }, 175 },
175 methods: { 176 methods: {
176 - getcompanyOptions() {  
177 - this.name_loading = true;  
178 - request({  
179 - url: `/Extend/basecomapnyinfo/GetNoPagingList`,  
180 - method: "GET",  
181 - }).then(({data}) => {  
182 - this.companyOptions = data;  
183 - this.name_loading = false;  
184 - })  
185 - },  
186 - moreCompanyList() {  
187 - if(this.company_currentPage > this.companyOptions.length) return  
188 - this.company_currentPage += 10;  
189 - },  
190 - filterMethod(val) {  
191 - this.company_currentPage = 20;  
192 - this.name_loading = true;  
193 - request({  
194 - url: `/Extend/basecomapnyinfo/GetNoPagingList`,  
195 - method: "GET",  
196 - params: { companyName: val }  
197 - }).then(({data}) => {  
198 - this.companyOptions = data;  
199 - this.name_loading = false;  
200 - })  
201 - }, 177 + // getcompanyOptions() {
  178 + // this.name_loading = true;
  179 + // request({
  180 + // url: `/Extend/basecomapnyinfo/GetNoPagingList`,
  181 + // method: "GET",
  182 + // }).then(({data}) => {
  183 + // this.companyOptions = data;
  184 + // this.name_loading = false;
  185 + // })
  186 + // },
  187 + // moreCompanyList() {
  188 + // if(this.company_currentPage > this.companyOptions.length) return
  189 + // this.company_currentPage += 10;
  190 + // },
  191 + // filterMethod(val) {
  192 + // this.company_currentPage = 20;
  193 + // this.name_loading = true;
  194 + // request({
  195 + // url: `/Extend/basecomapnyinfo/GetNoPagingList`,
  196 + // method: "GET",
  197 + // params: { companyName: val }
  198 + // }).then(({data}) => {
  199 + // this.companyOptions = data;
  200 + // this.name_loading = false;
  201 + // })
  202 + // },
202 initData() { 203 initData() {
203 this.listLoading = true; 204 this.listLoading = true;
204 let _query = { 205 let _query = {
@@ -216,7 +217,7 @@ export default { @@ -216,7 +217,7 @@ export default {
216 request({ 217 request({
217 url: `/extend/BaseListHazardousSamples`, 218 url: `/extend/BaseListHazardousSamples`,
218 method: "GET", 219 method: "GET",
219 - data: query, 220 + params: query,
220 }).then((res) => { 221 }).then((res) => {
221 this.list = res.data.list; 222 this.list = res.data.list;
222 this.total = res.data.pagination.total; 223 this.total = res.data.pagination.total;
src/views/basePrincipalResponsibility/index.vue
@@ -135,7 +135,7 @@ export default { @@ -135,7 +135,7 @@ export default {
135 request({ 135 request({
136 url: `/Extend/BasePrincipalResponsibility`, 136 url: `/Extend/BasePrincipalResponsibility`,
137 method: "GET", 137 method: "GET",
138 - data: query, 138 + params: query,
139 }).then((res) => { 139 }).then((res) => {
140 this.list = res.data.list; 140 this.list = res.data.list;
141 this.total = res.data.pagination.total; 141 this.total = res.data.pagination.total;
src/views/baseSystemInfo/InspectForm.vue
@@ -284,14 +284,14 @@ export default { @@ -284,14 +284,14 @@ export default {
284 this.platformTypeOptions = list; 284 this.platformTypeOptions = list;
285 }, 285 },
286 // 请求公司列表 286 // 请求公司列表
287 - async initCompanyList() {  
288 - request({  
289 - url: `/Extend/basecomapnyinfo/GetNoPagingList`,  
290 - method: "GET",  
291 - }).then(({data}) => {  
292 - this.companyOptions = data;  
293 - })  
294 - }, 287 + // async initCompanyList() {
  288 + // request({
  289 + // url: `/Extend/basecomapnyinfo/GetNoPagingList`,
  290 + // method: "GET",
  291 + // }).then(({data}) => {
  292 + // this.companyOptions = data;
  293 + // })
  294 + // },
295 // 获取系统列表 295 // 获取系统列表
296 getSystemSelect(companyId) { 296 getSystemSelect(companyId) {
297 this.system_loading = true; 297 this.system_loading = true;