Browse Source

【安宁pc端 】-【grid换dept】魏凯 2020-09-24

migration
weikai 5 years ago
parent
commit
cfc61695af
  1. 20
      src/views/modules/sys/deptmacode-optimize.vue
  2. 24
      src/views/modules/sys/deptmacode.vue

20
src/views/modules/sys/deptmacode-optimize.vue

@ -98,7 +98,7 @@
<el-button v-if="$hasPermission('sys:deptmacode:create') && !scope.row.codeUrl"
type="text"
size="small"
@click="createDeptMaCodeHandle(scope.row.gridId)">生成</el-button>
@click="createDeptMaCodeHandle(scope.row.deptId)">生成</el-button>
</template>
</el-table-column>
</el-table>
@ -134,7 +134,7 @@ export default {
dataForm: {
streetId: null,
communityId: null,
gridId: null,
deptId: null,
leaderFlag: '0'
},
epidemicSentryPostVisible: false,
@ -143,7 +143,7 @@ export default {
options: [],
streetList: [],
communityList: [],
gridList: [],
deptList: [],
maCodeCategorys: [
{ id: '0', name: '群众注册码' },
{ id: '1', name: '网格长注册码' },
@ -171,22 +171,22 @@ export default {
if (val.length === 0) {
this.dataForm.streetId = ''
this.dataForm.communityId = ''
this.dataForm.gridId = ''
this.dataForm.deptId = ''
}
if (val.length === 1) {
this.dataForm.streetId = this.deptIdList[0]
this.dataForm.communityId = ''
this.dataForm.gridId = ''
this.dataForm.deptId = ''
}
if (val.length === 2) {
this.dataForm.streetId = this.deptIdList[0]
this.dataForm.communityId = this.deptIdList[1]
this.dataForm.gridId = ''
this.dataForm.deptId = ''
}
if (val.length === 3) {
this.dataForm.streetId = this.deptIdList[0]
this.dataForm.communityId = this.deptIdList[1]
this.dataForm.gridId = this.deptIdList[2]
this.dataForm.deptId = this.deptIdList[2]
}
}
},
@ -285,8 +285,8 @@ export default {
.catch(() => { })
},
clearDataForm () {
this.dataForm.streetId = this.dataForm.communityId = this.dataForm.gridId = null
this.communityList = this.gridList = []
this.dataForm.streetId = this.dataForm.communityId = this.dataForm.deptId = null
this.communityList = this.deptList = []
},
downloadHandle (codeUrl) {
window.location.href = `${window.SITE_CONFIG['apiURL']}/oss/file/download?fileUrl=${codeUrl}`
@ -295,7 +295,7 @@ export default {
sentryManage (id) {
this.epidemicSentryPostVisible = true
this.$nextTick(() => {
this.$refs.epidemicSentryPost.dataForm.gridId = id
this.$refs.epidemicSentryPost.dataForm.deptId = id
this.$refs.epidemicSentryPost.init()
})
},

24
src/views/modules/sys/deptmacode.vue

@ -74,7 +74,7 @@
label="社区"
header-align="center"
align="center"></el-table-column>
<el-table-column prop="grid"
<el-table-column prop="dept"
label="网格"
header-align="center"
align="center"></el-table-column>
@ -119,13 +119,13 @@
<el-button v-if="$hasPermission('sys:deptmacode:sentryManage')"
type="text"
size="small"
@click="sentryManage(scope.row.gridId)">哨卡管理</el-button>
@click="sentryManage(scope.row.deptId)">哨卡管理</el-button>
<el-button v-if="
$hasPermission('sys:deptmacode:create') && !scope.row.codeUrl
"
type="text"
size="small"
@click="createDeptMaCodeHandle(scope.row.gridId)">生成</el-button>
@click="createDeptMaCodeHandle(scope.row.deptId)">生成</el-button>
</template>
</el-table-column>
</el-table>
@ -161,7 +161,7 @@ export default {
dataForm: {
streetId: null,
communityId: null,
gridId: null,
deptId: null,
leaderFlag: '0'
},
epidemicSentryPostVisible: false,
@ -170,7 +170,7 @@ export default {
options: [],
streetList: [],
communityList: [],
gridList: [],
deptList: [],
maCodeCategorys: [
{ id: '0', name: '群众注册码' },
{ id: '1', name: '网格长注册码' }
@ -197,22 +197,22 @@ export default {
if (val.length === 0) {
this.dataForm.streetId = ''
this.dataForm.communityId = ''
this.dataForm.gridId = ''
this.dataForm.deptId = ''
}
if (val.length === 1) {
this.dataForm.streetId = this.deptIdList[0]
this.dataForm.communityId = ''
this.dataForm.gridId = ''
this.dataForm.deptId = ''
}
if (val.length === 2) {
this.dataForm.streetId = this.deptIdList[0]
this.dataForm.communityId = this.deptIdList[1]
this.dataForm.gridId = ''
this.dataForm.deptId = ''
}
if (val.length === 3) {
this.dataForm.streetId = this.deptIdList[0]
this.dataForm.communityId = this.deptIdList[1]
this.dataForm.gridId = this.deptIdList[2]
this.dataForm.deptId = this.deptIdList[2]
}
}
},
@ -311,8 +311,8 @@ export default {
.catch(() => { })
},
clearDataForm () {
this.dataForm.streetId = this.dataForm.communityId = this.dataForm.gridId = null
this.communityList = this.gridList = []
this.dataForm.streetId = this.dataForm.communityId = this.dataForm.deptId = null
this.communityList = this.deptList = []
},
downloadHandle (codeUrl) {
window.location.href = `${window.SITE_CONFIG['apiURL']}/oss/file/download?fileUrl=${codeUrl}`
@ -321,7 +321,7 @@ export default {
sentryManage (id) {
this.epidemicSentryPostVisible = true
this.$nextTick(() => {
this.$refs.epidemicSentryPost.dataForm.gridId = id
this.$refs.epidemicSentryPost.dataForm.deptId = id
this.$refs.epidemicSentryPost.init()
})
},

Loading…
Cancel
Save