Browse Source

修改网格力量传参,增加排序,

release/epdc
luyan 2 years ago
parent
commit
6e35733fb0
  1. 14
      src/views/modules/custom/gridforceinfo-add-or-update.vue
  2. 25
      src/views/modules/custom/gridforceinfo.vue

14
src/views/modules/custom/gridforceinfo-add-or-update.vue

@ -17,12 +17,12 @@
<el-input v-model="dataForm.identityNo" placeholder="身份证号码" style="width: 300px;"></el-input> <el-input v-model="dataForm.identityNo" placeholder="身份证号码" style="width: 300px;"></el-input>
</el-form-item> </el-form-item>
<template v-if="!dataForm.id"> <template v-if="!dataForm.id">
<el-form-item label="所属社区"> <el-form-item label="所属社区" prop="deptId">
<el-cascader v-model="dataForm.deptId" :props="{ checkStrictly: true }" :options="options" clearable></el-cascader> <el-cascader v-model="dataForm.deptId" :props="{ checkStrictly: true }" :options="options" clearable></el-cascader>
</el-form-item> </el-form-item>
</template> </template>
<template v-if="dataForm.id"> <template v-if="dataForm.id">
<el-form-item label="所属社区"> <el-form-item label="所属社区" prop="deptId">
<el-cascader v-model="dataForm.deptId" :options="options" :props="{ checkStrictly: true }" clearable></el-cascader> <el-cascader v-model="dataForm.deptId" :options="options" :props="{ checkStrictly: true }" clearable></el-cascader>
</el-form-item> </el-form-item>
</template> </template>
@ -50,8 +50,12 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="sort" :label="$t('dict.sort')">
<el-input-number v-model="dataForm.sort" controls-position="right" :min="0"
:label="$t('dict.sort')" style="width:220px"></el-input-number>
</el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="备注" style="width: 300px;"></el-input> <el-input type="textarea" aria-colspan="2" v-model="dataForm.remark" placeholder="备注" style="width: 80%"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<template slot="footer"> <template slot="footer">
@ -77,6 +81,7 @@ export default {
faceImg: '', faceImg: '',
workUnit: '', workUnit: '',
dutyCategoryId: '', dutyCategoryId: '',
sort: '',
remark: '', remark: '',
deptId: '', deptId: '',
allDeptIds: [], allDeptIds: [],
@ -109,6 +114,9 @@ export default {
dutyCategoryId: [ dutyCategoryId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } { required: true, message: this.$t('validate.required'), trigger: 'blur' }
], ],
sort: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
deptId: [ deptId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } { required: true, message: this.$t('validate.required'), trigger: 'blur' }
], ],

25
src/views/modules/custom/gridforceinfo.vue

@ -92,34 +92,19 @@ export default {
watch: { watch: {
'ids': function (val) { 'ids': function (val) {
if (val.length === 0 || val.length === 1) { if (val.length === 0 || val.length === 1) {
this.dataForm.streetId = val[0] this.dataForm.deptId = val[0]
this.dataForm.communityId = ''
this.dataForm.gridId = ''
this.dataForm.deptId = ''
} }
if (val.length === 2) { if (val.length === 2) {
this.dataForm.streetId = '' this.dataForm.deptId = val[1]
this.dataForm.communityId = val[1]
this.dataForm.gridId = ''
this.dataForm.deptId = ''
} }
if (val.length === 3) { if (val.length === 3) {
this.dataForm.streetId = '' this.dataForm.deptId = val[2]
this.dataForm.communityId = ''
this.dataForm.gridId = val[2]
this.dataForm.deptId = ''
} }
if (val.length === 4) { if (val.length === 4) {
this.dataForm.streetId = '' this.dataForm.deptId = val[3]
this.dataForm.communityId = ''
this.dataForm.gridId = ''
this.dataForm.deptId = val[val.length - 2]
} }
if (val.length === 5) { if (val.length === 5) {
this.dataForm.streetId = '' this.dataForm.deptId = val[4]
this.dataForm.communityId = ''
this.dataForm.gridId = ''
this.dataForm.deptId = val[val.length - 1]
} }
} }
}, },

Loading…
Cancel
Save