Commit 12ff398d25cacaef245f87e0cad2fbb002a1100b
1 parent
1dbea7ff
优化
Showing
8 changed files
with
178 additions
and
41 deletions
src/main.js
| @@ -19,6 +19,7 @@ import store from './store' | @@ -19,6 +19,7 @@ import store from './store' | ||
| 19 | import './permission' | 19 | import './permission' |
| 20 | import moment from "moment"; | 20 | import moment from "moment"; |
| 21 | import i18n from './lang' // internationalization | 21 | import i18n from './lang' // internationalization |
| 22 | +import selectLoadMore from '@/utils/loadmore.js'; | ||
| 22 | 23 | ||
| 23 | 24 | ||
| 24 | Vue.config.productionTip = false | 25 | Vue.config.productionTip = false |
| @@ -44,20 +45,7 @@ Object.keys(filters).forEach(key => { | @@ -44,20 +45,7 @@ Object.keys(filters).forEach(key => { | ||
| 44 | }) | 45 | }) |
| 45 | 46 | ||
| 46 | Vue.config.productionTip = false | 47 | Vue.config.productionTip = false |
| 47 | - | ||
| 48 | -Vue.directive('loadMore', { | ||
| 49 | - bind(el, binding) { | ||
| 50 | - // 获取element-ui定义好的scroll盒子 | ||
| 51 | - const SELECTWRAP_DOM = el.querySelector('.el-select-dropdown .el-select-dropdown__wrap') | ||
| 52 | - SELECTWRAP_DOM.addEventListener('scroll', function () { | ||
| 53 | - | ||
| 54 | - const CONDITION = this.scrollHeight - this.scrollTop <= this.clientHeight | ||
| 55 | - if (CONDITION) { | ||
| 56 | - binding.value() | ||
| 57 | - } | ||
| 58 | - }) | ||
| 59 | - } | ||
| 60 | -}) | 48 | +Vue.directive('selectLoadMore', selectLoadMore) |
| 61 | Vue.directive('removeAriaHidden', { | 49 | Vue.directive('removeAriaHidden', { |
| 62 | bind(el, binding) { | 50 | bind(el, binding) { |
| 63 | let ariaEls = el.querySelectorAll('.el-radio__original'); | 51 | let ariaEls = el.querySelectorAll('.el-radio__original'); |
src/utils/loadmore.js
0 → 100644
| 1 | +export default { | ||
| 2 | + bind(el, binding) { | ||
| 3 | + const selectDom = el.querySelector('.el-select-dropdown .el-select-dropdown__wrap') | ||
| 4 | + selectDom.addEventListener('scroll', () => { | ||
| 5 | + if (selectDom.scrollHeight - selectDom.scrollTop <= selectDom.clientHeight + 20) { | ||
| 6 | + binding.value() | ||
| 7 | + } | ||
| 8 | + }) | ||
| 9 | + } | ||
| 10 | +}; | ||
| 0 | \ No newline at end of file | 11 | \ No newline at end of file |
src/views/DisposalSuggestions/index.vue
| @@ -68,6 +68,21 @@ | @@ -68,6 +68,21 @@ | ||
| 68 | </div> | 68 | </div> |
| 69 | </el-upload> | 69 | </el-upload> |
| 70 | <el-button type="primary" icon="el-icon-download" size="mini" @click="exportData()" >导出</el-button> | 70 | <el-button type="primary" icon="el-icon-download" size="mini" @click="exportData()" >导出</el-button> |
| 71 | + <el-button v-if="!isSHILevel" type="primary" icon="el-icon-download" size="mini" @click="exportMakeDemo()">导出处理模板</el-button> | ||
| 72 | + <el-upload | ||
| 73 | + v-if="!isSHILevel" | ||
| 74 | + class="uploadXlax" | ||
| 75 | + :action="define.APIURl + '/api/Extend/BaseInspectionReport/TaskBatchReport'" | ||
| 76 | + :headers="uploadHeaders" | ||
| 77 | + :on-success="uploadSuccess" | ||
| 78 | + :on-error="uploadError" | ||
| 79 | + :show-file-list="false" | ||
| 80 | + name="excelfile" | ||
| 81 | + > | ||
| 82 | + <div class="avatar-box"> | ||
| 83 | + <el-button type="info" icon="el-icon-upload" size="mini">批量上报</el-button> | ||
| 84 | + </div> | ||
| 85 | + </el-upload> | ||
| 71 | </div> | 86 | </div> |
| 72 | <div class="NCC-common-layout-main NCC-flex-main"> | 87 | <div class="NCC-common-layout-main NCC-flex-main"> |
| 73 | <NCC-table v-loading="listLoading" :data="list"> | 88 | <NCC-table v-loading="listLoading" :data="list"> |
| @@ -79,7 +94,7 @@ | @@ -79,7 +94,7 @@ | ||
| 79 | <template slot-scope="scope">{{ scope.row.reportSource | dynamicTextUP(sourceOptions) }}</template> | 94 | <template slot-scope="scope">{{ scope.row.reportSource | dynamicTextUP(sourceOptions) }}</template> |
| 80 | </el-table-column> | 95 | </el-table-column> |
| 81 | <el-table-column show-overflow-tooltip label="问题类型" prop="questionType" align="left"/> | 96 | <el-table-column show-overflow-tooltip label="问题类型" prop="questionType" align="left"/> |
| 82 | - <el-table-column show-overflow-tooltip label="线索编号" prop="leadNumber" align="left"/> | 97 | + <el-table-column show-overflow-tooltip label="线索编号" prop="leadNumber" align="left" width="180"/> |
| 83 | <!-- <el-table-column show-overflow-tooltip prop="link" label="有害链接" align="left" /> --> | 98 | <!-- <el-table-column show-overflow-tooltip prop="link" label="有害链接" align="left" /> --> |
| 84 | <!-- <el-table-column show-overflow-tooltip prop="questionClass" label="关键词" align="left" /> --> | 99 | <!-- <el-table-column show-overflow-tooltip prop="questionClass" label="关键词" align="left" /> --> |
| 85 | <el-table-column show-overflow-tooltip prop="creatorTime" label="录入时间" align="left" :formatter="ncc.tableDateFormat"/> | 100 | <el-table-column show-overflow-tooltip prop="creatorTime" label="录入时间" align="left" :formatter="ncc.tableDateFormat"/> |
| @@ -216,13 +231,19 @@ export default { | @@ -216,13 +231,19 @@ export default { | ||
| 216 | }); | 231 | }); |
| 217 | this.sourceOptions = data; | 232 | this.sourceOptions = data; |
| 218 | }, | 233 | }, |
| 234 | + getTime() { | ||
| 235 | + if(!this.query.creatorTime) return; | ||
| 236 | + return { | ||
| 237 | + startTime: this.query.creatorTime[0] || '', | ||
| 238 | + endTime: this.query.creatorTime[1] || '', | ||
| 239 | + } | ||
| 240 | + }, | ||
| 219 | initData() { | 241 | initData() { |
| 220 | this.listLoading = true; | 242 | this.listLoading = true; |
| 221 | let _query = { | 243 | let _query = { |
| 222 | ...this.listQuery, | 244 | ...this.listQuery, |
| 223 | ...this.query, | 245 | ...this.query, |
| 224 | - startTime: this.query.creatorTime[0] || '', | ||
| 225 | - endTime: this.query.creatorTime[1] || '', | 246 | + ...this.getTime() |
| 226 | }; | 247 | }; |
| 227 | let query = {}; | 248 | let query = {}; |
| 228 | for (let key in _query) { | 249 | for (let key in _query) { |
| @@ -344,16 +365,33 @@ export default { | @@ -344,16 +365,33 @@ export default { | ||
| 344 | link.click(); | 365 | link.click(); |
| 345 | }); | 366 | }); |
| 346 | }, | 367 | }, |
| 347 | - uploadSuccess(response, file, fileList) { | ||
| 348 | - this.$message({ | ||
| 349 | - showClose: true, | ||
| 350 | - message: response.msg, | ||
| 351 | - type: response.code == 200 ? 'success' : 'error', | ||
| 352 | - close: () => { | ||
| 353 | - response.code == 200 && this.initData(); | ||
| 354 | - } | 368 | + exportMakeDemo() { |
| 369 | + let obj = { | ||
| 370 | + url: '/Extend/BaseInspectionReport/Actions/GenerateImportTemplateBatchReport', | ||
| 371 | + method: "GET", | ||
| 372 | + responseType: 'blob', | ||
| 373 | + }; | ||
| 374 | + request(obj).then((res) => { | ||
| 375 | + const blob = new Blob([res], {type: 'application/json'}); | ||
| 376 | + const url = window.URL.createObjectURL(blob); | ||
| 377 | + let link = document.createElement('a'); | ||
| 378 | + link.style.display = 'none'; | ||
| 379 | + link.href = url; | ||
| 380 | + link.download = '处理表单模板.xlsx'; | ||
| 381 | + link.click(); | ||
| 355 | }); | 382 | }); |
| 356 | }, | 383 | }, |
| 384 | + uploadSuccess(response, file, fileList) { | ||
| 385 | + if(response.code == 200) { | ||
| 386 | + this.$message({ | ||
| 387 | + message: response.msg, | ||
| 388 | + type: 'success' | ||
| 389 | + }); | ||
| 390 | + } else { | ||
| 391 | + this.$message.error(response.msg); | ||
| 392 | + } | ||
| 393 | + response.code == 200 && this.initData(); | ||
| 394 | + }, | ||
| 357 | uploadError() { | 395 | uploadError() { |
| 358 | console.log('erroe'); | 396 | console.log('erroe'); |
| 359 | }, | 397 | }, |
src/views/baseCaseHandling/Form.vue
| @@ -45,11 +45,15 @@ | @@ -45,11 +45,15 @@ | ||
| 45 | style="width: 100%" | 45 | style="width: 100%" |
| 46 | @blur.native.capture="selectCompanyBlur" | 46 | @blur.native.capture="selectCompanyBlur" |
| 47 | @visible-change="visibleNameCompanyChange" | 47 | @visible-change="visibleNameCompanyChange" |
| 48 | - :disabled="formType != 0" | ||
| 49 | @change="(val) => companyChange(val, 'change')" | 48 | @change="(val) => companyChange(val, 'change')" |
| 49 | + :disabled="formType != 0" | ||
| 50 | + v-selectLoadMore="moreCompanyList" | ||
| 51 | + :loading="name_loading" | ||
| 52 | + :teleported="false" | ||
| 53 | + :filter-method="filterMethod" | ||
| 50 | > | 54 | > |
| 51 | <el-option | 55 | <el-option |
| 52 | - v-for="item in companyOptions" | 56 | + v-for="item in companyOptions.slice(0, company_currentPage)" |
| 53 | :key="item.id" | 57 | :key="item.id" |
| 54 | :label="item.companyName" | 58 | :label="item.companyName" |
| 55 | :value="item.id" | 59 | :value="item.id" |
| @@ -71,8 +75,10 @@ | @@ -71,8 +75,10 @@ | ||
| 71 | @visible-change="visibleNameChange" | 75 | @visible-change="visibleNameChange" |
| 72 | @change="(val) => platformNameChange(val, 'change')" | 76 | @change="(val) => platformNameChange(val, 'change')" |
| 73 | :disabled="formType != 0 || !dataForm.registeredEntity" | 77 | :disabled="formType != 0 || !dataForm.registeredEntity" |
| 78 | + v-selectLoadMore="moreSystemList" | ||
| 79 | + :teleported="false" | ||
| 74 | :loading="system_loading"> | 80 | :loading="system_loading"> |
| 75 | - <el-option v-for="item in systemOption" :key="item.value" :label="item.systemName" :value="item.id" /> | 81 | + <el-option v-for="item in systemOption.slice(0, system_currentPage)" :key="item.value" :label="item.systemName" :value="item.id" /> |
| 76 | </el-select> | 82 | </el-select> |
| 77 | </el-form-item> | 83 | </el-form-item> |
| 78 | </el-col> | 84 | </el-col> |
| @@ -432,6 +438,9 @@ export default { | @@ -432,6 +438,9 @@ export default { | ||
| 432 | btnLoading: false, | 438 | btnLoading: false, |
| 433 | companyOptions: [], | 439 | companyOptions: [], |
| 434 | platformTypeOptions: [], | 440 | platformTypeOptions: [], |
| 441 | + company_currentPage: 20, | ||
| 442 | + name_loading: false, | ||
| 443 | + system_currentPage: 20, | ||
| 435 | }; | 444 | }; |
| 436 | }, | 445 | }, |
| 437 | computed: { | 446 | computed: { |
| @@ -463,6 +472,23 @@ export default { | @@ -463,6 +472,23 @@ export default { | ||
| 463 | this.companyOptions = data; | 472 | this.companyOptions = data; |
| 464 | }) | 473 | }) |
| 465 | }, | 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 | + }, | ||
| 466 | // 获取系统列表 | 492 | // 获取系统列表 |
| 467 | getSystemSelect(companyId) { | 493 | getSystemSelect(companyId) { |
| 468 | this.system_loading = true; | 494 | this.system_loading = true; |
| @@ -475,6 +501,26 @@ export default { | @@ -475,6 +501,26 @@ export default { | ||
| 475 | this.system_loading = false; | 501 | this.system_loading = false; |
| 476 | }) | 502 | }) |
| 477 | }, | 503 | }, |
| 504 | + moreSystemList() { | ||
| 505 | + if(this.system_currentPage > this.systemOption.length) return; | ||
| 506 | + this.system_currentPage += 10; | ||
| 507 | + }, | ||
| 508 | + async filterMethod_system(val) { | ||
| 509 | + this.system_currentPage = 0; | ||
| 510 | + this.system_loading = true; | ||
| 511 | + this.systemOption.filter.includes | ||
| 512 | + request({ | ||
| 513 | + url: "/Extend/basesysteminfo/GetNoPagingList", | ||
| 514 | + method: "get", | ||
| 515 | + params: { | ||
| 516 | + companyId: this.dataForm.registeredEntity, | ||
| 517 | + systemName: val, | ||
| 518 | + } | ||
| 519 | + }).then(({data}) => { | ||
| 520 | + this.systemOption = data; | ||
| 521 | + this.system_loading = false; | ||
| 522 | + }) | ||
| 523 | + }, | ||
| 478 | selectBlur(e) { | 524 | selectBlur(e) { |
| 479 | let value = e.target.value; | 525 | let value = e.target.value; |
| 480 | if(!value) return; | 526 | if(!value) return; |
src/views/baseCaseHandling/index.vue
| @@ -183,7 +183,7 @@ export default { | @@ -183,7 +183,7 @@ export default { | ||
| 183 | }, | 183 | }, |
| 184 | }, | 184 | }, |
| 185 | created() { | 185 | created() { |
| 186 | - this.initSystemOptions(); | 186 | + // this.initSystemOptions(); |
| 187 | this.initSystemTypeList(); | 187 | this.initSystemTypeList(); |
| 188 | this.initAreaTypeList(); | 188 | this.initAreaTypeList(); |
| 189 | this.initStateTypeOption(); | 189 | this.initStateTypeOption(); |
| @@ -203,13 +203,19 @@ export default { | @@ -203,13 +203,19 @@ export default { | ||
| 203 | this.listQuery.sidx = !order ? "" : prop; | 203 | this.listQuery.sidx = !order ? "" : prop; |
| 204 | this.initData(); | 204 | this.initData(); |
| 205 | }, | 205 | }, |
| 206 | + getTime() { | ||
| 207 | + if(!this.query.registrationTime) return; | ||
| 208 | + return { | ||
| 209 | + startTime: this.query.registrationTime[0] || '', | ||
| 210 | + endTime: this.query.registrationTime[1] || '', | ||
| 211 | + } | ||
| 212 | + }, | ||
| 206 | initData() { | 213 | initData() { |
| 207 | this.listLoading = true; | 214 | this.listLoading = true; |
| 208 | let _query = { | 215 | let _query = { |
| 209 | ...this.listQuery, | 216 | ...this.listQuery, |
| 210 | ...this.query, | 217 | ...this.query, |
| 211 | - startTime: this.query.registrationTime[0] || '', | ||
| 212 | - endTime: this.query.registrationTime[1] || '', | 218 | + ...this.getTime() |
| 213 | }; | 219 | }; |
| 214 | let query = {}; | 220 | let query = {}; |
| 215 | for (let key in _query) { | 221 | for (let key in _query) { |
src/views/baseInspectionReport/Form.vue
| @@ -45,8 +45,12 @@ | @@ -45,8 +45,12 @@ | ||
| 45 | @visible-change="visibleNameCompanyChange" | 45 | @visible-change="visibleNameCompanyChange" |
| 46 | @change="(val) => companyChange(val, 'change')" | 46 | @change="(val) => companyChange(val, 'change')" |
| 47 | :disabled='!!this.dataForm.id' | 47 | :disabled='!!this.dataForm.id' |
| 48 | + v-selectLoadMore="initCompanyList" | ||
| 49 | + :loading="name_loading" | ||
| 50 | + :teleported="false" | ||
| 51 | + :filter-method="filterMethod" | ||
| 48 | > | 52 | > |
| 49 | - <el-option v-for="item in companyOptions" :key="item.id" :label="item.companyName" :value="item.id"/> | 53 | + <el-option v-for="item in companyOptions.slice(0, company_currentPage)" :key="item.id" :label="item.companyName" :value="item.id"/> |
| 50 | </el-select> | 54 | </el-select> |
| 51 | </el-form-item> | 55 | </el-form-item> |
| 52 | </el-col> | 56 | </el-col> |
| @@ -62,9 +66,11 @@ | @@ -62,9 +66,11 @@ | ||
| 62 | @blur.native.capture="selectBlur" | 66 | @blur.native.capture="selectBlur" |
| 63 | @visible-change="visibleNameChange" | 67 | @visible-change="visibleNameChange" |
| 64 | @change="(val) => platformNameChange(val, 'change')" | 68 | @change="(val) => platformNameChange(val, 'change')" |
| 65 | - :loading="name_loading" | 69 | + v-selectLoadMore="moreSystemList" |
| 70 | + :teleported="false" | ||
| 71 | + :loading="system_loading" | ||
| 66 | :disabled="!!this.dataForm.id || !dataForm.company"> | 72 | :disabled="!!this.dataForm.id || !dataForm.company"> |
| 67 | - <el-option v-for="item in nameOptions" :key="item.id" :label="item.systemName" :value="item.id"></el-option> | 73 | + <el-option v-for="item in nameOptions.slice(0, system_currentPage)" :key="item.id" :label="item.systemName" :value="item.id"></el-option> |
| 68 | </el-select> | 74 | </el-select> |
| 69 | </el-form-item> | 75 | </el-form-item> |
| 70 | </el-col> | 76 | </el-col> |
| @@ -364,6 +370,10 @@ export default { | @@ -364,6 +370,10 @@ export default { | ||
| 364 | companyOptions: [], | 370 | companyOptions: [], |
| 365 | btnLoading: false, | 371 | btnLoading: false, |
| 366 | areaOptions: [], | 372 | areaOptions: [], |
| 373 | + company_currentPage: 20, | ||
| 374 | + system_loading: false, | ||
| 375 | + system_currentPage: 20, | ||
| 376 | + system_loading: false, | ||
| 367 | }; | 377 | }; |
| 368 | }, | 378 | }, |
| 369 | computed: { | 379 | computed: { |
| @@ -402,12 +412,21 @@ export default { | @@ -402,12 +412,21 @@ export default { | ||
| 402 | // this.name_loading = false; | 412 | // this.name_loading = false; |
| 403 | }, | 413 | }, |
| 404 | async initCompanyList() { | 414 | async initCompanyList() { |
| 405 | - request({ | 415 | + if(this.company_currentPage > this.companyOptions.length) return; |
| 416 | + this.company_currentPage += 10; | ||
| 417 | + }, | ||
| 418 | + async filterMethod(val) { | ||
| 419 | + this.company_currentPage = 20; | ||
| 420 | + this.name_loading = true | ||
| 421 | + let companyRes = await request({ | ||
| 406 | url: `/Extend/basecomapnyinfo/GetNoPagingList`, | 422 | url: `/Extend/basecomapnyinfo/GetNoPagingList`, |
| 407 | method: "GET", | 423 | method: "GET", |
| 408 | - }).then(({data}) => { | ||
| 409 | - this.companyOptions = data; | ||
| 410 | - }) | 424 | + params: { |
| 425 | + companyName: val | ||
| 426 | + } | ||
| 427 | + }); | ||
| 428 | + this.companyOptions = companyRes.data; | ||
| 429 | + this.name_loading = false; | ||
| 411 | }, | 430 | }, |
| 412 | selectBlur(e) { | 431 | selectBlur(e) { |
| 413 | let value = e.target.value; | 432 | let value = e.target.value; |
| @@ -474,6 +493,10 @@ export default { | @@ -474,6 +493,10 @@ export default { | ||
| 474 | this.name_loading = false; | 493 | this.name_loading = false; |
| 475 | }) | 494 | }) |
| 476 | }, | 495 | }, |
| 496 | + moreSystemList() { | ||
| 497 | + if(this.system_currentPage > this.nameOptions.length) return; | ||
| 498 | + this.system_currentPage += 10; | ||
| 499 | + }, | ||
| 477 | async getplatformTypeOptions() { | 500 | async getplatformTypeOptions() { |
| 478 | let list = this.$store.state.meta.system; | 501 | let list = this.$store.state.meta.system; |
| 479 | !list && (list = await this.$store.dispatch("getTypeListByCode", "system")); | 502 | !list && (list = await this.$store.dispatch("getTypeListByCode", "system")); |
src/views/baseInspectionReport/index.vue
| @@ -59,6 +59,7 @@ | @@ -59,6 +59,7 @@ | ||
| 59 | </div> | 59 | </div> |
| 60 | </el-upload> | 60 | </el-upload> |
| 61 | <el-button type="primary" icon="el-icon-download" size="mini" @click="exportData()">导出</el-button> | 61 | <el-button type="primary" icon="el-icon-download" size="mini" @click="exportData()">导出</el-button> |
| 62 | + | ||
| 62 | </div> | 63 | </div> |
| 63 | </el-form> | 64 | </el-form> |
| 64 | </el-row> | 65 | </el-row> |
| @@ -229,7 +230,7 @@ | @@ -229,7 +230,7 @@ | ||
| 229 | let obj = {} | 230 | let obj = {} |
| 230 | if(type) { | 231 | if(type) { |
| 231 | obj = { | 232 | obj = { |
| 232 | - url: '/Extend/BaseInspectionReport/Actions/GenerateImportTemplate', | 233 | + url: type == 'demo' ? '/Extend/BaseInspectionReport/Actions/GenerateImportTemplate' : '/Extend/BaseInspectionReport/Actions/GenerateImportTemplateBatchReport', |
| 233 | method: "GET", | 234 | method: "GET", |
| 234 | responseType: 'blob', | 235 | responseType: 'blob', |
| 235 | } | 236 | } |
| @@ -262,7 +263,7 @@ | @@ -262,7 +263,7 @@ | ||
| 262 | let link = document.createElement('a'); | 263 | let link = document.createElement('a'); |
| 263 | link.style.display = 'none'; | 264 | link.style.display = 'none'; |
| 264 | link.href = url; | 265 | link.href = url; |
| 265 | - link.download = '线索录入模板.xlsx'; | 266 | + link.download = type == 'demo' ? '线索录入模板.xlsx' : '处理表单模板.xlsx'; |
| 266 | link.click(); | 267 | link.click(); |
| 267 | } else { | 268 | } else { |
| 268 | if(res.code != 200) return; | 269 | if(res.code != 200) return; |
src/views/baseListHazardousSamples/index.vue
| @@ -42,9 +42,14 @@ | @@ -42,9 +42,14 @@ | ||
| 42 | v-model="query.company" | 42 | v-model="query.company" |
| 43 | placeholder="请选择运营主体" | 43 | placeholder="请选择运营主体" |
| 44 | clearable | 44 | clearable |
| 45 | + filterable | ||
| 46 | + v-selectLoadMore="moreCompanyList" | ||
| 47 | + :loading="name_loading" | ||
| 48 | + :teleported="false" | ||
| 49 | + :filter-method="filterMethod" | ||
| 45 | > | 50 | > |
| 46 | <el-option | 51 | <el-option |
| 47 | - v-for="(item, index) in companyOptions" | 52 | + v-for="(item, index) in companyOptions.slice(0, company_currentPage)" |
| 48 | :key="index" | 53 | :key="index" |
| 49 | :label="item.companyName" | 54 | :label="item.companyName" |
| 50 | :value="item.id" | 55 | :value="item.id" |
| @@ -158,6 +163,8 @@ export default { | @@ -158,6 +163,8 @@ export default { | ||
| 158 | exportBtnLoading: false, | 163 | exportBtnLoading: false, |
| 159 | HandFormVisible: false, | 164 | HandFormVisible: false, |
| 160 | ReportFormVisible: false, | 165 | ReportFormVisible: false, |
| 166 | + company_currentPage: 20, | ||
| 167 | + name_loading: false, | ||
| 161 | }; | 168 | }; |
| 162 | }, | 169 | }, |
| 163 | computed: {}, | 170 | computed: {}, |
| @@ -167,11 +174,29 @@ export default { | @@ -167,11 +174,29 @@ export default { | ||
| 167 | }, | 174 | }, |
| 168 | methods: { | 175 | methods: { |
| 169 | getcompanyOptions() { | 176 | getcompanyOptions() { |
| 177 | + this.name_loading = true; | ||
| 170 | request({ | 178 | request({ |
| 171 | url: `/Extend/basecomapnyinfo/GetNoPagingList`, | 179 | url: `/Extend/basecomapnyinfo/GetNoPagingList`, |
| 172 | method: "GET", | 180 | method: "GET", |
| 173 | }).then(({data}) => { | 181 | }).then(({data}) => { |
| 174 | this.companyOptions = 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; | ||
| 175 | }) | 200 | }) |
| 176 | }, | 201 | }, |
| 177 | initData() { | 202 | initData() { |