Browse Source

Merge branch 'dev-role' into dev

V1.0
jiangyy 4 years ago
parent
commit
441cad6670
  1. 3
      src/assets/scss/modules/management/list-main.scss
  2. 4
      src/router/index.js
  3. 93
      src/views/components/rangeInput.vue
  4. 2
      src/views/modules/base/collect.vue
  5. 6
      src/views/modules/base/community/buildForm.vue
  6. 5
      src/views/modules/base/community/communityForm.vue
  7. 4
      src/views/modules/base/community/roomForm.vue
  8. 64
      src/views/modules/base/epidemic/antiInfo.vue
  9. 6
      src/views/modules/base/epidemic/natInfo/natList.vue
  10. 63
      src/views/modules/base/epidemic/vaccin.vue
  11. 571
      src/views/modules/base/epidemic/vaccinAdd.vue
  12. 95
      src/views/modules/base/epidemic/veroFocus/veroFocusAdd.vue
  13. 6
      src/views/modules/base/epidemic/veroFocus/veroFocusList.vue
  14. 4529
      src/views/modules/base/organization/organization.vue
  15. 22
      src/views/modules/communityParty/article/drafts.vue
  16. 9
      src/views/modules/communityParty/article/index.vue
  17. 8
      src/views/modules/communityParty/heart/heartAudit.vue
  18. 14
      src/views/modules/communityParty/heart/heartFinish.vue
  19. 49
      src/views/modules/communityParty/heart/heartForm.vue
  20. 25
      src/views/modules/communityParty/heart/heartList.vue
  21. 24
      src/views/modules/communityParty/heart/heartPerson.vue
  22. 1
      src/views/modules/communityService/fuwujilu/fuwuList.vue
  23. 93
      src/views/modules/cpts/base/cpts/edit.vue
  24. 31
      src/views/modules/cpts/base/index.vue
  25. 23
      src/views/modules/plugins/change/verify.vue
  26. 105
      src/views/modules/plugins/change/verifyForm.vue
  27. 6
      src/views/modules/visual/basicinfo/basicInfoMain.vue
  28. 2063
      src/views/modules/visual/communityGovern/fivelayers/mapIndex copy 2.vue
  29. 1987
      src/views/modules/visual/communityGovern/fivelayers/mapIndex copy.vue
  30. 2071
      src/views/modules/visual/communityGovern/fivelayers/mapIndex-baidu.vue
  31. 34
      src/views/modules/visual/communityGovern/fivelayers/mapIndex.vue
  32. 64
      src/views/modules/visual/components/screen-map/index.vue
  33. 2
      src/views/modules/workSys/mapConfig.vue
  34. 383
      src/views/modules/workSys/role/role.vue
  35. 390
      src/views/modules/workSys/role/roleForm.vue

3
src/assets/scss/modules/management/list-main.scss

@ -19,6 +19,9 @@
.item_width_1{
width: 260px;
}
.item_width_3{
width: 200px;
}
.item_width_2{
width: 160px;
}

4
src/router/index.js

@ -380,7 +380,7 @@ router.beforeEach((to, from, next) => {
// fnAddDynamicMenuRoutes2(window.SITE_CONFIG["menuShujuList"]);
http
.get("/gov/access/menu/nav?tableName=data_menu")
.get("gov/access/menu/navDigitalCommunity?tableName=data_menu")
.then(({ data: res }) => {
if (res.code == 10005 || res.code == 10006 || res.code == 10007) {
// 10005 token为空 10006登陆超时 10007别处登录
@ -406,7 +406,7 @@ router.beforeEach((to, from, next) => {
});
http
.get("/gov/access/menu/nav")
.get("gov/access/menu/navDigitalCommunity")
.then(({ data: res }) => {
if (res.code == 10005 || res.code == 10006 || res.code == 10007) {
// 10005 token为空 10006登陆超时 10007别处登录

93
src/views/components/rangeInput.vue

@ -1,33 +1,31 @@
<template>
<el-form :model="inputForm" :rules="rules" class="demo-form-inline">
<div class="flex-div">
<el-form-item prop="start">
<el-input
v-model="inputForm.start"
class="wd50"
size="small"
:type="inputType"
clearable
placeholder="请输入"
@change="handleChange"
/>
</el-form-item>
<div>-</div>
<el-form-item prop="end">
<el-input
v-model="inputForm.end"
class="wd50"
size="small"
:type="inputType"
clearable
placeholder="请输入"
@change="handleChange"
@blur="handleBlur"
/>
</el-form-item>
</div>
</el-form>
<el-form :model="inputForm"
:rules="rules"
class="demo-form-inline">
<div class="flex-div">
<el-form-item prop="start">
<el-input v-model="inputForm.start"
class="wd50"
size="small"
:type="inputType"
clearable
placeholder="请输入"
@change="handleChange" />
</el-form-item>
<div class="div_middle">-</div>
<el-form-item prop="end">
<el-input v-model="inputForm.end"
class="wd50"
size="small"
:type="inputType"
clearable
placeholder="请输入"
@change="handleChange"
@blur="handleBlur" />
</el-form-item>
</div>
</el-form>
</template>
<script>
@ -40,57 +38,61 @@ export default {
props: {
value: {
type: Object,
default: () => {
default: () => {
return {
start: '',
end: ''
}
}
}
},
type: {
type: String,
default: ''
}
},
data() {
data () {
let checkAge = (rule, value, callback) => {
// debugger
if (value === '') {
callback(new Error('请输入内容'))
} else {
if (value < this.inputForm.start) {
if (parseInt(value) < parseInt(this.inputForm.start)) {
callback(new Error('结束值不能小于开始值'))
} else {
callback()
}
callback()
}
}
return {
inputForm: {...this.value},
inputForm: { ...this.value },
rules: {
end: [
{ validator: checkAge, trigger: 'blur' }
],
{ validator: checkAge, trigger: 'blur' }
],
}
}
},
computed: {
inputType() {
inputType () {
if (this.type == 'num') return 'number'
}
},
watch: {
'value.start'(val) {
'value.start' (val) {
this.inputForm.start = val
},
'value.end'(val) {
'value.end' (val) {
this.inputForm.end = val
},
},
methods: {
handleChange(val) {
handleChange (val) {
// if ()
this.$emit('change', { ...this.inputForm})
this.$emit('change', { ...this.inputForm })
},
handleBlur() {
handleBlur () {
}
}
@ -117,10 +119,13 @@ export default {
input::-webkit-inner-spin-button {
-webkit-appearance: none;
}
input[type='number']{
input[type="number"] {
-moz-appearance: textfield;
}
}
}
.div_middle {
padding: 0 10px;
}
</style>

2
src/views/modules/base/collect.vue

@ -110,7 +110,7 @@
prop="houseType"
align="center"
width="100"
label="自有/租住"
label="房屋状态"
>
<template slot-scope="scope">
<span v-if="scope.row.houseType == 1">出租</span>

6
src/views/modules/base/community/buildForm.vue

@ -417,12 +417,16 @@ export default {
totalUnitNum: 1,//
totalFloorNum: 0,//
totalHouseNum: 0,//
realPerson: 0,
buildingLeaderName: '',//
buildingLeaderMobile: '',//
type: '',//
location: '', //
longitude: '', //
latitude: '' //
latitude: '', //
coding: '',
sysCoding: '',
coordinatePosition: ''
}
},
//

5
src/views/modules/base/community/communityForm.vue

@ -489,7 +489,10 @@ export default {
remark: '', //500
location: '', //
longitude: '', //
latitude: '' //
latitude: '', //
realBuilding: 0,
coding: '',
sysCoding: ''
}
this.propertyFormShow = false
},

4
src/views/modules/base/community/roomForm.vue

@ -391,7 +391,9 @@ export default {
ownerPhone: '', //
ownerName: '', //
ownerIdCard: '', //
remark: '' //
remark: '', //
coding: '',
sysCoding: ''
}
},

64
src/views/modules/base/epidemic/antiInfo.vue

@ -81,9 +81,6 @@
</el-form-item>
</div>
<div>
<el-form-item label="姓名"
prop="name">
<el-input v-model="searchForm.name"
@ -113,9 +110,17 @@
placeholder="请输入身份证">
</el-input>
</el-form-item>
<el-form-item label="年龄"
prop="age">
<inputRange v-model="searchForm.age"
type="num"
@change="handleAgeChange" />
</el-form-item>
<el-form-item label="疫苗接种针次"
style="margin-left:20px"
prop="vaccineCount">
<el-input v-model="searchForm.vaccineCount"
size="small"
@ -152,6 +157,7 @@
<el-table class="table"
:data="tableData"
border
ref="ref_table"
:height="tableHeight"
v-loading="tableLoading"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
@ -194,6 +200,12 @@
label="身份证号"
width="180">
</el-table-column>
<el-table-column prop="birthDay"
header-align="center"
align="center"
label="出生日期"
width="140">
</el-table-column>
<el-table-column prop="vaccineCount"
header-align="center"
align="center"
@ -480,6 +492,7 @@
<script>
import natForm from './natInfo/natForm'
import inputRange from '@/views/components/rangeInput.vue'
import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex'
@ -508,7 +521,10 @@ export default {
mobile: '',
idCard: '',
vaccineCount: '',
natCount: ''
natCount: '',
age: {},
startBirthDay: '',
endBirthDay: '',
},
formDetail: {
name: '',
@ -537,7 +553,7 @@ export default {
}
},
components: {
natForm
natForm, inputRange
},
async created () {
@ -554,8 +570,43 @@ export default {
await this.loadTable()
this.sHeight = this.$refs.div_search.offsetHeight + 230
},
activated () {
this.$refs['ref_table'].doLayout()
},
methods: {
handleAgeChange (val) {
console.log('val----age---', val)
if (val.start) {
const e = this.computedBirth(val.start)
this.searchForm.endBirthDay = e
} else {
this.searchForm.endBirthDay = ''
}
if (val.end) {
const s = this.computedBirth(val.end)
this.searchForm.startBirthDay = s
} else {
this.searchForm.startBirthDay = ''
}
},
computedBirth (age) {
let now = new Date();
let nowYear = now.getFullYear();
let nowMonth = now.getMonth() + 1;
let nowDay = now.getDate(); // daymonthmonthyearyear
let subYear = nowYear - age
if (nowMonth < 10) {
nowMonth = '0' + nowMonth
}
if (nowDay < 10) {
nowDay = '0' + nowDay
}
console.log(subYear + '-' + nowMonth + '-' + nowDay);
return subYear + '-' + nowMonth + '-' + nowDay
},
handleCnalceForm () {
this.$refs.detail_form.resetFields()
this.vaccineList = []
@ -828,6 +879,9 @@ export default {
this.searchForm.buildingId = ''
this.searchForm.unitId = ''
this.searchForm.houseId = ''
this.searchForm.age = {}
this.searchForm.startBirthDay = ''
this.searchForm.endBirthDay = ''
this.pageSize = 20
this.pageNo = 1
this.loadTable()

6
src/views/modules/base/epidemic/natInfo/natList.vue

@ -4,7 +4,7 @@
<el-form :inline="true"
:model="formData"
ref="ref_searchform"
:label-width="'90px'">
:label-width="'110px'">
<div>
<el-form-item label="信息范围">
<el-select class="list_item_width_1"
@ -332,6 +332,10 @@ export default {
await this.loadTable()
},
activated () {
this.$refs['ref_table'].doLayout()
},
methods: {
async handleSearch () {

63
src/views/modules/base/epidemic/vaccin.vue

@ -4,7 +4,7 @@
<el-form :inline="true"
:model="formData"
ref="ref_searchform"
:label-width="'90px'">
:label-width="'110px'">
<div>
<el-form-item label="信息范围">
<el-select class="list_item_width_1"
@ -92,9 +92,9 @@
</div>
<div class="div_table">
<div class="div_btn">
<!-- <el-button class="diy-button--add"
<el-button class="diy-button--add"
size="small"
@click="handleAdd">新增</el-button> -->
@click="handleAdd">新增</el-button>
<el-button style="float: left"
class="diy-button--export"
@ -183,7 +183,7 @@
<el-table-column label="操作"
fixed="right"
width="140"
width="240"
header-align="center"
align="center"
class="operate">
@ -198,7 +198,17 @@
class="div-table-button--edit"
size="small"
@click="handleAttention(scope.row)">同步</el-button>
<el-button v-if="isResiUser&&(scope.row.userType==='resi'||scope.row.userType==='icresi') &&scope.row.agencyId===agencyId"
type="text"
class="div-table-button--edit"
size="small"
@click="handleEdit(scope.row)">修改</el-button>
<el-button v-if="isResiUser&&(scope.row.userType==='resi'||scope.row.userType==='icresi') &&scope.row.agencyId===agencyId"
type="text"
class="div-table-button--delete "
size="small"
@click="handleDelete(scope.row)">删除</el-button>
<el-button v-if="
isResiUser &&
scope.row.userType === 'synchro' &&
@ -223,7 +233,7 @@
</div>
</div>
<!-- 修改弹出框 -->
<!-- 详情弹出框 -->
<el-dialog :visible.sync="formShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
@ -236,11 +246,24 @@
@dialogCancle="diaClose"
@dialogOk="addFormOk"></vaccinForm>
</el-dialog>
<el-dialog :visible.sync="addFormShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="formTitle"
width="850px"
top="5vh"
class="dialog-h"
@closed="addDiaClose">
<vaccinAdd ref="ref_form_add"
@dialogCancle="addDiaClose"
@dialogOk="addFormOk"></vaccinAdd>
</el-dialog>
</div>
</template>
<script>
import vaccinForm from "./vaccinForm";
import vaccinAdd from "./vaccinAdd";
import natForm from "./natInfo/natForm";
import { requestPost } from "@/js/dai/request";
@ -296,11 +319,14 @@ export default {
//form
formShow: false,
formTitle: "新增",
addFormShow: false,
};
},
components: {
vaccinForm,
natForm,
vaccinAdd
},
async created () { },
async mounted () {
@ -311,6 +337,9 @@ export default {
await this.loadTable();
},
activated () {
this.$refs["ref_table"].doLayout();
},
methods: {
async handleSearch () {
@ -370,6 +399,10 @@ export default {
this.$refs.ref_form.resetData();
this.formShow = false;
},
addDiaClose () {
this.addFormShow = false;
},
async handleDetail (row) {
this.formTitle = "详情";
@ -381,22 +414,24 @@ export default {
handleAdd () {
this.formTitle = "新增";
this.formShow = true;
this.addFormShow = true;
this.$nextTick(() => {
this.$refs.ref_form.initForm("add", null);
this.$refs.ref_form_add.initForm("add", null);
});
},
handleEdit (row) {
async handleEdit (row) {
this.formTitle = "修改";
this.formShow = true;
const row1 = { ...row }
let row2 = await this.getInfo(row1);
this.addFormShow = true;
this.$nextTick(() => {
this.$refs.ref_form.initForm("edit", row.icNatId);
this.$refs.ref_form_add.initForm("edit", row2);
});
},
addFormOk () {
this.formShow = false;
this.addFormShow = false;
this.loadTable();
},
@ -412,6 +447,7 @@ export default {
if (code === 0) {
row.mobile = data.mobile;
row.idCard = data.idCard;
row.isResiUser = data.isResiUser
}
return row;
},
@ -431,11 +467,10 @@ export default {
},
async deleteNat (row) {
const url = "/epmetuser/icNat/del";
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icNat/del"
const url = "/epmetuser/icVaccine/del";
let params = {
icNatId: row.icNatId,
vaccineId: row.vaccineId,
};
const { data, code, msg } = await requestPost(url, params);

571
src/views/modules/base/epidemic/vaccinAdd.vue

@ -0,0 +1,571 @@
<template>
<div class="epidemic-form">
<div class="dialog-h-content scroll-h">
<el-form ref="ref_form"
:inline="true"
:model="formData"
:rules="dataRule"
:disabled="formType==='detail'"
class="form">
<el-form-item v-if="formType==='add'"
label="录入方式"
label-width="150px"
style="display: block">
<el-radio-group v-model="enterType"
@change="handleChangeEnterType">
<el-radio :label="'1'">手动输入</el-radio>
<el-radio :label="'2'">选择居民</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="formType==='add'"
label="所属网格"
style="display: block"
label-width="150px">
<el-select class="item_width_2"
v-model.trim="formData.gridId"
placeholder="请选择"
:disabled="!isFromResi"
clearable>
<el-option v-for="item in gridList"
@click.native="handleSelGrid(item.value)"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item v-if="formType==='add'"
label="居民"
prop="userId"
style="display: block"
label-width="150px">
<el-select class="item_width_2"
v-model.trim="formData.userId"
placeholder="请选择"
filterable
:disabled="!isFromResi"
clearable>
<el-option v-for="item in personList"
@click.native="handleSelPerson(item)"
:key="item.demandUserId"
:label="item.demandUserName"
:value="item.demandUserId">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="姓名"
prop="name"
label-width="150px"
style="display: block">
<el-input class="item_width_2"
placeholder="请输入姓名"
clearable
:disabled="isFromResi"
v-model="formData.name">
</el-input>
</el-form-item>
<el-form-item label="手机号"
prop="mobile"
label-width="150px"
style="display: block">
<el-input class="item_width_2"
placeholder="请输入手机号"
clearable
:disabled="isFromResi"
v-model="formData.mobile">
</el-input>
</el-form-item>
<el-form-item label="身份证号"
prop="idCard"
label-width="150px"
style="display: block">
<el-input class="item_width_2"
placeholder="请输入身份证号"
clearable
:disabled="isFromResi"
v-model="formData.idCard">
</el-input>
</el-form-item>
<el-form-item label="接种时间"
style="display: block"
prop="inoculateTime"
label-width="150px">
<el-date-picker class="item_width_2"
v-model="formData.inoculateTime"
format="yyyy-MM-dd HH:mm"
value-format="yyyy-MM-dd HH:mm"
type="datetime"
:picker-options="pickerOptions"
clearable
placeholder="选择时间">
</el-date-picker>
</el-form-item>
<el-form-item label="接种地点"
prop="inoculateAddress"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
placeholder="请输入检测地点"
clearable
v-model="formData.inoculateAddress">
</el-input>
</el-form-item>
<el-form-item label="疫苗厂家"
prop="manufacturer"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
placeholder="请输入检测地点"
clearable
v-model="formData.manufacturer">
</el-input>
</el-form-item>
<div v-if=" formType!=='detail'">
<el-form-item label="通知渠道"
prop="isSelChannel"
label-width="150px"
style="display: block">
<el-checkbox v-model="formData.isSelChannel"
@change="handleChannelChange"
key="0"
label="0">小程序通知</el-checkbox>
<!-- <el-checkbox-group v-model="formData.channel">
<el-checkbox key="0"
label="0">小程序通知</el-checkbox>
<el-checkbox key="1"
label="1">短信通知</el-checkbox>
</el-checkbox-group> -->
</el-form-item>
<el-form-item v-if="formData.isSelChannel"
label="通知内容"
prop="content"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
type="textarea"
maxlength="500"
show-word-limit
:autosize="{ minRows: 5, maxRows: 10 }"
clearable
placeholder="请输入通知内容"
v-model="formData.content"></el-input>
</el-form-item>
</div>
</el-form>
</div>
<div class="form_div_btn">
<el-button size="small"
@click="handleCancle"> </el-button>
<el-button v-if="formType != 'detail'"
size="small"
type="primary"
:disabled="btnDisable"
@click="handleComfirm"> </el-button>
</div>
</div>
</template>
<script>
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
import { dateFormats } from '@/utils/index'
let loading //
export default {
data () {
return {
formType: 'add', // addeditdetail
enterType: '1',//1 2
isFromResi: false,//
gridList: [],
personList: [],
pickerOptions: { //
disabledDate (time) {
return time.getTime() > (Date.now())
}
},
btnDisable: false,
vaccineId: '',
formData: {
vaccineId: '',
agencyId: '',//Id
userId: '',//idicResiUserId
userType: 'icresi',//resi;icresi;import;synchro
isResiUser: "0",//(0: 1:)
name: '',
idCard: '',
mobile: '',
inoculateTime: '',
inoculateAddress: '',
manufacturer: '',
isSelChannel: false,
channel: [],
content: '',
},
}
},
components: {},
async mounted () {
const { user } = this.$store.state
this.agencyId = user.agencyId
//
await this.loadGrid()
},
methods: {
handleChannelChange (val) {
this.formData.content = ''
},
async initForm (type, row) {
this.startLoading()
this.formData.agencyId = this.agencyId
this.$refs['ref_form'].resetFields();
this.isFromResi = false
this.enterType = '1'
this.formType = type
if (row) {
if (row.userId) {
this.isFromResi = true
}
row.content = ''
row.isSelChannel = false
row.channel = []
this.formData = { ...row }
}
this.endLoading()
},
handleChangeEnterType (value) {
this.formData.name = ''
this.formData.mobile = ''
this.formData.idCard = ''
this.formData.gridId = ''
this.formData.userId = ''
this.$refs['ref_form'].resetFields();
if (value === '2') {
this.formData.isResiUser = "1"
this.isFromResi = true
} else {
this.formData.isResiUser = "0"
this.isFromResi = false
}
},
async loadGrid () {
const url = "/gov/org/customergrid/gridoption"
let params = {
agencyId: this.agencyId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.gridList = data
} else {
this.$message.error(msg)
}
},
async handleSelGrid (value) {
const url = "/epmetuser/icresiuser/demandusers"
let params = {
agencyId: this.agencyId,
gridId: value
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.personList = data
} else {
this.$message.error(msg)
}
},
async handleSelPerson (personItem) {
this.formData.userId = personItem.demandUserId
this.formData.name = personItem.demandUserName
this.formData.mobile = personItem.demandUserMobile
this.formData.idCard = personItem.idCard
},
async loadFormData () {
const url = '/epmetuser/icNat/detail'
let params = {
vaccineId: this.vaccineId,
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.formData = data
this.formData.channel = []
this.formData.content = ''
// if (data.channel && data.channel.length > 0) {
// this.$set(this.formData, 'isSelChannel', true)
// // this.formData.isSelChannel = true
// } else {
// this.$set(this.formData, 'isSelChannel', false)
// // this.formData.isSelChannel = false
// this.formData.channel = []
// this.formData.content = ''
// }
console.log(this.formData.isSelChannel)
this.formData.vaccineId = this.vaccineId
if (this.formData.userId) {
this.isFromResi = true
} else {
this.isFromResi = false
}
} else {
this.$message.error(msg)
}
},
handleComfirm () {
this.$refs['ref_form'].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj)
} else {
this.addVaccin()
}
})
},
async addVaccin () {
const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //
if (regPhone.test(this.formData.mobile) === false) {
this.btnDisable = false
this.$message({
type: 'warning',
message: '请输入正确的手机号码'
})
return false;
}
const regCard = /(^\d{15}$)|(^\d{17}(\d|X)$)/; //1518151817X
if (regCard.test(this.formData.idCard) === false) {
this.btnDisable = false
this.$message({
type: 'warning',
message: '请输入正确的身份证号码'
})
return false;
}
if (this.formData.isSelChannel) {
if (!this.formData.content) {
this.$message({
type: 'warning',
message: '请填写通知内容'
})
return false;
} else {
this.formData.channel = ['0']
}
} else {
this.formData.channel = []
this.formData.content = ''
}
this.btnDisable = true
setTimeout(() => {
this.btnDisable = false
}, 5000)
let url = ''
if (this.formType === 'add') {
url = '/epmetuser/icVaccine/add'
this.formData.vaccineId = ''
} else {
url = '/epmetuser/icVaccine/edit'
}
const { data, code, msg } = await requestPost(url, this.formData)
if (code === 0) {
this.$message({
type: 'success',
message: '操作成功'
})
this.$emit('dialogOk')
this.resetData()
this.btnDisable = false
} else {
this.btnDisable = false
this.$message.error(msg)
}
},
handleCancle () {
this.resetData()
this.$emit('dialogCancle')
},
resetData () {
this.vaccineId = ''
this.formData = {
vaccineId: '',
agencyId: '',//Id
userId: '',//idicResiUserId
userType: 'icresi',//resi;icresi;import;synchro
isResiUser: "0",//(0: 1:)
name: '',
idCard: '',
mobile: '',
inoculateTime: '',
inoculateAddress: '',
manufacturer: '',
isSelChannel: false,
channel: [],
content: '',
}
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
dataRule () {
return {
name: [
{ required: true, message: '姓名不能为空', trigger: 'change' }
],
idCard: [
{ required: true, message: '身份证号不能为空', trigger: 'change' }
],
mobile: [
{ required: true, message: '手机号不能为空', trigger: 'change' },
],
inoculateTime: [
{ required: true, message: '接种时间不能为空', trigger: 'change' },
],
// inoculateAddress: [
// { required: true, message: '', trigger: 'change' },
// ],
// manufacturer: [
// { required: true, message: '', trigger: 'change' },
// ],
isSelChannel: [
{ required: false },
],
channel: [
{ required: false },
],
content: [
{ required: false },
],
}
},
},
props: {
// serviceList: {
// type: Array,
// default: []
// },
}
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/management/epidemic.scss";
</style>
<style lang='scss'>
//
.hide .el-upload--picture-card {
display: none;
}
// /
.el-upload-list__item {
transition: none !important;
}
</style>

95
src/views/modules/base/epidemic/veroFocus/veroFocusAdd.vue

@ -128,6 +128,7 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="疫苗接种次数小于"
label-width="150px">
<el-input-number class="item_width_3"
@ -137,6 +138,31 @@
:max="20"
label="疫苗接种次数小于"></el-input-number>
</el-form-item>
<el-form-item label="接种时间"
label-width="80px"
prop="startDate">
<el-date-picker v-model="startDate"
:picker-options="startPickerOptions"
class="item_width_3"
size="mini"
type="date"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="开始时间">
</el-date-picker>
<span class="data-tag"></span>
<el-date-picker v-model="endDate"
:picker-options="endPickerOptions"
class="item_width_3 data-tag"
size="mini"
type="date"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="结束时间">
</el-date-picker>
</el-form-item>
<el-button style="margin-left:30px"
size="mini"
class="diy-button--search"
@ -182,19 +208,27 @@
header-align="center"
align="center"
label="身份证"
min-width="170">
width="150">
</el-table-column>
<el-table-column prop="houseName"
header-align="center"
align="center"
:show-overflow-tooltip="true"
label="所属房屋"
min-width="170">
</el-table-column>
<el-table-column prop="vaccineCount"
header-align="center"
align="center"
label="疫苗接种次数"
min-width="100">
label="接种次数"
width="80">
</el-table-column>
<el-table-column prop="createdTime"
header-align="center"
align="center"
:show-overflow-tooltip="true"
label="接种时间"
width="140">
</el-table-column>
</el-table>
@ -323,6 +357,21 @@ import { mapGetters } from 'vuex'
let loading //
export default {
data () {
let endDisabledDate = (time) => {//datareturn
let nowData = Date.now()
if (this.startDate) {
let startDate = new Date(this.startDate)
return time.getTime() > nowData || time.getTime() < startDate || time.getTime() === startDate
} else {
return time.getTime() > nowData
}
}
let startDisabledDate = (time) => {//datareturn
let nowData = Date.now()
return time.getTime() > nowData
}
return {
activeName: "first",
@ -331,10 +380,21 @@ export default {
btnDisable: false,
startDate: '',
endDate: '',
formDataSearch: {
gridId: '',
vaccineCount: undefined,
attentionType: 1
attentionType: 1,
startDate: '',
endDate: ''
},
endPickerOptions: {
disabledDate: endDisabledDate
},
startPickerOptions: {
disabledDate: startDisabledDate
},
formData1: {
@ -374,6 +434,7 @@ export default {
this.agencyId = user.agencyId
//
await this.loadGrid()
// this.loadTable()
},
methods: {
@ -384,7 +445,7 @@ export default {
this.formData2.content = ''
},
async initForm () {
this.tableData = []
// this.loadTable()
this.$refs['ref_form1'].resetFields();
this.$refs['ref_form2'].resetFields();
@ -400,6 +461,20 @@ export default {
async loadTable () {
this.tableLoading = true
if (this.startDate) {
let array = this.startDate.split('-')
this.formDataSearch.startDate = array[0] + array[1] + array[2]
} else {
this.formDataSearch.startDate = ''
}
if (this.endDate) {
let array = this.endDate.split('-')
this.formDataSearch.endDate = array[0] + array[1] + array[2]
} else {
this.formDataSearch.endDate = ''
}
const url = "/epmetuser/epidemicPrevention/user-list"
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/epidemicPrevention/page"
let params = {
@ -670,10 +745,14 @@ export default {
},
resetSearch () {
this.startDate = ''
this.endDate = ''
this.formDataSearch = {
gridId: '',
vaccineCount: undefined,
attentionType: 1
attentionType: 1,
startDate: '',
endDate: ''
}
},
@ -782,6 +861,10 @@ export default {
<style lang="scss" scoped >
@import "@/assets/scss/modules/management/epidemic.scss";
.data-tag {
margin-left: 10px;
}
</style>

6
src/views/modules/base/epidemic/veroFocus/veroFocusList.vue

@ -756,14 +756,14 @@ export default {
async deleteFocus (row) {
const url = "/epmetuser/icEpidemicSpecialAttention/cancel-attention";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolteam/del"
let idCards = [];
let ids = [];
this.selectionAll.forEach((element) => {
idCards.push(element.idCard);
ids.push(element.id);
});
let params = {
attentionType: 1,
idCards: idCards,
ids: ids,
};
const { data, code, msg } = await requestPost(url, params);

4529
src/views/modules/base/organization/organization.vue

File diff suppressed because it is too large

22
src/views/modules/communityParty/article/drafts.vue

@ -25,7 +25,7 @@
>
<template v-slot:editOperateSup="{ id, formType, info }">
<el-button
v-if="formType != 'watch'"
v-if="formType != 'watch' && info.richTextFlag == '1'"
type="warning"
size="small"
:disabled="draftBtnDisable"
@ -56,7 +56,7 @@ export default {
field: "创建时间",
keyName: "createdTime",
type: "date-range",
supKeys: ["startTime", "endTime"],
supKeys: ["startDate", "endDate"],
supValues: ["", ""],
},
],
@ -102,11 +102,13 @@ export default {
keyName: "imgArr",
type: "upload",
limit: 1,
listType: "picture-card",
editDisabled: true,
rules: [],
value: [],
value: () => [],
uploadUrl: window.SITE_CONFIG["apiURL"] + "/oss/file/article/upload",
supKeys: ["imgUrlArr", "imgUrl"],
supValues: [[], ""],
supValues: [() => [], ""],
beforeImgUpload(file, item, that) {
console.log(file);
const isLt1M = file.size / 1024 / 1024 < 10;
@ -129,7 +131,7 @@ export default {
type: "cascader",
value: [],
supKeys: ["publishRangeDesc"],
supValues: [[]],
supValues: [""],
optionUrl: "/gov/org/customeragency/agencygridtree",
optionUrlParams: {
agencyId: this.$store.state.user.agencyId,
@ -217,8 +219,8 @@ export default {
label: "以组织名义",
optionList: [
{
label: agencyId,
value: agencyName,
label: agencyName,
value: agencyId,
type: "agency",
},
],
@ -310,6 +312,7 @@ export default {
},
editElseRules: {},
editConfig: {
confirmBtnName: "发布",
cookInfoFn(data) {
if (data.richTextFlag == "0") {
data.content = data.contentList
@ -326,7 +329,10 @@ export default {
})
.join(" ");
} else {
data.content = data.contentList[0].content;
data.content =
Array.isArray(data.contentList) && data.contentList.length > 0
? data.contentList[0].content
: "";
}
if (data.imgUrl) {
data.imgArr = [

9
src/views/modules/communityParty/article/index.vue

@ -151,6 +151,8 @@ export default {
"agencyId",
"subAgencyList"
)[vals.length - 1]["level"];
item["supValues"][1] =
item["supValues"][1] == "grid" ? "grid" : "agency";
} else {
item["supValues"][0] = "";
item["supValues"][1] = "";
@ -161,7 +163,7 @@ export default {
field: "发布时间",
keyName: "publishTime",
type: "date-range",
supKeys: ["startTime", "endTime"],
supKeys: ["startDate", "endDate"],
supValues: ["", ""],
},
],
@ -221,9 +223,11 @@ export default {
keyName: "imgArr",
type: "upload",
limit: 1,
listType: "picture-card",
editDisabled: true,
rules: [],
value: () => [],
uploadUrl: window.SITE_CONFIG["apiURL"] + "/oss/file/article/upload",
supKeys: ["imgUrlArr", "imgUrl"],
supValues: [() => [], ""],
beforeImgUpload(file, item, that) {
@ -248,7 +252,7 @@ export default {
type: "cascader",
value: () => [],
supKeys: ["publishRangeDesc"],
supValues: [() => []],
supValues: [""],
optionUrl: "/gov/org/customeragency/agencygridtree",
optionUrlParams: {
agencyId: this.$store.state.user.agencyId,
@ -429,6 +433,7 @@ export default {
},
editElseRules: {},
editConfig: {
confirmBtnName: "发布",
cookInfoFn(data) {
if (data.richTextFlag == "0") {
data.content = data.contentList

8
src/views/modules/communityParty/heart/heartAudit.vue

@ -32,7 +32,7 @@
align="center"
label="姓名"
:show-overflow-tooltip="true"
width="150">
min-width="100">
</el-table-column>
<el-table-column prop="mobile"
@ -47,7 +47,7 @@
header-align="center"
align="center"
label="身份证"
min-width="180">
width="180">
</el-table-column>
<el-table-column prop="nickName"
@ -55,7 +55,7 @@
align="center"
label="昵称"
:show-overflow-tooltip="true"
width="120">
min-width="100">
</el-table-column>
<el-table-column prop="signUpActNum"
@ -90,7 +90,7 @@
header-align="center"
align="center"
label="状态"
width="120">
width="90">
</el-table-column>

14
src/views/modules/communityParty/heart/heartFinish.vue

@ -3,9 +3,10 @@
<div>
<el-form ref="ref_form"
:inline="false"
:label-position="'left'"
:model="formData"
:rules="dataRule"
class="div_form ">
class="div_form mgl10">
<el-form-item label="实际活动时间"
label-width="150px"
style="display: block"
@ -98,7 +99,7 @@
header-align="center"
align="center"
label="理由"
min-width="350">
min-width="320">
<template slot-scope="scope">
@ -359,10 +360,17 @@ export default {
.div_table {
display: flex;
justify-content: center;
justify-content: flex-start;
.m_table {
flex: 0 0 1200px;
// padding: 20px;
}
}
.div_form {
width: 90%;
margin-top: 20px;
}
.mgl10 {
margin-left: 20px;
}
</style>

49
src/views/modules/communityParty/heart/heartForm.vue

@ -50,6 +50,7 @@
:action="uploadUlr"
list-type="picture-card"
:on-exceed="exceedPic"
:before-upload="beforeAvatarUpload"
:on-remove="removePic"
:file-list="replayImgList"
:on-change="handleEditChange"
@ -84,7 +85,8 @@
prop="actQuota"
style="display: block"
label-width="150px">
<el-input-number class="item_width_6"
<el-input-number class="item_width_2"
:min="0"
v-model="formData.actQuota"
label="活动人数"></el-input-number>
</el-form-item>
@ -93,7 +95,8 @@
prop="reward"
style="display: block"
label-width="150px">
<el-input-number class="item_width_6"
<el-input-number class="item_width_2"
:min="0"
v-model="formData.reward"
label="活动积分"></el-input-number>
</el-form-item>
@ -102,7 +105,7 @@
label-width="150px"
style="display: block">
<el-input class="item_width_6"
maxlength="10"
maxlength="20"
placeholder="请输入联系人"
v-model="formData.sponsorContacts">
</el-input>
@ -115,7 +118,7 @@
label-width="150px"
style="display: block">
<el-input class="item_width_6"
maxlength="10"
maxlength="20"
placeholder="请输入联系电话"
v-model="formData.sponsorTel">
</el-input>
@ -141,7 +144,7 @@
style="display: block"
prop="signUpEndTime"
label-width="150px">
<el-date-picker class="item_width_6"
<el-date-picker class="item_width_2"
v-model="formData.signUpEndTime"
value-format="yyyy-MM-dd HH:mm"
format="yyyy-MM-dd HH:mm"
@ -158,7 +161,7 @@
type="textarea"
maxlength="200"
show-word-limit
:rows="5"
:rows="7"
placeholder="请输入报名条件,不超过200字"
v-model="formData.requirement"></el-input>
</el-form-item>
@ -187,7 +190,8 @@
prop="signInRadius"
style="display: block"
label-width="150px">
<el-input-number class="item_width_6"
<el-input-number class="item_width_2"
:min="0"
v-model="formData.signInRadius"
label="签到有效范围"></el-input-number>
</el-form-item>
@ -407,7 +411,7 @@ export default {
actId: "",
actLatitude: null,
actLongitude: null,
actQuota: undefined,
actQuota: 0,
actStartTime: "",
actType: "heart",
@ -418,13 +422,13 @@ export default {
noticePassedPeople: false,
requirement: "",
reward: undefined,
reward: 0,
signInAddress: "",
signInEndTime: "",
signInLatitude: null,
signInLongitude: null,
signInRadius: undefined,
signInRadius: 200,
signInStartTime: "",
signUpEndTime: "",
sponsorContacts: "",
@ -457,7 +461,6 @@ export default {
},
// oss/file/uploadvariedfile
dialogImageUrl: 'oss/file/uploadvariedfile',
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadvariedfile',
// upload_url: '', // URL
upload_name: '', //
@ -703,6 +706,16 @@ export default {
this.$message.warning("只能上传1张封面图")
},
beforeAvatarUpload (file) {
const isJPG = file.type === 'image/jpeg';
const isLt2M = file.size / 1024 / 1024 < 10;
if (!isLt2M) {
this.$message.error('上传图片大小不能超过 10MB!');
}
return isLt2M;
},
handleSuccess (response, file, fileList) {
this.replayImgList.push(file)
this.formData.coverPic = response.data.url
@ -901,7 +914,7 @@ export default {
actId: "",
actLatitude: null,
actLongitude: null,
actQuota: undefined,
actQuota: 0,
actStartTime: "",
actType: "heart",
@ -912,13 +925,13 @@ export default {
noticePassedPeople: false,
requirement: "",
reward: undefined,
reward: 0,
signInAddress: "",
signInEndTime: "",
signInLatitude: null,
signInLongitude: null,
signInRadius: undefined,
signInRadius: 200,
signInStartTime: "",
signUpEndTime: "",
sponsorContacts: "",
@ -1020,11 +1033,15 @@ export default {
}
.text_p {
width: 1000px;
margin: 0 0;
border: 3px;
> p {
margin: 0 0;
p {
margin: 0;
padding: 0;
-webkit-margin-start: 0;
-webkit-margin-end: 0;
}
}
.div_content {

25
src/views/modules/communityParty/heart/heartList.vue

@ -10,7 +10,7 @@
prop="title">
<el-input v-model="formData.title"
size="small"
class="item_width_1"
class="item_width_3"
clearable
placeholder="请输入活动标题">
</el-input>
@ -42,7 +42,7 @@
<el-form-item label="状态"
prop="status">
<el-select class="item_width_1"
<el-select class="item_width_3"
v-model="formData.status"
size="small"
placeholder="请选择"
@ -88,11 +88,13 @@
header-align="center"
align="center"
label="活动标题"
:show-overflow-tooltip="true"
min-width="180">
</el-table-column>
<el-table-column prop="actAddress"
header-align="center"
align="center"
:show-overflow-tooltip="true"
label="活动地址"
min-width="180">
</el-table-column>
@ -100,6 +102,7 @@
<el-table-column prop="actStartTime"
header-align="center"
align="center"
:show-overflow-tooltip="true"
label="活动时间"
min-width="180">
<template slot-scope="scope">
@ -110,6 +113,7 @@
<el-table-column prop="signUpEndTime"
header-align="center"
align="center"
:show-overflow-tooltip="true"
label="报名截止时间"
min-width="110">
</el-table-column>
@ -117,18 +121,20 @@
header-align="center"
align="center"
label="状态"
:show-overflow-tooltip="true"
min-width="100">
</el-table-column>
<el-table-column prop="richTextFlagShow"
header-align="center"
align="center"
label="来源"
:show-overflow-tooltip="true"
width="100">
</el-table-column>
<el-table-column label="操作"
fixed="right"
width="240"
width="220"
header-align="center"
align="center"
class="operate">
@ -266,7 +272,7 @@
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'报名审核'"
width="1450px"
width="90%"
top="5vh"
class="dialog-h"
@closed="auditDiaClose">
@ -278,11 +284,12 @@
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'查看人员'"
width="1550px"
width="90%"
top="5vh"
class="dialog-h"
@closed="personDiaClose">
<heart-person ref="ref_person"
@personDiaClose="personDiaClose"
:status="status"></heart-person>
</el-dialog>
@ -291,7 +298,7 @@
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'活动结束'"
width="1350px"
width="1250px"
top="5vh"
class="dialog-h"
@closed="finishDiaClose">
@ -308,7 +315,7 @@
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'活动回顾'"
width="1350px"
width="1150px"
top="5vh"
class="dialog-h"
@closed="reviewDiaClose">
@ -586,6 +593,10 @@ export default {
this.personShow = false//
},
personDiaClose () {
this.personShow = false//
},
finishDiaClose () {
this.finishShow = false//

24
src/views/modules/communityParty/heart/heartPerson.vue

@ -22,14 +22,14 @@
align="center"
label="姓名"
:show-overflow-tooltip="true"
width="150">
min-width="100">
</el-table-column>
<el-table-column prop="mobile"
header-align="center"
align="center"
label="手机"
min-width="120">
width="120">
</el-table-column>
@ -37,7 +37,7 @@
header-align="center"
align="center"
label="身份证"
min-width="180">
width="180">
</el-table-column>
<el-table-column prop="nickName"
@ -45,7 +45,7 @@
align="center"
label="昵称"
:show-overflow-tooltip="true"
width="120">
min-width="100">
</el-table-column>
<el-table-column prop="signUpActNum"
@ -82,7 +82,7 @@
header-align="center"
align="center"
label="是否签到"
width="100">
width="90">
</el-table-column>
<el-table-column v-if="status==='finished'"
@ -90,20 +90,25 @@
header-align="center"
align="center"
label="是否给分"
width="100">
width="90">
</el-table-column>
<el-table-column prop="statusShow"
header-align="center"
align="center"
label="状态"
width="120">
width="90">
</el-table-column>
</el-table>
</div>
<div class="div_btn">
<el-button size="small"
@click="handleCancle"> </el-button>
</div>
</div>
</template>
@ -220,6 +225,9 @@ export default {
this.cancleShow = true
},
handleCancle () {
this.$emit('personDiaClose')
},
//
startLoading () {
@ -278,6 +286,6 @@ export default {
.div_btn {
margin-top: 10px;
display: flex;
justify-content: flex-end;
justify-content: center;
}
</style>

1
src/views/modules/communityService/fuwujilu/fuwuList.vue

@ -280,6 +280,7 @@ export default {
data () {
let endDisabledDate = (time) => {//datareturn
let nowData = Date.now()
if (this.formData.serviceTimeStart) {
let serviceTimeStart = new Date(this.formData.serviceTimeStart)
return time.getTime() > nowData || time.getTime() < serviceTimeStart || time.getTime() === serviceTimeStart

93
src/views/modules/cpts/base/cpts/edit.vue

@ -122,6 +122,7 @@
:multiple="item.multiple || false"
:filterable="item.filterable || false"
:allowCreate="item.allowCreate || false"
:collapse-tags="item.collapseTags || false"
default-first-option
@change="(e) => handleChangeSelect(e, item)"
>
@ -183,6 +184,7 @@
:options="item.optionList"
:props="item.optionProps || {}"
:show-all-levels="false"
:collapse-tags="item.collapseTags || false"
size="small"
clearable
class="item-select"
@ -198,24 +200,24 @@
"
ref="upload"
class="avatar-uploader"
:action="uploadUrl"
:class="{ 'z-full': fmData[item.keyName].length >= item.limit }"
:action="item.uploadUrl || uploadUrl"
:data="{ customerId: customerId }"
:show-file-list="true"
:list-type="item.listType || 'picture'"
:limit="item.limit || 100"
:file-list="fmData[item.keyName]"
:on-success="(res, file) => handleImgSuccess(res, file, item)"
:on-error="(res, file) => handleImgError(res, file, item)"
:on-remove="(res) => handleImgRemove(res, item)"
:on-exceed="(res) => handleImgExceed(res, item)"
:before-upload="(file) => beforeImgUpload(file, item)"
>
<a
><i class="el-icon-plus avatar-uploader-icon"></i> 点击上传</a
>
<a><i class="el-icon-plus"></i> 点击上传</a>
</el-upload>
<el-image
v-else-if="fmData[item.keyName].length > 0"
style="width: 100px; height: 50px"
style="width: 100px; height: 100px"
:src="fmData[item.keyName][0].url"
fit="cover"
:preview-src-list="fmData[item.keyName].map((item) => item.url)"
@ -268,14 +270,16 @@
</el-form>
<div class="div_btn resi-btns" v-if="!formBtnFixed">
<el-button size="small" @click="handleCancle"> </el-button>
<el-button size="small" @click="handleCancle">{{
editConfig.cancelBtnName || "取消"
}}</el-button>
<el-button
v-if="formType != 'watch'"
type="primary"
size="small"
:disabled="btnDisable"
@click="handleComfirm"
> </el-button
>{{ editConfig.confirmBtnName || "确定" }}</el-button
>
<slot
name="operateSup"
@ -294,14 +298,16 @@
</div>
<div class="div_btn resi-btns" v-if="formBtnFixed">
<el-button size="small" @click="handleCancle"> </el-button>
<el-button size="small" @click="handleCancle">{{
editConfig.cancelBtnName || "取消"
}}</el-button>
<el-button
v-if="formType != 'watch'"
type="primary"
size="small"
:disabled="btnDisable"
@click="handleComfirm"
> </el-button
>{{ editConfig.confirmBtnName || "确定" }}</el-button
>
<slot
name="operateSup"
@ -429,12 +435,43 @@ export default {
iniFmData() {
const { editParams, fmData, editParamsDiv } = this;
editParams.forEach((item, index) => {
fmData[item.keyName] =
typeof item.value == "function" ? item.value() : "";
if (typeof item.value == "function") {
fmData[item.keyName] = item.value();
} else if (
typeof item.value == "string" ||
typeof item.value == "number" ||
typeof item.value == "boolean"
) {
fmData[item.keyName] = item.value;
} else if (typeof item.value == "undefined") {
fmData[item.keyName] = "";
} else {
fmData[item.keyName] = item.value || "";
console.error(
"不应该直接传入数组或对象的值,这样会导致传入的值被子组件修改。editParams-------------cpts/base/cpts/edit.vue",
item
);
}
if (item.supValues) {
item.supValues.forEach((value, index) => {
fmData[item.supKeys[index]] =
typeof value == "function" ? value() : "";
if (typeof value == "function") {
fmData[item.supKeys[index]] = value();
} else if (
typeof value == "string" ||
typeof value == "number" ||
typeof value == "boolean"
) {
fmData[item.supKeys[index]] = value;
} else if (typeof value == "undefined") {
fmData[item.supKeys[index]] = "";
} else {
fmData[item.supKeys[index]] = value;
console.error(
"不应该直接传入数组或对象的值,这样会导致传入的值被子组件修改。editParams-------------cpts/base/cpts/edit.vue",
item
);
}
});
}
@ -504,7 +541,7 @@ export default {
beforeImgUpload(file, item) {
if (typeof item.beforeImgUpload == "function") {
return item.beforeImgUpload(file, item, this);
if (!item.beforeImgUpload(file, item, this)) return false;
}
return true;
},
@ -532,7 +569,7 @@ export default {
},
handleImgExceed(res, item) {
console.log(e);
console.log(res);
// this.$message({
// type: "warning",
// message: "",
@ -575,6 +612,10 @@ export default {
}
},
handleImgError(res, file, item) {
console.log(res);
},
// init
initMap(item) {
let { latitude, longitude } = this.$store.state.user;
@ -690,6 +731,7 @@ export default {
let { data, code, msg } = await requestPost(url, params);
if (code === 0) {
const { editConfig } = this;
console.log("xxxxxxxxxxxxxxxxxxxxxx", editConfig);
if (editConfig && typeof editConfig.cookInfoFn == "function") {
data = editConfig.cookInfoFn(data);
}
@ -874,7 +916,28 @@ export default {
}
}
}
.avatar-uploader {
&.z-full {
/deep/ .el-upload.el-upload--picture-card {
display: none !important;
}
}
a {
display: flex;
align-items: center;
justify-content: center;
color: #65a5f9;
i {
margin-right: 4px;
color: #65a5f9;
font-size: 18px;
}
&:hover {
text-decoration: none;
}
}
}
.item-rich-text {
width: 600px;
height: 500px;

31
src/views/modules/cpts/base/index.vue

@ -93,10 +93,7 @@
</el-form>
</div>
<div
class="div_table"
:style="{ height: maxTableHeight + 130 + 'px' }"
>
<div class="div_table" :style="{ height: maxTableHeight + 130 + 'px' }">
<div class="div_btn">
<el-button
class="diy-button--add"
@ -142,6 +139,7 @@
</div>
<el-table
ref="ref_table"
:data="tableData"
border
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }"
@ -365,7 +363,7 @@ export default {
},
editBtnName: {
type: Function,
default: () => "编辑",
default: () => "修改",
},
delAuth: {
type: Function,
@ -447,6 +445,11 @@ export default {
this.computeSearchHeight();
},
activated() {
console.log("-------------activated");
this.$refs["ref_table"].doLayout();
},
methods: {
computeSearchHeight() {
this.ref_search_height = this.$refs["ref_search"].clientHeight;
@ -512,6 +515,7 @@ export default {
}
return fileType && isLt1M;
},
async uploadHttpRequest(file) {
let { importUrl: url } = this;
if (!url) return;
@ -722,8 +726,23 @@ export default {
},
resetSearch() {
console.log("----------------resetSearch", this.searchParams);
this.searchParams.forEach((item) => {
item.value = "";
if (typeof item.value == "string") {
item.value = "";
} else if (Array.isArray(item.value)) {
item.value = [];
}
if (item.supValues) {
item.supValues = item.supValues.map((value, index) => {
if (typeof value == "string") {
return "";
} else if (Array.isArray(value)) {
return [];
}
return value;
});
}
});
},
},

23
src/views/modules/plugins/change/verify.vue

@ -287,14 +287,17 @@
>查看</el-button
>
<el-button
v-if="scope.row.confirmResult == '未审核'"
@click="handleEdit(scope.row)"
type="text"
size="small"
class="div-table-button--edit"
>审核</el-button
>
<template v-if="filterEdit(scope.row.agencyId)">
<el-button
v-if="scope.row.confirmResult == '未审核'"
@click="handleEdit(scope.row)"
type="text"
size="small"
class="div-table-button--edit"
>审核</el-button
>
</template>
</template>
</el-table-column>
@ -447,6 +450,10 @@ export default {
console.log('searchH----', this.$refs.searchCard.$el.offsetHeight)
},
methods: {
filterEdit (id) {
const { user } = this.$store.state
return id === user.agencyId
},
handleClearVillage() {
this.fmData.buildId = ''
this.fmData.homeId = ''

105
src/views/modules/plugins/change/verifyForm.vue

@ -34,7 +34,7 @@
{{ detailInfo.villageName + detailInfo.buildName + detailInfo.unitName + detailInfo.homeName }}
</span>
</el-form-item>
<el-divider></el-divider>
<!-- <el-divider></el-divider> -->
<!-- <el-form-item
label="迁出类型:"
label-width="150px"
@ -63,12 +63,12 @@
>
<span>{{ detailInfo.xxdz }}</span>
</el-form-item> -->
<el-form-item
<!-- <el-form-item
label="移除时间:"
label-width="150px"
>
<span>{{ detailInfo.moveOutDate }}</span>
</el-form-item>
</el-form-item> -->
<el-form-item
label="移除原因:"
label-width="150px"
@ -85,7 +85,7 @@
{ required: true, message: '请选择审核结果', trigger: 'blur' },
]"
>
<el-input v-if="btnType == 'detail' && confirmResult == ''" value="未审核"></el-input>
<el-input v-if="btnType == 'detail' && confirmResult == ''" value="未审核" style="width: 200px;"></el-input>
<el-select
v-else
v-model.trim="confirmResult"
@ -95,7 +95,7 @@
class="item_width_1"
>
<el-option label="通过" value="1" />
<el-option label="未通过" value="2" />
<el-option label="驳回" value="2" />
</el-select>
</el-form-item>
<el-form-item
@ -104,10 +104,23 @@
>
<span style="color: red; font-size: 12px;">当前人员已不在该房屋</span>
</el-form-item>
<el-form-item
v-if="confirmResult == 1"
label="同时迁至其他房屋:"
label-width="150px"
>
<el-radio-group v-model="isMoveOut">
<el-radio :label="1">需要</el-radio>
<el-radio :label="0">不需要</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
v-if="confirmResult == 2"
label="审核备注:"
label="驳回原因:"
label-width="150px"
:rules="[
{ required: true, message: '请填写驳回原因', trigger: 'blur' },
]"
>
<el-input type="textarea" v-model="reason" style="width: 300px;"></el-input>
</el-form-item>
@ -126,9 +139,35 @@
</el-form-item>
</template> -->
</el-form>
<el-form v-if="btnType == 'detail' && isMoveOut == 1" :model="detailInfo">
<template>
<el-form-item
label="迁往区域:"
label-width="150px"
>
<span>{{ detailInfo.newGridName }}</span>
</el-form-item>
<el-form-item
label="迁至房屋:"
label-width="150px"
>
<span>{{ detailInfo.newHomeName }}</span>
</el-form-item>
</template>
<el-form-item
label="迁出时间:"
label-width="150px"
>
<span>{{ detailInfo.moveOutDate }}</span>
</el-form-item>
</el-form>
<el-form
v-if="confirmResult == 1 && btnType == 'edit' && detailInfo.isInHome"
v-if="isMoveOut == 1 && btnType == 'edit' && detailInfo.isInHome"
ref="ref_form"
:inline="false"
:model="dataForm"
@ -160,7 +199,7 @@
</el-date-picker>
</el-form-item>
<el-form-item
<!-- <el-form-item
label="迁出类型:"
prop="type"
label-width="150px"
@ -172,9 +211,9 @@
}}</el-radio>
<el-radio :label="'out'">其他</el-radio>
</el-radio-group>
</el-form-item>
</el-form-item> -->
<div v-if="dataForm.type === 'in'">
<div v-if="isMoveOut == 1">
<el-form-item label="迁出至" prop="agencyId" label-width="150px">
<el-cascader
ref="myCascader"
@ -256,7 +295,7 @@
</div>
</el-form-item>
</div>
<div v-if="dataForm.type === 'out'">
<!-- <div v-if="dataForm.type === 'out'">
<el-form-item label="外迁详细地址:" prop="address" label-width="150px">
<el-input
type="textarea"
@ -269,7 +308,7 @@
>
</el-input>
</el-form-item>
</div>
</div> -->
<el-form-item label="迁出原因:" prop="reason" label-width="150px">
<el-input
type="textarea"
@ -339,6 +378,7 @@ export default {
unitList: [],
roomList: [],
confirmResult: '',
isMoveOut: 0,
reason: '',
dataForm: {
icUserId: '', // ID
@ -396,18 +436,18 @@ export default {
computed: {
dataRule() {
return {
type: [
{ required: true, message: '操作类型不能为空', trigger: 'blur' }
],
// type: [
// { required: true, message: '', trigger: 'blur' }
// ],
agencyId: [
{ required: true, message: '所选组织不能为空', trigger: 'blur' }
],
villageId: [
{ required: true, message: '所属家庭不能为空', trigger: 'blur' }
],
address: [
{ required: true, message: '外迁详细地址不能为空', trigger: 'blur' }
],
// address: [
// { required: true, message: '', trigger: 'blur' }
// ],
outOfTime: [
{ required: true, message: '迁出时间不能为空', trigger: 'blur' }
]
@ -416,6 +456,7 @@ export default {
},
methods: {
async initForm(row) {
console.log('store----', this.$store.state)
this.customerId = localStorage.getItem('customerId')
// this.$refs.ref_form.resetFields()
@ -449,10 +490,11 @@ export default {
if (row.isInHome) {
this.confirmResult = (row.confirmResult == '1' || row.confirmResult == '2') ? row.confirmResult : ''
} else this.confirmResult = '1'
if (row.newGridName) this.isMoveOut = 1
// this.reason = row.reason
this.reason = row.reason
await this.loadRootAgency()
// await this.loadRootAgency()
await this.getAgencylist()
setTimeout(() => {
this.loadingForm = false
@ -500,9 +542,9 @@ export default {
async getAgencylist() {
const url = '/gov/org/customeragency/rootagencygridtree'
const { agencyId } = this.$store.state.user
const params = {
agencyId: this.rootAgency.id
agencyId: agencyId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
@ -663,6 +705,10 @@ export default {
setTimeout(() => {
this.btnDisable = false
}, 2000)
if (this.isMoveOut == 0) {
this.saveForm()
return
}
this.$refs['ref_form'].validate((valid, messageObj) => {
if (!valid) {
// app.util.validateRule(messageObj)
@ -690,6 +736,7 @@ export default {
let params = {
id: this.detailInfo.id,
confirmResult: this.confirmResult,
isMoveOut: this.isMoveOut,
reason: this.reason
}
if (this.confirmResult == 1 && this.detailInfo.isInHome) {
@ -700,7 +747,8 @@ export default {
buildName: this.dataForm.buildName,
unitName: this.dataForm.unitName,
homeName: this.dataForm.homeName,
xxdz: this.dataForm.address
xxdz: this.dataForm.address,
moveOutDate: this.dataForm.outOfTime
}
}
@ -715,12 +763,15 @@ export default {
}
},
async saveForm() {
const url = '/epmetuser/changeRelocation/moveOutHome'
const url = '/epmetuser/changeRelocation/moveOutHomeConfirm'
let noData = new Date()
noData = util.dateFormatter(noData, 'time')
this.dataForm.transferTime = noData
const { data, code, msg } = await requestPost(url, this.dataForm)
const _data = {
...this.dataForm,
isMoveOut: this.isMoveOut
}
const { data, code, msg } = await requestPost(url, _data)
if (code === 0) {
// this.$message.success('')

6
src/views/modules/visual/basicinfo/basicInfoMain.vue

@ -354,6 +354,7 @@ const vueGis = {
const { data, code, msg } = await requestPost(url, params)
this.infoLoading = false
if (code === 0) {
this.listData = data
// this.listData = this.listData1
this.listDatashow = []
@ -365,6 +366,9 @@ const vueGis = {
if (index % 2 === 0) {//
itemArray.push(item)
if ((index + 1) === this.listData.length) {
this.listDatashow.push(itemArray)
}
} else {
itemArray.push(item)
this.listDatashow.push(itemArray)
@ -782,6 +786,8 @@ const vueGis = {
this.zoom = 13
} else if (agencyLevel === 'community') {
this.zoom = 14
} else {
this.zoom = 11
}
},

2063
src/views/modules/visual/communityGovern/fivelayers/mapIndex copy 2.vue

File diff suppressed because it is too large

1987
src/views/modules/visual/communityGovern/fivelayers/mapIndex copy.vue

File diff suppressed because it is too large

2071
src/views/modules/visual/communityGovern/fivelayers/mapIndex-baidu.vue

File diff suppressed because it is too large

34
src/views/modules/visual/communityGovern/fivelayers/mapIndex.vue

@ -373,6 +373,8 @@
import 'ol/ol.css'
import { Map, View } from 'ol'
import TileLayer from 'ol/layer/Tile.js';
import ImageLayer from 'ol/layer/Image';
import { Raster as RasterSource } from 'ol/source';
import XYZ from 'ol/source/XYZ.js';
import VectorLayer from 'ol/layer/Vector.js';
import VectorSource from 'ol/source/Vector.js';
@ -489,6 +491,28 @@ var polygonStyleFunction = (function () {
};
})()
//
let reverseFunc = function (pixelsTemp) {
//
for (var i = 0; i < pixelsTemp.length; i += 4) {
var r = pixelsTemp[i];
var g = pixelsTemp[i + 1];
var b = pixelsTemp[i + 2];
//
var grey = r * 0.3 + g * 0.59 + b * 0.11;
//rgb
pixelsTemp[i] = grey;
pixelsTemp[i + 1] = grey;
pixelsTemp[i + 2] = grey;
//
pixelsTemp[i] = 55 - pixelsTemp[i];
pixelsTemp[i + 1] = 255 - pixelsTemp[i + 1];
pixelsTemp[i + 2] = 305 - pixelsTemp[i + 2];
}
};
const vueGis = {
name: 'HomeMap',
data () {
@ -1613,7 +1637,7 @@ const vueGis = {
this.zoom = 13
} else if (agencyLevel === 'community') {
this.zoom = 14
}else{
} else {
this.zoom = 11
}
@ -1644,9 +1668,13 @@ const vueGis = {
url: 'http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}',
wrapX: true//xfalse
}),
zIndex: 20
zIndex: 20,
crossOrigin: 'anonymous'
});
mapView = new View({
//
center: this.centerPoint,
@ -1676,6 +1704,8 @@ const vueGis = {
});
map.removeInteraction(dblClickInteraction);
},
//
addParentLayer () {

64
src/views/modules/visual/components/screen-map/index.vue

@ -136,7 +136,7 @@ var polygonStyleFunction = (function () {
const vueGis = {
name: "HomeMap",
data() {
data () {
return {
centerPoint: [], //
zoom: 14, //14
@ -198,14 +198,14 @@ const vueGis = {
isChangeCenter: true, //
};
},
async mounted() {},
async mounted () { },
methods: {
showPosition() {
showPosition () {
let array = [this.input_lat, this.input_lon];
map.getView().setCenter(array);
},
//:icon
loadMap(
loadMap (
mapInfo,
polygonArray,
polIconUrlArray,
@ -257,7 +257,7 @@ const vueGis = {
},
//:
async refreshMap(mapInfo, polygonArray, iconArrays, isChangeCenter) {
async refreshMap (mapInfo, polygonArray, iconArrays, isChangeCenter) {
this.mapInfo = mapInfo;
this.polygonArray = [];
this.polygonArray = polygonArray;
@ -293,7 +293,7 @@ const vueGis = {
},
//
loadPolygon() {
loadPolygon () {
polygonSource.clear(); //
// iconSource.clear()
let featureData = []; //
@ -352,7 +352,7 @@ const vueGis = {
},
//icon
loadPolIcon(feature) {
loadPolIcon (feature) {
polIconSource.clear();
let polyIconFeatures = [];
// console.log('feature-----', feature)
@ -390,7 +390,7 @@ const vueGis = {
},
//icon
loadIcon() {
loadIcon () {
iconSource.clear(); //
if (this.iconArrays && this.iconArrays.length > 0) {
let iconFeatures = [];
@ -413,7 +413,7 @@ const vueGis = {
// imgSize: [32, 32],
// scale: 0.5,
// src: oneIcon.urlIndex && this.iconUrlArray[oneIcon.urlIndex] || this.iconUrlArray[0] || this.iconUrlArray[0]
src: (oneIcon.urlIndex && this.iconUrlArray[oneIcon.urlIndex]) || (oneIcon.index &&this.iconUrlArray[oneIcon.index]) || this.iconUrlArray[0]
src: (oneIcon.urlIndex && this.iconUrlArray[oneIcon.urlIndex]) || (oneIcon.index && this.iconUrlArray[oneIcon.index]) || this.iconUrlArray[0]
}),
// text: createTextStyle(oneIcon)
});
@ -436,7 +436,7 @@ const vueGis = {
},
//
computedDistance(lon, lat, max) {
computedDistance (lon, lat, max) {
let c1 = [2];
c1[0] = lon;
c1[1] = lat;
@ -451,7 +451,7 @@ const vueGis = {
},
//
initMap() {
initMap () {
this.firstCentermap();
gaodeMapLayer = new TileLayer({
title: "地图",
@ -598,18 +598,20 @@ const vueGis = {
},
//
setZoom(level) {
if (level === "district") {
this.zoom = 11;
} else if (level === "street") {
this.zoom = 12;
} else if (level === "community") {
this.zoom = 13;
setZoom (level) {
if (level === 'district') {
this.zoom = 12
} else if (level === 'street') {
this.zoom = 13
} else if (level === 'community') {
this.zoom = 14
} else {
this.zoom = 11
}
},
//
initPolygonLayer() {
initPolygonLayer () {
polygonSource = new VectorSource({
// features: (new GeoJSON()).readFeatures(geojsonObject)
wrapX: false,
@ -655,14 +657,14 @@ const vueGis = {
map.addLayer(polygonLayer)
if (this.$route.path == '/main-shuju/visual-communityGovern-duoyuanfuwu-duoyuanfuwufenxi' || this.$route.path == '/main-shuju/visual-communityParty-gridParty' || this.$route.path == '/main-shuju/visual-communityParty-community') { // 2022.6.9
console.log('去掉默认点击')
console.log('去掉默认点击')
} else {
map.addInteraction(select);
map.addInteraction(select);
}
},
//icon
initPolIconLayer() {
initPolIconLayer () {
polIconSource = new VectorSource({
//features: (new GeoJSON()).readFeatures(geojsonObject)
wrapX: false,
@ -677,7 +679,7 @@ const vueGis = {
},
//icon
initIconLayer() {
initIconLayer () {
iconSource = new VectorSource({
//features: (new GeoJSON()).readFeatures(geojsonObject)
wrapX: false,
@ -699,7 +701,7 @@ const vueGis = {
},
//
addOverlay() {
addOverlay () {
// 使 DOM
var container = document.getElementById("popup");
var closer = document.getElementById("popup-closer");
@ -737,7 +739,7 @@ const vueGis = {
},
//
addMapClick() {
addMapClick () {
let _that = this;
map.on("click", function (evt) {
@ -757,7 +759,7 @@ const vueGis = {
});
},
handleShowPopup(showData, coordinate, isShowMore) {
handleShowPopup (showData, coordinate, isShowMore) {
if (isShowMore) {
document.getElementById("popup-goMore").style.display = "block";
} else {
@ -773,19 +775,19 @@ const vueGis = {
// overlay x,y
},
//
handleClosePopup() {
handleClosePopup () {
this.overlay.setPosition(undefined);
document.getElementById("popup-closer").blur();
return false;
},
//
getRndBetween(lowerLimit, upperLimit) {
getRndBetween (lowerLimit, upperLimit) {
return Math.floor(Math.random() * (upperLimit - lowerLimit + 1)) + lowerLimit;
},
//
startLoading() {
startLoading () {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
@ -794,7 +796,7 @@ const vueGis = {
},
//
endLoading() {
endLoading () {
//clearTimeout(timer);
if (loading) {
loading.close();
@ -839,7 +841,7 @@ const vueGis = {
},
},
computed: {
mapHeight() {
mapHeight () {
return this.clientHeight - 120;
},

2
src/views/modules/workSys/mapConfig.vue

@ -622,7 +622,7 @@ const vueGis = {
this.zoom = 13
} else if (agencyLevel === 'community') {
this.zoom = 14
}else{
} else {
this.zoom = 11
}

383
src/views/modules/workSys/role/role.vue

@ -0,0 +1,383 @@
<template>
<div class="div_main">
<div class="div_search">
<el-form :inline="true"
:model="formData"
ref="ref_searchform"
:label-width="'110px'">
<el-form-item label="角色名称"
prop="name">
<el-input v-model="formData.name"
size="small"
class="list_item_width_1"
clearable
placeholder="请输入角色名称">
</el-input>
</el-form-item>
<!-- <el-form-item label="创建时间"
label-width="110px"
prop="createdTime">
<el-date-picker v-model="formData.createdTime"
size="small"
type="datetime"
@change="handleTimeChange"
format="yyyy-MM-dd HH:mm"
value-format="yyyy-MM-dd HH:mm"
placeholder="创建时间">
</el-date-picker>
</el-form-item> -->
<el-button style="margin-left:30px"
size="small"
class="diy-button--search"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:10px"
size="small"
class="diy-button--reset"
@click="resetSearch">重置</el-button>
</el-form>
</div>
<div class="div_table">
<div class="div_btn">
<el-button class="diy-button--add"
size="small"
@click="handleAdd">新增</el-button>
</div>
<el-table class="table"
ref="ref_table"
:data="tableData"
border
:height="tableHeight"
v-loading="tableLoading"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
style="width: 100%">
<el-table-column label="序号"
header-align="center"
align="center"
type="index"
width="50"></el-table-column>
<el-table-column prop="name"
header-align="center"
align="center"
label="角色名称"
min-width="100">
</el-table-column>
<el-table-column prop="remark"
header-align="center"
align="center"
label="备注"
min-width="110">
</el-table-column>
<el-table-column prop="createdTime"
header-align="center"
align="center"
label="创建时间"
min-width="170">
</el-table-column>
<el-table-column label="操作"
fixed="right"
width="140"
header-align="center"
align="center"
class="operate">
<template slot-scope="scope">
<el-button v-if="true"
type="text"
class="div-table-button--detail"
size="small"
@click="handleDetail(scope.row)">查看</el-button>
<el-button type="text"
class="div-table-button--edit"
size="small"
@click="handleEdit(scope.row)">修改</el-button>
<el-button type="text"
class="div-table-button--delete "
size="small"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
</div>
<!-- 修改弹出框 -->
<el-dialog :visible.sync="formShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="formTitle"
width="850px"
top="5vh"
class="dialog-h"
@closed="diaClose">
<role-form ref="ref_form"
@dialogCancle="diaClose"
@dialogOk="addFormOk"></role-form>
</el-dialog>
</div>
</template>
<script>
import roleForm from './roleForm'
import { requestPost, requestGet } from '@/js/dai/request'
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
let loading //
export default {
data () {
return {
loading: false,
total: 0,
pageSize: 20,
pageNo: 0,
tableLoading: false,
isResiUser: true,
agencyId: '',
timeRange: [],
formData: {
name: '',//
// createdTime: '',//
},
tableData: [],
//form
formShow: false,
formTitle: '新增',
}
},
components: {
roleForm
},
async created () {
},
async mounted () {
const { user } = this.$store.state
this.agencyId = user.agencyId
await this.loadTable()
},
activated () {
this.$refs['ref_table'].doLayout()
},
methods: {
async handleSearch () {
this.isResiUser = this.formData.orgType === 'current'
await this.loadTable()
this.$nextTick(() => {
this.$refs.ref_table.doLayout() //
})
},
async loadTable () {
this.tableLoading = true
const url = "/gov/access/govrole/page"
let params = {
pageSize: this.pageSize,
pageNo: this.pageNo,
...this.formData
}
const { data, code, msg } = await requestGet(url, params)
if (code === 0) {
this.total = data.total
this.tableData = data.list
} else {
this.$message.error(msg)
}
this.tableLoading = false
},
handleTimeChange (time) {
if (time) {
this.formData.startTime = time[0]
this.formData.endTime = time[1]
} else {
this.formData.startTime = ''
this.formData.endTime = ''
}
},
diaClose () {
this.$refs.ref_form.resetData()
this.formShow = false
},
handleAdd () {
this.formTitle = '新增'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('add', null)
})
},
handleEdit (row) {
this.formTitle = '修改'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('edit', row.id)
})
},
handleDetail (row) {
this.formTitle = '详情'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('detail', row.id)
})
},
addFormOk () {
this.formShow = false
this.loadTable()
},
async handleDelete (row) {
let message = '确认删除?'
this.$confirm(message, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.deleteRole(row)
})
.catch(err => {
});
},
async deleteRole (row) {
const url = "/gov/access/govrole/del"
let params = [row.id]
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.$message({
type: "success",
message: "操作成功"
});
this.loadTable()
} else {
this.$message.error(msg)
}
},
//
resetSearch () {
this.formData = {
orgType: 'current',//:current all
name: '',//
mobile: '',//
idCard: '',//
startTime: '',//yyyy-MM-dd HH:mm
endTime: '',//yyyy-MM-dd HH:mm
}
this.timeRange = []
this.pageNo = 0
// this.loadTable()
},
handleSizeChange (val) {
this.pageSize = val
this.pageNo = 1
this.loadTable()
},
handleCurrentChange (val) {
this.pageNo = val
this.loadTable()
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
tableHeight () {
return this.$store.state.inIframe ? this.clientHeight - 360 + this.iframeHeight : this.clientHeight - 360
},
...mapGetters(['clientHeight', 'iframeHeight'])
},
watch: {
},
props: {
}
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/management/epidemic.scss";
</style>

390
src/views/modules/workSys/role/roleForm.vue

@ -0,0 +1,390 @@
<template>
<div class="epidemic-form">
<div class="dialog-h-content scroll-h">
<el-form ref="ref_form"
:inline="true"
:model="formData"
:rules="dataRule"
:disabled="formType==='detail'"
class="form">
<el-form-item label="角色名称"
prop="name"
label-width="150px"
style="display: block">
<el-input class="item_width_2"
placeholder="请输入角色名称"
clearable
v-model="formData.name">
</el-input>
</el-form-item>
<el-form-item label="备注"
prop="remark"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
type="textarea"
maxlength="500"
show-word-limit
:autosize="{ minRows: 5, maxRows: 10 }"
clearable
placeholder="请输入备注"
v-model="formData.remark"></el-input>
</el-form-item>
<el-form-item label="管理平台菜单"
prop="content"
label-width="150px"
style="display: block">
<el-tree class="item_width_1"
:data="menuList"
:props="{ label: 'name', children: 'children' }"
node-key="id"
:default-expanded-keys="['000']"
ref="menuListTree"
accordion
show-checkbox>
</el-tree>
</el-form-item>
<el-form-item label="可视化平台菜单"
prop="content"
label-width="150px"
style="display: block">
<el-tree class="item_width_1 item_border"
:data="menuListShuju"
:props="{ label: 'name', children: 'children' }"
node-key="id"
:default-expanded-keys="['000']"
ref="menuListShujuTree"
accordion
show-checkbox>
</el-tree>
</el-form-item>
</el-form>
</div>
<div class="form_div_btn">
<el-button size="small"
@click="handleCancle"> </el-button>
<el-button v-if="formType != 'detail'"
size="small"
type="primary"
:disabled="btnDisable"
@click="handleComfirm"> </el-button>
</div>
</div>
</template>
<script>
import { Loading } from 'element-ui' // Loading
import { requestPost, requestGet } from '@/js/dai/request'
let loading //
export default {
data () {
return {
formType: 'add', // addeditdetail
btnDisable: false,
roleId: '',
menuList: [],
menuListShuju: [],
formData: {
id: '',
name: '',
remark: '',//
menuIdList: [],
customerId: ''
},
}
},
components: {},
async mounted () {
},
methods: {
async initForm (type, roleId) {
this.startLoading()
this.customerId = localStorage.getItem("customerId");
this.formData.customerId = this.customerId
//
await this.getMenuList()
await this.getMenuShujuList()
this.$refs['ref_form'].resetFields();
this.$refs.menuListTree.setCheckedKeys([])
this.$refs.menuListShujuTree.setCheckedKeys([])
this.formType = type
if (roleId) {
this.roleId = roleId
this.formData.id = roleId
this.loadFormData()
}
this.endLoading()
},
async getMenuList () {
const url = "/gov/access/menu/nav"
let params = {}
const { data, code, msg } = await requestGet(url, params)
if (code === 0) {
this.menuList = [
{
id: '000',
name: '全部菜单',
children: [...data]
}
]
// this.menuList = data
} else {
this.$message.error(msg)
}
},
async getMenuShujuList () {
const url = "/gov/access/menu/nav"
let params = {
tableName: 'data_menu'
}
const { data, code, msg } = await requestGet(url, params)
if (code === 0) {
this.menuListShuju = [
{
id: '000',
name: '全部菜单',
children: [...data]
}
]
// this.menuListShuju = data
} else {
this.$message.error(msg)
}
},
async loadFormData () {
// const url = 'http://yapi.elinkservice.cn/mock/245/epmetuser/icNat/detail'
const url = '/gov/access/govrole/' + this.roleId
let params = {
}
const { data, code, msg } = await requestGet(url, params)
if (code === 0) {
this.formData = data
this.formData.menuIdList.forEach(item => {
this.$refs.menuListTree.setChecked(item, true)
})
this.formData.menuIdList.forEach(item => {
this.$refs.menuListShujuTree.setChecked(item, true)
})
this.formData.customerId = this.customerId
} else {
this.$message.error(msg)
}
},
handleComfirm () {
this.$refs['ref_form'].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj)
} else {
this.addNat()
}
})
},
async addNat () {
// let menuList1 = [
// ...this.$refs.menuListTree.getCheckedKeys(),
// ...this.$refs.menuListTree.getHalfCheckedKeys(),
// ]
// let menuList2 = [
// ...this.$refs.menuListShujuTree.getCheckedKeys(),
// ...this.$refs.menuListShujuTree.getHalfCheckedKeys()
// ]
// console.log('menuList1', menuList1)
// console.log('menuList2', menuList2)
// let menuAll=menuList1.concat(menuList2)
// console.log('menuAll',menuAll)
this.formData.menuIdList = []
this.formData.menuIdList = [
...this.$refs.menuListTree.getCheckedKeys(),
...this.$refs.menuListTree.getHalfCheckedKeys(),
...this.$refs.menuListShujuTree.getCheckedKeys(),
...this.$refs.menuListShujuTree.getHalfCheckedKeys()
]
this.formData.menuIdList = this.formData.menuIdList.filter(item => item !== '000')
console.log('menuAll', this.formData)
// return false
this.btnDisable = true
setTimeout(() => {
this.btnDisable = false
}, 5000)
let url = ''
if (this.formType === 'add') {
url = '/gov/access/govrole/save'
this.formData.roleId = ''
} else {
url = '/gov/access/govrole/edit'
}
const { data, code, msg } = await requestPost(url, this.formData)
if (code === 0) {
this.$message({
type: 'success',
message: '操作成功'
})
this.resetData()
this.$emit('dialogOk')
this.btnDisable = false
} else {
this.btnDisable = false
this.$message.error(msg)
}
},
handleCancle () {
this.resetData()
this.$emit('dialogCancle')
},
resetData () {
this.roleId = ''
this.fileList = []
this.hideUploadEdit = false
this.formData = {
roleId: '',
agencyId: '',//Id
userId: '',//idicResiUserId
userType: 'icresi',//resi;icresi;import;synchro
name: '',
idCard: '',
mobile: '',
natTime: '',
natAddress: '',
natResult: '',
isSelChannel: false,
channel: [],
content: '',
fileName: '',//
attachmentType: '',// - image - video - voice - doc
attachmentUrl: '',//
}
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
dataRule () {
return {
name: [
{ required: true, message: '姓名不能为空', trigger: 'blur' }
],
}
},
},
props: {
// serviceList: {
// type: Array,
// default: []
// },
}
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/management/epidemic.scss";
.item_border {
border: 1px;
border-radius: 50%;
}
</style>
<style lang='scss'>
//
.hide .el-upload--picture-card {
display: none;
}
// /
.el-upload-list__item {
transition: none !important;
}
</style>
Loading…
Cancel
Save