Browse Source

优化查询一级增加增加产品areaCode功能

origin/feature/monitoring
zhangyuan 4 years ago
parent
commit
682a5c4144
  1. 2
      public/index.html
  2. 7
      src/views/modules/epidemic/epidemicreportuserinfo.vue
  3. 12
      src/views/modules/epidemic/epidemicuserinfo.vue
  4. 107
      src/views/modules/sys/dept-add-or-update.vue
  5. 5
      src/views/modules/vim/vaccinationinfo.vue
  6. 12
      src/views/modules/vim/vaccinationrole.vue
  7. 12
      src/views/modules/vim/vaccinationsite.vue
  8. 4
      src/views/modules/vim/vaccinationuserrole.vue
  9. 12
      src/views/modules/vim/vaccinecompany.vue
  10. 12
      src/views/modules/vim/vaccinetype.vue

2
public/index.html

@ -36,7 +36,7 @@
<% if (process.env.VUE_APP_NODE_ENV === 'dev') { %>
<script>
// window.SITE_CONFIG['apiURL'] = 'http://localhost:9094/epdc-api'
window.SITE_CONFIG['apiURL'] = 'https://epmet-ext9.elinkservice.cn/epdc-api'
window.SITE_CONFIG['apiURL'] = 'https://epdc-yushan.elinkservice.cn/epdc-api'
window.SITE_CONFIG['workLogURL'] = 'https://epmet-ext1.pingyin.gov.cn/plugin-wrf' //工作日志引用外链地址
</script>
<% } %>

7
src/views/modules/epidemic/epidemicreportuserinfo.vue

@ -4,7 +4,7 @@
<div class="mod-demo__epidemicreportuserinfo}">
<el-form :inline="true"
:model="dataForm"
@keyup.enter.native="getDataList()">
@keyup.enter.native="beforeGetDataList()">
<el-form-item label="姓名"
prop="username"
label-width="90px">
@ -295,10 +295,10 @@
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible"
ref="addOrUpdate"
@refreshDataList="getDataList"></add-or-update>
@refreshDataList="beforeGetDataList()"></add-or-update>
<infoDetail v-if="detailVisible"
ref="infoDetail"
@refreshDataList="getDataList"></infoDetail>
@refreshDataList="beforeGetDataList()"></infoDetail>
<el-dialog title="导出选择"
:visible.sync="dialogVisibleExcel"
width="30%">
@ -422,6 +422,7 @@ export default {
} else {
this.dataForm.company = ''
}
this.page = 1
this.getDataList()
},
//

12
src/views/modules/epidemic/epidemicuserinfo.vue

@ -4,7 +4,7 @@
<div class="mod-demo__epidemicreportuserinfo}">
<el-form :inline="true"
:model="dataForm"
@keyup.enter.native="getDataList()">
@keyup.enter.native="beforeGetDataList()">
<el-form-item label="姓名"
prop="userName"
label-width="90px">
@ -37,7 +37,7 @@
</el-form-item>
<el-form-item>
<el-button type="primary"
@click="getDataList()">{{ $t('query') }}</el-button>
@click="beforeGetDataListSearch()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary"
@ -193,11 +193,11 @@
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update ref="addOrUpdate"
@refreshDataList="getDataList"
@refreshDataList="beforeGetDataList()"
:data-form="dataForm"></add-or-update>
<infoDetail v-if="detailVisible"
ref="infoDetail"
@refreshDataList="getDataList"></infoDetail>
@refreshDataList="beforeGetDataList()"></infoDetail>
<el-dialog title="导出选择"
:visible.sync="dialogVisibleExcel"
width="30%">
@ -315,6 +315,10 @@ export default {
}
},
methods: {
beforeGetDataListSearch () {
this.page = 1
this.getDataList()
},
//
lookHandle (id) {
this.detailVisible = true

107
src/views/modules/sys/dept-add-or-update.vue

@ -7,21 +7,17 @@
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmitHandle()"
label-width="120px">
label-width="100px">
<el-form-item prop="name"
:label="$t('dept.name')">
<el-input v-model="dataForm.name"
<el-input class="input-width-jg" v-model="dataForm.name"
:placeholder="$t('dept.name')"></el-input>
</el-form-item>
<el-form-item prop="partyCode"
:label="$t('dept.partyCode')">
<el-input v-model="dataForm.partyCode"
<el-input class="input-width-jg" v-model="dataForm.partyCode"
:placeholder="$t('dept.partyCode')"></el-input>
</el-form-item>
<el-form-item prop="allAreaCode" :label="$t('dept.areaCode')">
<el-cascader v-model="dataForm.allAreaCode" :options="areaCodeOptions" :props="optionProps" change-on-select style="width: 320px" clearable>
</el-cascader>
</el-form-item>
<el-form-item prop="parentName"
:label="$t('dept.parentName')"
class="dept-list">
@ -39,7 +35,7 @@
@current-change="deptListTreeCurrentChangeHandle">
</el-tree>
</el-popover>
<el-input v-model="dataForm.parentName"
<el-input class="input-width-jg" v-model="dataForm.parentName"
v-popover:deptListPopover
:readonly="true"
:placeholder="$t('dept.parentName')">
@ -50,6 +46,7 @@
</i>
</el-input>
</el-form-item>
<el-form-item label="机构类型"
prop="typeKey">
<el-select v-model="dataForm.typeKey"
@ -62,6 +59,28 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="areaCode" label="区域编码" class="dept-list">
<el-popover v-model="areaCodeListVisible" ref="areaCodeListPopover" placement="bottom-start" trigger="click">
<el-tree :data="areaCodeList"
:props="{ label: 'name', children: 'children' }"
node-key="code"
ref="areaCodeListTree"
:highlight-current="true"
:expand-on-click-node="false"
accordion
@current-change="areaCodeListTreeCurrentChangeHandle">
</el-tree>
</el-popover>
<el-input class="input-width-jg" v-model="dataForm.areaCode" v-popover:areaCodeListPopover :readonly="true" placeholder="区域编码">
</el-input>
<el-tooltip placement="top">
<div slot="content">机构类型为街道或社区时请选择行政区划中的组织机构若没用对应选项点击下方红色文字链接新增行政区划<br/>机构类型为其他类型时选择其上级行政区划</div>
<i class="el-icon-question" style="color: #ff4c52" />
</el-tooltip>
<div>
<el-link @click="addAreaCode()" v-if="dataForm.typeKey === 'street_party' || dataForm.typeKey === 'community_party'" type="danger">如果没有匹配的行政区划请点击此处新增</el-link>
</div>
</el-form-item>
<el-form-item prop="sort"
:label="$t('dept.sort')">
<el-input-number v-model="dataForm.sort"
@ -85,7 +104,9 @@ export default {
return {
visible: false,
deptList: [],
areaCodeList: [],
deptListVisible: false,
areaCodeListVisible: false,
dataForm: {
id: '',
name: '',
@ -94,16 +115,10 @@ export default {
sort: 0,
typeKey: '',
typeName: '',
partyCode: '',
areaCode: '',
allAreaCode: [],
partyCode: ''
},
optionProps: {
value: 'code',
label: 'name',
children: 'children'
parentAreaCode: ''
},
areaCodeOptions: [],
secondOrgDictList: []
}
},
@ -116,14 +131,14 @@ export default {
partyCode: [
{ required: true, message: this.$t('validate.required'), trigger: 'change' }
],
allAreaCode: [
{ required: true, message: this.$t('validate.required'), trigger: 'change' }
],
parentName: [
{ required: true, message: this.$t('validate.required'), trigger: 'change' }
],
typeKey: [
{ required: true, message: this.$t('validate.required'), trigger: 'change' }
],
areaCode: [
{ required: true, message: this.$t('validate.required'), trigger: 'change' }
]
}
}
@ -143,13 +158,11 @@ export default {
} else {
this.dataForm.partyCode = ''
this.dataForm.typeKey = ''
this.dataForm.areaCode = ''
this.dataForm.allAreaCode = ''
}
})
this.getAreaCodeDeptList()
})
this.getSecondOrgDicList()
this.getAreaCodeOption()
},
//
changeOrgType (item) {
@ -164,13 +177,13 @@ export default {
this.deptList = res.data
}).catch(() => { })
},
//
getAreaCodeOption () {
return this.$http.get('/sys/dept/getEpmetAreaCode', { params: { rootAreaCode: '370124', rootAreaLevel: 'district' } }).then(({ data: res }) => {
//
getAreaCodeDeptList () {
return this.$http.get('/sys/dept/getDeptCode').then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.areaCodeOptions = res.data
this.areaCodeList = res.data.options
}).catch(() => { })
},
//
@ -192,11 +205,11 @@ export default {
...this.dataForm,
...res.data
}
this.dataForm.allAreaCode = res.data.allAreaCode.split(',')
if (this.dataForm.pid === '0') {
return this.deptListTreeSetDefaultHandle()
}
this.$refs.deptListTree.setCurrentKey(this.dataForm.pid)
this.$refs.areaCodeListTree.setCurrentKey(this.dataForm.areaCode)
}).catch(() => { })
},
// ,
@ -210,14 +223,40 @@ export default {
this.dataForm.parentName = data.name
this.deptListVisible = false
},
// ,
areaCodeListTreeCurrentChangeHandle (data) {
this.dataForm.areaCode = data.code
this.dataForm.parentAreaCode = data.parentCode
this.areaCodeListVisible = false
},
addAreaCode () {
if (this.dataForm.name === null || this.dataForm.name === '' || this.dataForm.name.trim() === '') {
return this.$message.error('请填写机构名称')
}
if (this.dataForm.pid === null || this.dataForm.pid === '' || this.dataForm.pid.trim() === '' || this.dataForm.pid.trim() === '0') {
return this.$message.error('请选择上级部门')
}
this.$http['post']('/sys/dept/addAreaCode', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.dataForm.areaCode = res.data.areaCode
this.getAreaCodeDeptList()
}
})
}).catch(() => { })
},
//
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.dataForm.areaCode = this.dataForm.allAreaCode[this.dataForm.allAreaCode.length - 1]
this.dataForm.allAreaCode = this.dataForm.allAreaCode.toString()
this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/dept', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
@ -247,4 +286,14 @@ export default {
}
}
}
.el-popover {
height: 320px;
overflow-y: scroll;
}
.el-dialog__footer {
margin-top: 100px;
}
.input-width-jg {
width: 93%;
}
</style>

5
src/views/modules/vim/vaccinationinfo.vue

@ -4,7 +4,7 @@
<div class="mod-demo__vaccinationinfo}">
<el-form :inline="true"
:model="dataForm"
@keyup.enter.native="getDataList()">
@keyup.enter.native="beforeGetDataList()">
<el-form-item label="姓名">
<el-input v-model="dataForm.realName"
placeholder="请输入姓名"
@ -223,7 +223,7 @@
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update ref="addOrUpdate"
@refreshDataList="getDataList"></add-or-update>
@refreshDataList="beforeGetDataList()"></add-or-update>
</div>
</el-card>
</template>
@ -275,6 +275,7 @@ export default {
} else if (this.dataForm.vaccNo > 0 && (!this.dataForm.vaccTime || this.dataForm.vaccTime === 0)) {
return this.$message.error('请填写已接种满时日')
}
this.page = 1
this.getDataList()
},
getOptions () {

12
src/views/modules/vim/vaccinationrole.vue

@ -1,14 +1,14 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-__vaccinationrole}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="beforeGetDataList()">
<el-form-item label="角色名称">
<el-input v-model="dataForm.roleName"
placeholder="角色名称"
clearable></el-input>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
<el-button @click="beforeGetDataList()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
@ -41,7 +41,7 @@
@current-change="pageCurrentChangeHandle">
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="beforeGetDataList()"></add-or-update>
</div>
</el-card>
</template>
@ -66,6 +66,12 @@ export default {
},
components: {
AddOrUpdate
},
methods: {
beforeGetDataList () {
this.page = 1
this.getDataList()
}
}
}
</script>

12
src/views/modules/vim/vaccinationsite.vue

@ -4,14 +4,14 @@
<div class="mod-demo__vaccinationsite}">
<el-form :inline="true"
:model="dataForm"
@keyup.enter.native="getDataList()">
@keyup.enter.native="beforeGetDataList()">
<el-form-item label="接种地点">
<el-input v-model="dataForm.siteName"
placeholder="接种地点"
clearable></el-input>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
<el-button @click="beforeGetDataList()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary"
@ -65,7 +65,7 @@
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible"
ref="addOrUpdate"
@refreshDataList="getDataList"></add-or-update>
@refreshDataList="beforeGetDataList()"></add-or-update>
</div>
</el-card>
</template>
@ -91,6 +91,12 @@ export default {
},
components: {
AddOrUpdate
},
methods: {
beforeGetDataList () {
this.page = 1
this.getDataList()
}
}
}
</script>

4
src/views/modules/vim/vaccinationuserrole.vue

@ -126,6 +126,10 @@ export default {
this.getVimUserList();
},
methods: {
beforeGetDataList () {
this.page = 1
this.getDataList()
},
getVimUserList() {
this.$http
.get(`/sys/user/vaccination/userList`)

12
src/views/modules/vim/vaccinecompany.vue

@ -4,14 +4,14 @@
<div class="mod-demo__vaccinecompany}">
<el-form :inline="true"
:model="dataForm"
@keyup.enter.native="getDataList()">
@keyup.enter.native="beforeGetDataList()">
<el-form-item label="企业名称">
<el-input v-model="dataForm.companyName"
placeholder="生产企业名称"
clearable></el-input>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
<el-button @click="beforeGetDataList()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary"
@ -69,7 +69,7 @@
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible"
ref="addOrUpdate"
@refreshDataList="getDataList"></add-or-update>
@refreshDataList="beforeGetDataList()"></add-or-update>
</div>
</el-card>
</template>
@ -95,6 +95,12 @@ export default {
},
components: {
AddOrUpdate
},
methods: {
beforeGetDataList () {
this.page = 1
this.getDataList()
}
}
}
</script>

12
src/views/modules/vim/vaccinetype.vue

@ -4,14 +4,14 @@
<div class="mod-demo__vaccinetype}">
<el-form :inline="true"
:model="dataForm"
@keyup.enter.native="getDataList()">
@keyup.enter.native="beforeGetDataList()">
<el-form-item label="疫苗名称">
<el-input v-model="dataForm.vaccineName"
placeholder="疫苗名称"
clearable></el-input>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
<el-button @click="beforeGetDataList()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary"
@ -65,7 +65,7 @@
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible"
ref="addOrUpdate"
@refreshDataList="getDataList"></add-or-update>
@refreshDataList="beforeGetDataList()"></add-or-update>
</div>
</el-card>
</template>
@ -91,6 +91,12 @@ export default {
},
components: {
AddOrUpdate
},
methods: {
beforeGetDataList () {
this.page = 1
this.getDataList()
}
}
}
</script>

Loading…
Cancel
Save