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

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

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

Loading…
Cancel
Save