| | |
| | | background-color: #09152f; |
| | | border: 1px solid #17324c; |
| | | } |
| | | .el-textarea__inner{ |
| | | background-color: #09152f; |
| | | border: 1px solid #17324c; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <div class="show-wrap"> |
| | | <MyProcess v-if="activeIndex === 1" :handlePassVo="handlePassVo" :baseCase="baseCase"></MyProcess> |
| | | <MyFilePicture v-else-if="activeIndex === 2" :filesPictureVo="filesPictureVo" ></MyFilePicture> |
| | | <MySovleProblem v-else-if="activeIndex === 3" :problemProVo="problemProVo"></MySovleProblem> |
| | | <MyScene v-else :currentSitVo="currentSitVo"></MyScene> |
| | | <MySovleProblem v-else-if="activeIndex === 3" :baseCase="baseCase" :handlePassVo="handlePassVo"></MySovleProblem> |
| | | <MyScene v-else :currentSitVo="currentSitVo" :baseCase="baseCase"></MyScene> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | baseCase:{}, |
| | | handlePassVo:{}, |
| | | currentSitVo:{}, |
| | | problemProVo:{}, |
| | | // problemProVo:{}, |
| | | filesPictureVo:{} |
| | | |
| | | } |
| | |
| | | this.baseCase = info.baseCase; |
| | | this.handlePassVo = info.handlePassVo; |
| | | this.currentSitVo = info.currentSitVo; |
| | | this.problemProVo = info.problemProVo; |
| | | // this.problemProVo = info.problemProVo; |
| | | this.filesPictureVo = info.filesPictureVo; |
| | | console.log(info); |
| | | console.log(info); |
| | | }, |
| | | methods: { |
| | | changeComponent(index) { |
| | |
| | | <!-- 选择人员 --> |
| | | <div class="form-person"> |
| | | <!-- 部门 --> |
| | | <el-form-item label="选择人员:" prop="dispatchOpinion"> |
| | | <el-select v-model="dispatch.dispatchOpinion" placeholder="请选择部门" @change="handleTopChange"> |
| | | <el-form-item label="选择人员:" prop="createUser"> |
| | | <el-select v-model="dispatch.createUser" placeholder="请选择部门" @change="handleTopChange"> |
| | | <el-option v-for="item in departOptions" :key="item.id" :label="item.departName" |
| | | :value="item.id"> |
| | | </el-option> |
| | |
| | | <!-- 中队 --> |
| | | <el-form-item prop="enforcementTeam" class="person-item"> |
| | | <el-select v-model="dispatch.enforcementTeam" placeholder="选择中队" |
| | | :disabled="squadronOptions.length!==0?false:true" @change="handleMidChange"> |
| | | :disabled="squadronOptions.length!==0 && squadronOptions?false:true" @change="handleMidChange"> |
| | | <el-option v-for="item in squadronOptions" :key="item.id" :label="item.departName" |
| | | :value="item.id"> |
| | | </el-option> |
| | |
| | | <el-form-item prop='lawEnforcer' class="person-item"> |
| | | <!-- 人员 --> |
| | | <el-select v-model="dispatch.lawEnforcer" placeholder="请选择人员" |
| | | :disabled="personOptions.length !== 0 ? false:true" @change="handlePerChange"> |
| | | :disabled="personOptions.length !== 0 && personOptions? false:true" @change="handlePerChange"> |
| | | <el-option v-for="item in personOptions" :key="item.id" :label="item.username" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | <div class="form-footer"> |
| | | <!-- 执法人员编号 --> |
| | | <el-form-item label="执法人员编号:" prop="lawEnforcerName"> |
| | | <el-input v-model="dispatch.lawEnforcerName"></el-input> |
| | | <el-input v-model="dispatch.lawEnforcerName" disabled></el-input> |
| | | </el-form-item> |
| | | <!-- 执法人员联系方式 --> |
| | | <el-form-item label="联系方式:" prop="contactWay"> |
| | | <el-input v-model="dispatch.contactWay"></el-input> |
| | | <el-input v-model="dispatch.contactWay" disabled></el-input> |
| | | </el-form-item> |
| | | <el-button type="primary">发送短信</el-button> |
| | | </div> |
| | | <div class="form-time"> |
| | | <el-form-item label="派遣意见" prop="dispatchOpinion"> |
| | | <el-input v-model="dispatch.dispatchOpinion" placeholder="请输入派遣意见"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="处置日期" prop="disposeDate"> |
| | | <el-date-picker v-model="dispatch.disposeDate" type="datetime" placeholder="选择日期时间"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </div> |
| | | </el-form> |
| | | <div class="map"> |
| | |
| | | components: { |
| | | MyMap |
| | | }, |
| | | props: ['id', 'changeDialog', 'refresh', 'mytype'], |
| | | props: ['id', 'changeDialog', 'refresh', 'mytype'], |
| | | created() { |
| | | // 判断车辆类型 |
| | | this.mytype === 1 ? this.getLawCarList() : this.getSoilCarList(); |
| | |
| | | callback(); |
| | | } |
| | | } else { |
| | | callback(new Error('联系方式不能为空')) |
| | | callback() |
| | | } |
| | | } |
| | | const checkOpinion = (rule, value, callback) => { |
| | | if (value) { |
| | | callback(); |
| | | } else { |
| | | callback(new Error('部门不能为空')) |
| | | callback(new Error('派遣意见不能为空')) |
| | | } |
| | | } |
| | | const checkDistance = (rule, value, callback) => { |
| | |
| | | if (value) { |
| | | callback(); |
| | | } else { |
| | | callback(new Error('中队不能为空')) |
| | | callback(new Error('处置日期不能为空')) |
| | | } |
| | | } |
| | | const checkPerson = (rule, value, callback) => { |
| | |
| | | callback() |
| | | } |
| | | } |
| | | const checkDepart = (rule, value, callback) => { |
| | | if (value) { |
| | | callback(); |
| | | } else { |
| | | callback(new Error('请选择部门')) |
| | | } |
| | | } |
| | | return { |
| | | dispatch: { |
| | | baseCaseId: 0,//案件id |
| | | contactWay: "",//联系方式 |
| | | dispatchOpinion: "",//部门 |
| | | dispatchOpinion: "",//处置意见 |
| | | disposeDate: "",//处置日期 |
| | | distance: 0,//距离 |
| | | enforcementCar: '',//执法车 |
| | | enforcementTeam: "",//执法中队 |
| | | lawEnforcer: '',//执法人员 |
| | | lawEnforcerName: ""//执法编号 |
| | | lawEnforcerName: "",//执法编号, |
| | | createUser: null, |
| | | }, |
| | | rules: { |
| | | createUser: [ |
| | | { |
| | | required: true, trigger: 'change', validator: checkDepart |
| | | } |
| | | ], |
| | | contactWay: [ |
| | | { |
| | | required: false, trigger: 'blur', validator: checkPhone |
| | |
| | | lawEnforcerName: [ |
| | | { required: false, trigger: 'change', validator: checkNumber } |
| | | ], |
| | | disposeDate: [ |
| | | { |
| | | required: true, trigger: 'false', validator: checkTeam |
| | | } |
| | | ] |
| | | }, |
| | | carOptions: [ |
| | | { |
| | |
| | | }) |
| | | .then(res => { |
| | | this.carOptions = res.data.records; |
| | | console.log(res,this.carOptions); |
| | | console.log(res, this.carOptions); |
| | | }) |
| | | }, |
| | | // 获取渣土车辆 |
| | |
| | | }, |
| | | // 获取中队 |
| | | async getTeamList(id) { |
| | | console.log(id); |
| | | await this.$axios({ |
| | | method: 'get', |
| | | url: `sccg/depart/query_father_children?fatherId=${id}` |
| | |
| | | }, |
| | | // 获取部门下的用户 |
| | | async getDepartUserList(id) { |
| | | console.log(id); |
| | | await this.$axios({ |
| | | method: 'get', |
| | | url: `sccg/admin/getDepartUser/${id}`, |
| | | }) |
| | | .then(res => { |
| | | this.personOptions = res.data; |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | this.personOptions = res.data; |
| | | } else { |
| | | this.personOptions = []; |
| | | } |
| | | if(this.personOptions.length === 0){ |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: '该中队下没有人员' |
| | | }) |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: '该部门人员不足,请换个部门' |
| | | }) |
| | | type: 'error', |
| | | message: '该部门人员不足,请换个部门' |
| | | }) |
| | | }) |
| | | }, |
| | | // 部门更改 |
| | | async handleTopChange(id) { |
| | | this.dispatch.lawEnforcer = ''; |
| | | this.dispatch.enforcementTeam = ''; |
| | | this.dispatch.contactWay = ''; |
| | | this.dispatch.lawEnforcerName = ''; |
| | | await this.getTeamList(id); |
| | | if(this.squadronOptions.length===0){ |
| | | await this.getDepartUserList(id); |
| | | } |
| | | // if (this.squadronOptions.length === 0) { |
| | | // await this.getDepartUserList(id); |
| | | // } |
| | | }, |
| | | // 中队更改 |
| | | async handleMidChange(id) { |
| | | this.dispatch.lawEnforcer = ''; |
| | | this.dispatch.contactWay = ''; |
| | | this.dispatch.lawEnforcerName = ''; |
| | | await this.getDepartUserList(id); |
| | | }, |
| | | // 人员更改 |
| | | async handlePerChange(id){ |
| | | let obj = await this.getLawUser(id); |
| | | async handlePerChange(id) { |
| | | let obj = await this.getLawUser(id); |
| | | this.dispatch.lawEnforcerName = obj.nickName; |
| | | this.dispatch.contactWay = obj.mobile; |
| | | }, |
| | | // 获取执法人员信息 |
| | | async getLawUser(id){ |
| | | async getLawUser(id) { |
| | | let obj = {} |
| | | await this.$axios({ |
| | | method:'get', |
| | | url:`sccg/admin/${id}` |
| | | method: 'get', |
| | | url: `sccg/admin/${id}` |
| | | }) |
| | | .then(res=>{ |
| | | obj = res.data; |
| | | }) |
| | | .then(res => { |
| | | obj = res.data; |
| | | }) |
| | | return obj; |
| | | } |
| | | }, |
| | | watch: { |
| | | 'squadronOptions.length': { |
| | | handler(newval, oldval) { |
| | | console.log(newval); |
| | | if (newval === 0) { |
| | | console.log(1); |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: '该部门下没有中队' |
| | | }) |
| | | } |
| | | }, |
| | | deep: true |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | editor: null |
| | | } |
| | | }, |
| | | props:['getMyBody'], |
| | | mounted() { |
| | | this.editor = new E('#edit'); |
| | | this.editor.config.height = 450; |
| | |
| | | '#4b9bb7', |
| | | '#09152f' |
| | | ] |
| | | |
| | | this.editor.config.onchange =(html)=>{ |
| | | // 第二步,监控变化,同步更新到 textarea |
| | | this.$emit('getMyBody',html); |
| | | } |
| | | this.editor.create(); |
| | | }, |
| | | beforeDestroy() { |
| | |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | #edit{ |
| | | :deep(.w-e-toolbar){ |
| | | background-color: #09152f !important; |
| | | color: #4b9bb7; |
| | | } |
| | | :deep(.w-e-text-container){ |
| | | background-color: #09152f !important; |
| | | color: #4b9bb7; |
| | | } |
| | | #edit { |
| | | :deep(.w-e-toolbar) { |
| | | background-color: #09152f !important; |
| | | color: #4b9bb7; |
| | | } |
| | | |
| | | :deep(.w-e-text-container) { |
| | | background-color: #09152f !important; |
| | | color: #4b9bb7; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <div class="show-wrap"> |
| | | <MyProcess v-if="activeIndex === 1" :handlePassVo="handlePassVo" :baseCase="baseCase"></MyProcess> |
| | | <MyFilePicture v-else-if="activeIndex === 2" :filesPictureVo="filesPictureVo" ></MyFilePicture> |
| | | <MySovleProblem v-else-if="activeIndex === 3" :problemProVo="problemProVo"></MySovleProblem> |
| | | <MyScene v-else :currentSitVo="currentSitVo"></MyScene> |
| | | <MySovleProblem v-else-if="activeIndex === 3" :baseCase="baseCase" :handlePassVo="handlePassVo"></MySovleProblem> |
| | | <MyScene v-else :currentSitVo="currentSitVo" :baseCase="baseCase"></MyScene> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | baseCase:{}, |
| | | handlePassVo:{}, |
| | | currentSitVo:{}, |
| | | problemProVo:{}, |
| | | filesPictureVo:{} |
| | | |
| | | } |
| | | }, |
| | | }, |
| | | created() { |
| | | console.log('created'); |
| | | const {info} = this; |
| | | this.baseCase = info.baseCase; |
| | | this.handlePassVo = info.handlePassVo; |
| | | this.currentSitVo = info.currentSitVo; |
| | | this.problemProVo = info.problemProVo; |
| | | this.filesPictureVo = info.filesPictureVo; |
| | | console.log(info); |
| | | console.log(info); |
| | | }, |
| | | methods: { |
| | | changeComponent(index) { |
| | |
| | | <div class="desc-title">环节用时:{{item.disposeRecords.length !==0 ? item.disposeRecords[0].linkTime : ''}}</div> |
| | | <div class="desc-content" v-if="active > index"> |
| | | <div class="desc-content-message">1111111</div> |
| | | <div class="desc-content-endtime">{{item.disposeRecords.length !==0 ? item.disposeRecords[0].endTime:''}}</div> |
| | | <div class="desc-content-endtime">{{item.disposeRecords.length !==0 ? filterTime(item.disposeRecords[0].endTime):''}}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import helper from '@/utils/mydate' |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | } |
| | | this.list = mylist; |
| | | }, |
| | | methods:{ |
| | | filterTime(time){ |
| | | if(time){ |
| | | return helper(time) |
| | | } |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | |
| | | <div class="scene-item" v-if="active === 1"> |
| | | <el-form ref="arrivalSituation" label-position="right" label-width="120px" :model="arrivalSituation"> |
| | | <el-form-item label="到达时间:"> |
| | | <el-input v-model="arrivalSituation.arrivalTime"></el-input> |
| | | <el-input disabled v-model="arrivalSituation.arrivalTime"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="到达地址:"> |
| | | <el-input v-model="arrivalSituation.arrivalAddress"></el-input> |
| | | <el-input disabled v-model="arrivalSituation.arrivalAddress"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="现场情况说明:"> |
| | | <el-input v-model="arrivalSituation.situationExplain"></el-input> |
| | | <el-input disabled v-model="arrivalSituation.situationExplain"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="信访回复说明:"> |
| | | <el-input v-model="arrivalSituation.replyExplain"></el-input> |
| | | <el-input disabled v-model="arrivalSituation.replyExplain"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="现场情况照片:"> |
| | | <el-input v-model="arrivalSituation.situationPic"></el-input> |
| | | <img class="img" :src="arrivalSituation.situationPic" alt="" v-if="arrivalSituation.situationPic"> |
| | | <!-- <el-input disabled v-model=""></el-input> --> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | |
| | | <el-form ref="investigation" label-position="right" label-width="120px" :model="investigation"> |
| | | <div class="inves-item"> |
| | | <el-form-item label="承办队员:"> |
| | | <el-input v-model="investigation.name"></el-input> |
| | | <el-input disabled v-model="investigation.undertaker"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="协办队员:"> |
| | | <el-input v-model="investigation.assistant"></el-input> |
| | | <el-input disabled v-model="investigation.assistant"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <el-form-item label="时间:"> |
| | | <el-input v-model="investigation.type"></el-input> |
| | | <el-input disabled v-model="investigation.investigationTime"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="地址:"> |
| | | <el-input v-model="investigation.address"></el-input> |
| | | <el-input disabled v-model="investigation.address"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="案由:"> |
| | | <el-input v-model="investigation.caseAction"></el-input> |
| | | <el-input disabled v-model="investigation.caseAction"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="当事人信息:"> |
| | | <el-input v-model="investigation.type"></el-input> |
| | | <el-input disabled v-model="investigation.type"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="情况描述:"> |
| | | <el-input v-model="investigation.description"></el-input> |
| | | <el-input disabled v-model="investigation.description"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="照片附件:"> |
| | | <el-input v-model="investigation.pic"></el-input> |
| | | <img class="img" :src="investigation.pic" alt="" v-if="investigation.pic"> |
| | | <!-- <el-input disabled v-model="investigation.pic"></el-input> --> |
| | | </el-form-item> |
| | | <el-form-item label="类型:"> |
| | | <el-input v-model="investigation.type"></el-input> |
| | | <el-input disabled v-model="mybaseCase.categoryText"></el-input> |
| | | </el-form-item> |
| | | <div class="inves-item"> |
| | | <el-form-item label="当事人姓名:"> |
| | | <el-input v-model="investigation.type"></el-input> |
| | | <el-input disabled v-model="partyInfo.name"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="手机号码:"> |
| | | <el-input v-model="investigation.type"></el-input> |
| | | <el-input disabled v-model="partyInfo.phoneCode"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="inves-item"> |
| | | <el-form-item label="证件类型:"> |
| | | <el-input v-model="investigation.type"></el-input> |
| | | <el-input disabled v-model="partyInfo.certificateTypeText"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="证件号码:"> |
| | | <el-input v-model="investigation.type"></el-input> |
| | | <el-input disabled v-model="partyInfo.certificateCode"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="inves-item"> |
| | | <el-form-item label="文化程度:"> |
| | | <el-input v-model="investigation.type"></el-input> |
| | | <el-input disabled v-model="partyInfo.educationDegreeText"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="职业:"> |
| | | <el-input v-model="investigation.type"></el-input> |
| | | <el-input disabled v-model="partyInfo.career"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <el-form-item label="工作单位及职务:"> |
| | | <el-input v-model="investigation.type"></el-input> |
| | | <el-input disabled v-model="partyInfo.work"></el-input> |
| | | </el-form-item> |
| | | <div class="inves-item"> |
| | | <el-form-item label="民族:"> |
| | | <el-input v-model="investigation.type"></el-input> |
| | | <el-input disabled v-model="partyInfo.nationText"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="籍贯:"> |
| | | <el-input v-model="investigation.type"></el-input> |
| | | <el-input disabled v-model="partyInfo.nativePlace"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <el-form-item label="现住址:"> |
| | | <el-input v-model="investigation.type"></el-input> |
| | | <el-input disabled v-model="partyInfo.liveAddress"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="户籍所在地:"> |
| | | <el-input v-model="investigation.type"></el-input> |
| | | <el-input disabled v-model="partyInfo.registerAddress"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-button>返回</el-button> |
| | |
| | | <div class="scene-item" v-if="active === 3"> |
| | | <el-form ref="writ" label-position="right" label-width="120px" :model="writ"> |
| | | <el-form-item label="类型:"> |
| | | <el-input v-model="writ.name"></el-input> |
| | | <el-input disabled v-model="writ.name"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | |
| | | label: '告知违法' |
| | | } |
| | | ], |
| | | mybaseCase: {}, |
| | | arrivalSituation: {}, |
| | | investigation: {}, |
| | | writ: {} |
| | | |
| | | writ: {}, |
| | | partyInfo: {} |
| | | } |
| | | }, |
| | | props: ['currentSitVo'], |
| | | props: ['currentSitVo', 'baseCase'], |
| | | created() { |
| | | const { currentSitVo: { arrivalSituation: mylist,investigation:invesList } } = this; |
| | | const { currentSitVo: { arrivalSituation: mylist, investigation: invesList }, baseCase } = this; |
| | | if (invesList) { |
| | | const { partyInfo } = invesList; |
| | | if (invesList) { |
| | | this.investigation = invesList; |
| | | } |
| | | if (partyInfo) { |
| | | this.partyInfo = partyInfo; |
| | | } |
| | | } |
| | | if (mylist) { |
| | | this.arrivalSituation = mylist; |
| | | } |
| | | if(invesList){ |
| | | this.investigation = invesList; |
| | | } |
| | | this.mybaseCase = baseCase; |
| | | console.log(baseCase); |
| | | console.log(this.currentSitVo); |
| | | }, |
| | | methods: { |
| | |
| | | border: 1px solid #17324c; |
| | | } |
| | | } |
| | | .inves-item{ |
| | | .img{ |
| | | width: 60px; |
| | | height:60px; |
| | | } |
| | | .inves-item { |
| | | display: flex; |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <div class="sovle-problem"> |
| | | <div class="sovle-header"> |
| | | <div class="sovle-limit">处理时限:{{}}</div> |
| | | <div class="sovle-limit">剩余时间:23小时</div> |
| | | <div class="sovle-limit">处理时限:{{dispatchInfo.disposeDate}}</div> |
| | | <div class="sovle-limit">剩余时间:{{getRestTime(dispatchInfo.disposeDate)}}</div> |
| | | </div> |
| | | <div class="sovle-timeline"> |
| | | <el-timeline> |
| | | <el-timeline-item :color="mycolor" v-for="item in list" :key="item.id"> |
| | | <div class="title"> |
| | | <div class="title-left">【{{item.name}}】{{item.name === '派遣' ? '派遣员':item.name === '处理' ? '处理人':'评定人'}}:{{item.disposeRecords.length !==0 ? item.disposeRecords[0].handleId : ''}}</div> |
| | | <div class="title-right">{{item.disposeRecords.length !==0 ? item.disposeRecords[0].endTime:''}}</div> |
| | | <div class="title-left">【{{item.name}}】{{item.name === '派遣' ? '派遣员':item.name === '处理' ? |
| | | '处理人':'评定人'}}:{{item.disposeRecords.length !==0 ? item.disposeRecords[0].handleId : ''}} |
| | | </div> |
| | | <div class="title-right">{{item.disposeRecords.length !==0 ? filterTime(item.disposeRecords[0].endTime):''}} |
| | | </div> |
| | | </div> |
| | | <div class="message">【{{item.name === '派遣' ? '派遣意见':item.name === '处理' ? '处理结果':'评定结果'}}】请相关执法队员及时前往现场进行处置</div> |
| | | </el-timeline-item> |
| | | <div class="message">{{filterPerson(item.name)}}</div> |
| | | </el-timeline-item> |
| | | </el-timeline> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </template> |
| | | <script> |
| | | export default{ |
| | | data(){ |
| | | return{ |
| | | mycolor:'#02a7f0', |
| | | list:[] |
| | | import helper from '@/utils/mydate' |
| | | import {computeTime} from '@/utils/helper' |
| | | export default { |
| | | data() { |
| | | return { |
| | | mycolor: '#02a7f0', |
| | | list: [], |
| | | dispatchInfo: {}, |
| | | } |
| | | }, |
| | | props: ['handlePassVo', 'baseCase'], |
| | | created() { |
| | | const { handlePassVo: mylist, baseCase } = this; |
| | | console.log(baseCase, mylist); |
| | | if (mylist) { |
| | | this.list = mylist.workflowConfigSteps; |
| | | } |
| | | if (baseCase.dispatchInfo) { |
| | | this.dispatchInfo = baseCase.dispatchInfo; |
| | | } |
| | | }, |
| | | methods: { |
| | | // 获得意见 |
| | | filterPerson(name) { |
| | | const { baseCase, dispatchInfo } = this; |
| | | if (name === '调度') { |
| | | return '【派遣意见】' + dispatchInfo.dispatchOpinion |
| | | } else if (name === '核查') { |
| | | return '【核查结果】' + baseCase.handlingOpinion |
| | | } else if (name === '结案') { |
| | | return '【评定结果】' + baseCase.finalOpinion |
| | | } else { |
| | | return '【处理结果】' + baseCase.handlingOpinion |
| | | } |
| | | }, |
| | | props:['problemProVo'], |
| | | created(){ |
| | | const {problemProVo:{workflowConfigSteps:mylist}} = this; |
| | | console.log(mylist); |
| | | this.list = mylist; |
| | | } |
| | | // 处理时间 |
| | | filterTime(time){ |
| | | if(time){ |
| | | return helper(time) |
| | | }else{ |
| | | return |
| | | } |
| | | |
| | | }, |
| | | // 获得剩余时间 |
| | | getRestTime(limitTime){ |
| | | if(limitTime){ |
| | | return computeTime(limitTime) |
| | | } |
| | | return |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .sovle-problem{ |
| | | .sovle-header{ |
| | | padding: 0 200px; |
| | | display: flex; |
| | | line-height: 60px; |
| | | justify-content: space-between; |
| | | } |
| | | .title{ |
| | | display: flex; |
| | | justify-content: space-between; |
| | | line-height: 40px; |
| | | padding: 0 20px; |
| | | color: #4b9bb7; |
| | | font-size: 16px; |
| | | } |
| | | .message{ |
| | | padding: 20px; |
| | | background-color: #070f22; |
| | | color: #4b9bb7; |
| | | line-height: 20px; |
| | | font-size: 10px; |
| | | } |
| | | .sovle-problem { |
| | | .sovle-header { |
| | | padding: 0 200px; |
| | | display: flex; |
| | | line-height: 60px; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .title { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | line-height: 40px; |
| | | padding: 0 20px; |
| | | color: #4b9bb7; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .message { |
| | | padding: 20px; |
| | | background-color: #070f22; |
| | | color: #4b9bb7; |
| | | line-height: 20px; |
| | | font-size: 10px; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | component: () => import('@/views/systemSetting'), |
| | | children: [ |
| | | { |
| | | path: "user", |
| | | name: "user", |
| | | component: () => import('@/views/systemSetting/baseSetting/user') |
| | | path: 'userSetting', |
| | | name: 'userSetting', |
| | | component: () => import('@/views/systemSetting/baseSetting'), |
| | | children: [ |
| | | { |
| | | path: "user", |
| | | name: "user", |
| | | component: () => import('@/views/systemSetting/baseSetting/user') |
| | | }, |
| | | { |
| | | path: 'role', |
| | | name: 'role', |
| | | component: () => import('@/views/systemSetting/baseSetting/role') |
| | | }, |
| | | { |
| | | path: 'authority', |
| | | name: 'authority', |
| | | component: () => import('@/views/systemSetting/baseSetting/authority') |
| | | }, |
| | | { |
| | | path: 'department', |
| | | name: 'department', |
| | | component: () => import('@/views/systemSetting/baseSetting/department') |
| | | }, |
| | | |
| | | ] |
| | | }, |
| | | { |
| | | path: 'role', |
| | | name: 'role', |
| | | component: () => import('@/views/systemSetting/baseSetting/role') |
| | | path: 'platform', |
| | | name: 'platform', |
| | | component: () => import('@/views/systemSetting/platform'), |
| | | children: [ |
| | | { |
| | | path: 'portalSetting', |
| | | name: 'portalSetting', |
| | | component: () => import('@/views/systemSetting/platform/portalSetting') |
| | | }, |
| | | { |
| | | path: 'otherInterface', |
| | | name: 'otherInterface', |
| | | component: () => import('@/views/systemSetting/platform/otherInterface') |
| | | }, |
| | | { |
| | | path: 'mySetting', |
| | | name: 'mySetting', |
| | | component: () => import('@/views/systemSetting/platform/mySetting') |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: 'authority', |
| | | name: 'authority', |
| | | component: () => import('@/views/systemSetting/baseSetting/authority') |
| | | }, |
| | | { |
| | | path: 'department', |
| | | name: 'department', |
| | | component: () => import('@/views/systemSetting/baseSetting/department') |
| | | }, |
| | | { |
| | | path: 'portalSetting', |
| | | name: 'portalSetting', |
| | | component: () => import('@/views/systemSetting/platform/portalSetting') |
| | | }, |
| | | { |
| | | path: 'otherInterface', |
| | | name: 'otherInterface', |
| | | component: () => import('@/views/systemSetting/platform/otherInterface') |
| | | }, |
| | | { |
| | | path: 'mySetting', |
| | | name: 'mySetting', |
| | | component: () => import('@/views/systemSetting/platform/mySetting') |
| | | path: 'device', |
| | | name: 'device', |
| | | component: () => import('@/views/systemSetting/device'), |
| | | children: [ |
| | | { |
| | | path: 'bayonet', |
| | | name: 'bayonet', |
| | | component: () => import('@/views/systemSetting/device/bayonet') |
| | | }, |
| | | { |
| | | path: 'grid', |
| | | name: 'grid', |
| | | component: () => import('@/views/systemSetting/device/grid'), |
| | | }, |
| | | { |
| | | path: 'point', |
| | | name: 'point', |
| | | component: () => import('@/views/systemSetting/device/point'), |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | }, |
| | |
| | | component: () => import('@/views/operate/car/myIndex'), |
| | | }, |
| | | { |
| | | path:'lawTrajectory', |
| | | name:'lawTrajectory', |
| | | path: 'lawTrajectory', |
| | | name: 'lawTrajectory', |
| | | component: () => import('@/views/operate/car/lawCar'), |
| | | }, |
| | | { |
| | | path:'soilTrajectory', |
| | | name:'soilTrajectory', |
| | | path: 'soilTrajectory', |
| | | name: 'soilTrajectory', |
| | | component: () => import('@/views/operate/car/soilCar'), |
| | | } |
| | | ] |
| | |
| | | component: () => import('@/views/operate/message/myIndex'), |
| | | }, |
| | | { |
| | | path:'mycontrol', |
| | | name:'mycontrol', |
| | | path: 'mycontrol', |
| | | name: 'mycontrol', |
| | | component: () => import('@/views/operate/message/mycontrol'), |
| | | }, |
| | | ] |
| | |
| | | // 引入elementUI |
| | | import tip from 'element-ui'; |
| | | const api = axios.create({ |
| | | baseURL: '/', // 请求的公共地址部分 |
| | | // http://42.193.1.25:8082 |
| | | baseURL: 'http://42.193.1.25:8082/', // 请求的公共地址部分 |
| | | timeout: 15000 |
| | | }) |
| | | // 拦截器 |
| | |
| | | return result; |
| | | } |
| | | else if (response.status === 200 && result.code === 500) { |
| | | tip.Message({ |
| | | type: 'error', |
| | | message: '服务器努力加载中', |
| | | }) |
| | | // tip.Message({ |
| | | // type: 'error', |
| | | // message: '服务器努力加载中', |
| | | // }) |
| | | return result; |
| | | } |
| | | else if (response.status === 200 && result.code === 401) { |
| | |
| | | } |
| | | }, |
| | | (error) => { |
| | | console.log(error); |
| | | let msg ='' |
| | | if (error.code === 'ERR_NETWORK') { |
| | | msg = '网络请求超时' |
| | | }else{ |
| | | msg = '网络错误' |
| | | } |
| | | tip.Message({ |
| | | type: 'error', |
| | | message: msg |
| | | }) |
| | | }, |
| | | ) |
| | | export default api; |
| | |
| | | <div class="header-right"> |
| | | <!-- 搜索框 --> |
| | | <div class="menu-right__item search"> |
| | | <el-input suffix-icon="el-icon-search" placeholder="请输入搜索内容"></el-input> |
| | | <el-input suffix-icon="el-icon-search" v-model="keyword" placeholder="请输入搜索内容"></el-input> |
| | | </div> |
| | | <!-- 登录用户 --> |
| | | <div class="menu-right__item user" @mousemove="flag.user=true" @mouseleave="flag.user=false"> |
| | | <el-avatar :size="20" src="https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png"></el-avatar> |
| | | <span style="padding: 0 5px;">Admin</span> |
| | | <el-avatar :size="20" :src="user.icon" v-if="user.icon"></el-avatar> |
| | | <el-avatar :size="20" src="https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png" v-else> |
| | | </el-avatar> |
| | | <span style="padding: 0 5px;">{{user.username? user.username:'Admin'}}</span> |
| | | <i class="el-icon-arrow-down"></i> |
| | | <!-- 用户操作 --> |
| | | <div class="user-card" v-if="flag.user" @mouseleave="flag.user = false"> |
| | |
| | | user: false, |
| | | message: false |
| | | }, |
| | | user: '', |
| | | menuMessageList: [ |
| | | { |
| | | label: '全部消息', |
| | |
| | | num: 10, |
| | | id: '4m' |
| | | }, |
| | | ] |
| | | ], |
| | | keyword: '', |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getLoginInfo(); |
| | | }, |
| | | methods: { |
| | | // 退出功能 |
| | |
| | | sessionStorage.removeItem('token'); |
| | | sessionStorage.removeItem('tokenHead'); |
| | | this.$router.push({ path: "/login" }) |
| | | }).catch(err=>{ |
| | | }).catch(err => { |
| | | console.log(err); |
| | | }) |
| | | }, |
| | |
| | | } |
| | | }) |
| | | }, |
| | | // 获取登录用户信息 |
| | | getLoginInfo() { |
| | | const info = JSON.parse(sessionStorage.getItem('user')); |
| | | if (info) { |
| | | this.user = info; |
| | | } else { |
| | | const name = sessionStorage.getItem('name'); |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: 'sccg/admin/info?name=' + name, |
| | | }) |
| | | .then(res => { |
| | | sessionStorage.setItem('user', JSON.stringify(res.data)); |
| | | this.user = res.data; |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | display: block; |
| | | line-height: 40px; |
| | | width: 100%; |
| | | &:hover{ |
| | | |
| | | &:hover { |
| | | cursor: pointer; |
| | | color: #fff; |
| | | } |
| | |
| | | <h2 class="siderbar-title">遂昌执法平台</h2> |
| | | <el-scrollbar> |
| | | <!-- 路由 --> |
| | | <el-menu router class="el-menu-vertical" :default-active="$route.path"> |
| | | <el-menu router class="el-menu-vertical" :default-active="$route.path" > |
| | | <!-- 系统设置模块 --> |
| | | <el-submenu index="/home/system" class="firstMenu"> |
| | | <template slot="title"> |
| | |
| | | <span class="fisrtSpan">系统设置</span> |
| | | </template> |
| | | <!-- 基本设置 --> |
| | | <el-submenu index="/home/system/base" class="secondMenu"> |
| | | <el-submenu index="/home/system/userSetting" class="secondMenu"> |
| | | <template slot="title"> |
| | | <span class="secondSpan">基本设置</span> |
| | | </template> |
| | | <!-- 用户管理 --> |
| | | <el-menu-item index="/home/system/user">用户管理</el-menu-item> |
| | | <!-- <el-submenu index="/home/system/base/user" class="thirdMenu"> |
| | | <template slot="title"> |
| | | <span class="thirdSpan">用户管理</span> |
| | | </template> |
| | | <el-menu-item index="/home/system/user">用户列表</el-menu-item> |
| | | </el-submenu> --> |
| | | <el-menu-item index="/home/system/userSetting/user">用户管理</el-menu-item> |
| | | <!-- 角色管理 --> |
| | | <el-menu-item index="/home/system/role">角色管理</el-menu-item> |
| | | <!-- <el-submenu index="/home/system/base/role" class="thirdMenu"> |
| | | <template slot="title"> |
| | | <span class="thirdSpan">角色管理</span> |
| | | </template> |
| | | <el-menu-item index="/home/system/role">角色管理列表</el-menu-item> |
| | | </el-submenu> --> |
| | | <!-- 权限管理 --> |
| | | <!-- <el-menu-item index="/home/system/authority">权限管理</el-menu-item> --> |
| | | <!-- <el-submenu index="/home/system/base/authority" class="thirdMenu"> |
| | | <template slot="title"> |
| | | <span class="thirdSpan">权限管理</span> |
| | | </template> |
| | | <el-menu-item index="/home/system/authority">设置权限</el-menu-item> |
| | | </el-submenu> --> |
| | | <el-menu-item index="/home/system/userSetting/role">角色管理</el-menu-item> |
| | | <!-- 部门管理 --> |
| | | <el-menu-item index="/home/system/department">部门管理</el-menu-item> |
| | | <!-- <el-submenu index="/home/system/base/department" class="thirdMenu"> |
| | | <template slot="title"> |
| | | <span class="thirdSpan">部门管理</span> |
| | | </template> |
| | | <el-menu-item index="/home/system/department">部门管理</el-menu-item> |
| | | </el-submenu> --> |
| | | <el-menu-item index="/home/system/userSetting/department">部门管理</el-menu-item> |
| | | </el-submenu> |
| | | <!-- 平台设置 --> |
| | | <el-submenu index="/home/operate/add" class="secondMenu"> |
| | | <el-submenu index="/home/system/add" class="secondMenu"> |
| | | <template slot="title"> |
| | | <span class="secondSpan">门户管理</span> |
| | | </template> |
| | | <el-menu-item index="/home/system/mySetting">自定义菜单</el-menu-item> |
| | | <el-menu-item index="/home/system/portalSetting">logo管理</el-menu-item> |
| | | <el-menu-item index="/home/system/otherInterface">第三方接口管理</el-menu-item> |
| | | </el-submenu> |
| | | <!-- 设备管理 --> |
| | | <el-submenu index="/home/system/device" class="secondMenu"> |
| | | <template slot="title"> |
| | | <span class="secondSpan">设备管理</span> |
| | | </template> |
| | | <el-menu-item index="/home/system/device/bayonet">卡口设备管理</el-menu-item> |
| | | <el-menu-item index="/home/system/device/point">点位管理</el-menu-item> |
| | | <el-menu-item index="/home/system/device/grid">网格管理</el-menu-item> |
| | | </el-submenu> |
| | | </el-submenu> |
| | | <!-- 运营管理模块 --> |
| | |
| | | </template> |
| | | <el-menu-item index="/home/operate/baseSetting/violation">违规事项设置</el-menu-item> |
| | | <el-menu-item index="/home/operate/baseSetting/illegalBuild">违建事项设置</el-menu-item> |
| | | <el-menu-item index="/home/operate/baseSetting/threepack">门前三包设置</el-menu-item> |
| | | <!-- <el-menu-item index="/home/operate/baseSetting/threepack">门前三包设置</el-menu-item> --> |
| | | </el-submenu> |
| | | <el-submenu index="/home/operate/disposal" class="secondMenu"> |
| | | <template slot="title"> |
| | |
| | | <!-- 父级id --> |
| | | <el-form-item class="optionItem" label="父级:" prop="parentId"> |
| | | <el-select v-model="things.parentId" placeholder="请选择所属类型" :disabled="things.level===1"> |
| | | <!-- <el-option v-for="item in parentList" :key="item.id" :label="item.name" :value="item.id" |
| | | v-if="things.level===1"> |
| | | </el-option> --> |
| | | <el-option :value="mylabel"> |
| | | <el-tree ref="tree" :check-strictly="true" :data="parentList" :props="defaultProps" show-checkbox |
| | | @check-change="handleCheck" default-expand-all node-key="id"> |
| | |
| | | }, |
| | | defaultProps: { |
| | | children: 'children', |
| | | label: 'name' |
| | | label: 'name', |
| | | disabled:(data,node)=>{ |
| | | if (data.level<this.things.level-1) { |
| | | return !data.leaf |
| | | } |
| | | } |
| | | }, |
| | | mylabel:'' |
| | | } |
| | |
| | | }, |
| | | // 案件级别变化 |
| | | async resetParentList(index) { |
| | | this.things.parentId='' |
| | | this.selectOrg.orgsid = []; |
| | | if (index === 1) { |
| | | // this.getTypeThird(); |
| | |
| | | <!-- tools --> |
| | | <div class="tools"> |
| | | <div class="funs"> |
| | | <div class="funsItem"> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="all" @change="selectAll()">全选</el-checkbox> |
| | | </div> |
| | | <div class="funsItem"> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="unsame" @change="disSame(tableData)">反选</el-checkbox> |
| | | </div> |
| | | <div class="funsItem"> |
| | |
| | | opernDialog(data){ |
| | | this.dialogAdd = true; |
| | | this.caseId = data.id; |
| | | // console.log(data); |
| | | }, |
| | | // 关闭界面 |
| | | closeDialog({flag,index}){ |
| | |
| | | |
| | | .funs { |
| | | display: flex; |
| | | |
| | | .funs-sp{ |
| | | border: 1px solid #17324c; |
| | | } |
| | | .funsItem { |
| | | line-height: 28px; |
| | | display: flex; |
| | | align-items: center; |
| | | border: 1px solid #17324c; |
| | | border-radius: 4px; |
| | | font-size: 12px; |
| | | margin-left: 10px; |
| | |
| | | <!-- tools --> |
| | | <div class="tools"> |
| | | <div class="funs"> |
| | | <div class="funsItem"> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="all" @change="selectAll()">全选</el-checkbox> |
| | | </div> |
| | | <div class="funsItem"> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="unsame" @change="disSame(tableData)">反选</el-checkbox> |
| | | </div> |
| | | <div class="funsItem"> |
| | |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | padding: 0 20px; |
| | | |
| | | .funs-sp{ |
| | | border: 1px solid #17324c; |
| | | } |
| | | .funs { |
| | | display: flex; |
| | | |
| | |
| | | line-height: 28px; |
| | | display: flex; |
| | | align-items: center; |
| | | border: 1px solid #17324c; |
| | | border-radius: 4px; |
| | | font-size: 12px; |
| | | margin-left: 10px; |
| | |
| | | </div> |
| | | <div class="upload" v-if="arrive.situationPic.length<4"> |
| | | <el-upload :file-list="fileList" class="upload-demo" |
| | | action="/sccg/file/medias" multiple :show-file-list="false" |
| | | action="http://42.193.1.25:8082/sccg/file/medias" multiple :show-file-list="false" |
| | | :limit="50" :on-success="handleSuccess" list-type="picture" :headers="getToken()"> |
| | | <i class="el-icon-plus"></i> |
| | | </el-upload> |
| | |
| | | </div> |
| | | <div class="upload" v-if="book.writPic.length<4"> |
| | | <el-upload :file-list="fileList" class="upload-demo" |
| | | action="/sccg/file/medias" multiple :show-file-list="false" |
| | | action="http://42.193.1.25:8082/sccg/file/medias" multiple :show-file-list="false" |
| | | :limit="4" :on-success="handleSuccess1" :headers="getToken()"> |
| | | <i class="el-icon-plus"></i> |
| | | </el-upload> |
| | |
| | | </div> |
| | | <div class="upload" v-if="book.originalPic.length<4"> |
| | | <el-upload :file-list="fileList" class="upload-demo" |
| | | action="/sccg/file/medias" multiple :show-file-list="false" |
| | | action="http://42.193.1.25:8082/sccg/file/medias" multiple :show-file-list="false" |
| | | :limit="4" :on-success="handleSuccess2" :headers="getToken()"> |
| | | <i class="el-icon-plus"></i> |
| | | </el-upload> |
| | |
| | | </div> |
| | | <div class="upload" v-if="book.rectifiedPic.length<4"> |
| | | <el-upload :file-list="fileList" class="upload-demo" |
| | | action="/sccg/file/medias" multiple :show-file-list="false" |
| | | action="http://42.193.1.25:8082/sccg/file/medias" multiple :show-file-list="false" |
| | | :limit="4" :on-success="handleSuccess3" :headers="getToken()"> |
| | | <i class="el-icon-plus"></i> |
| | | </el-upload> |
| | |
| | | </div> |
| | | <div class="upload" v-if="book.otherPic.length<4"> |
| | | <el-upload :file-list="fileList" class="upload-demo" |
| | | action="/sccg/file/medias" multiple :show-file-list="false" |
| | | action="http://42.193.1.25:8082/sccg/file/medias" multiple :show-file-list="false" |
| | | :limit="4" :on-success="handleSuccess4" :headers="getToken()"> |
| | | <i class="el-icon-plus"></i> |
| | | </el-upload> |
| | |
| | | </div> |
| | | <div class="upload" v-if="evidence.pic.length<4"> |
| | | <el-upload :file-list="fileList" class="upload-demo" |
| | | action="/sccg/file/medias" multiple :show-file-list="false" |
| | | action="http://42.193.1.25:8082/sccg/file/medias" multiple :show-file-list="false" |
| | | :limit="4" :on-success="handleSuccess2" :headers="getToken()"> |
| | | <i class="el-icon-plus"></i> |
| | | </el-upload> |
| | |
| | | <!-- tools --> |
| | | <div class="tools"> |
| | | <div class="funs"> |
| | | <div class="funsItem"> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="all" @change="selectAll()">全选</el-checkbox> |
| | | </div> |
| | | <div class="funsItem"> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="unsame" @change="disSame(tableData)">反选</el-checkbox> |
| | | </div> |
| | | <div class="funsItem"> |
| | |
| | | |
| | | .funs { |
| | | display: flex; |
| | | |
| | | .funs-sp{ |
| | | border: 1px solid #17324c; |
| | | } |
| | | .funsItem { |
| | | line-height: 28px; |
| | | display: flex; |
| | | align-items: center; |
| | | border: 1px solid #17324c; |
| | | border-radius: 4px; |
| | | font-size: 12px; |
| | | margin-left: 10px; |
| | |
| | | <!-- tools --> |
| | | <div class="tools"> |
| | | <div class="funs"> |
| | | <div class="funsItem"> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="all" @change="selectAll()">全选</el-checkbox> |
| | | </div> |
| | | <div class="funsItem"> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="unsame" @change="disSame(tableData)">反选</el-checkbox> |
| | | </div> |
| | | <div class="funsItem"> |
| | |
| | | |
| | | .funs { |
| | | display: flex; |
| | | |
| | | .funs-sp{ |
| | | border: 1px solid #17324c; |
| | | } |
| | | .funsItem { |
| | | line-height: 28px; |
| | | display: flex; |
| | | align-items: center; |
| | | border: 1px solid #17324c; |
| | | border-radius: 4px; |
| | | font-size: 12px; |
| | | margin-left: 10px; |
| | |
| | | <!-- tools --> |
| | | <div class="tools"> |
| | | <div class="funs"> |
| | | <div class="funsItem"> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="all" @change="selectAll()">全选</el-checkbox> |
| | | </div> |
| | | <div class="funsItem"> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="unsame" @change="disSame(tableData)">反选</el-checkbox> |
| | | </div> |
| | | <div class="funsItem"> |
| | |
| | | |
| | | .funs { |
| | | display: flex; |
| | | |
| | | .funs-sp{ |
| | | border: 1px solid #17324c; |
| | | } |
| | | .funsItem { |
| | | line-height: 28px; |
| | | display: flex; |
| | | align-items: center; |
| | | border: 1px solid #17324c; |
| | | border-radius: 4px; |
| | | font-size: 12px; |
| | | margin-left: 10px; |
| | |
| | | </div> |
| | | <div class="user-item"> |
| | | <!-- 小类名称 --> |
| | | <el-form-item class="optionItems" label="小类名称:" prop="typeId" > |
| | | <el-form-item class="optionItems" label="小类名称:" prop="typeId"> |
| | | <el-select v-model="vio.typeId" placeholder="请选择小类名称" @change="handleSmallKindChange"> |
| | | <el-option v-for="item in smallKindList" :key="item.id" :label="item.name" |
| | | :value="item.id"> |
| | |
| | | </el-form-item> |
| | | </div> |
| | | <!-- 案由 --> |
| | | <el-form-item class="optionItem" label="案由:" prop="actionCause"> |
| | | <el-select v-model="vio.actionCause" placeholder="请输入案由"> |
| | | <el-option v-for="item in anYouList" :key="item.id" :label="item.name" |
| | | :value="item.id" > |
| | | </el-option> |
| | | </el-select> |
| | | <el-form-item class="optionItem anyou" label="案由:" prop="actionCause"> |
| | | <el-select v-model="vio.actionCause" placeholder="请输入案由" filterable @blur="selectBlur"> |
| | | <el-option v-for="item in anYouList" :key="item.id" :label="item.name" :value="item.name" > |
| | | </el-option> |
| | | </el-select> |
| | | <!-- <el-input v-model="vio.actionCause" placeholder="请输入案由"></el-input> --> |
| | | </el-form-item> |
| | | <!-- 所属区县 --> |
| | |
| | | </template> |
| | | <script> |
| | | import MyMap from '@/components/map' |
| | | import { validateName, validatePhone, validateCarNum } from '@/utils/validate' |
| | | import { validateName, validatePhone, validateCarNum, validateCardId } from '@/utils/validate' |
| | | import {getTypeList} from '@/utils/helper' |
| | | export default { |
| | | components: { |
| | | MyMap |
| | |
| | | } |
| | | const checkName = (rule, value, callback) => { |
| | | if (value) { |
| | | validateName(value) ? callback():callback(new Error('请输入正确的姓名')) |
| | | validateName(value) ? callback() : callback(new Error('请输入正确的姓名')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | const checkCardId = (rule, value, callback) => { |
| | | if (value) { |
| | | callback(); |
| | | validateCardId(value) ? callback() : callback(new Error('请输入正确的身份证号码')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | const checkPhone = (rule, value, callback) => { |
| | | if (value) { |
| | | validatePhone(value) ? callback():callback(new Error('请输入正确的手机号')); |
| | | validatePhone(value) ? callback() : callback(new Error('请输入正确的手机号')); |
| | | } else { |
| | | callback() |
| | | } |
| | |
| | | if (value) { |
| | | callback(); |
| | | } else { |
| | | if(this.vio.linkShop===1){ |
| | | if (this.vio.linkShop === 1) { |
| | | callback(new Error('关联商铺名字不能为空')); |
| | | }else{ |
| | | } else { |
| | | callback(); |
| | | } |
| | | } |
| | |
| | | required: true, trigger: 'blur', validator: checkDesc |
| | | } |
| | | ], |
| | | informant:[ |
| | | informant: [ |
| | | { |
| | | required: false, trigger: 'blur', validator: checkName |
| | | } |
| | | ], |
| | | informantIdCard:[ |
| | | informantIdCard: [ |
| | | { |
| | | required: false, trigger: 'blur', validator: checkCardId |
| | | } |
| | | ], |
| | | informantPhoneCode:[ |
| | | informantPhoneCode: [ |
| | | { |
| | | required: false, trigger: 'blur', validator: checkPhone |
| | | } |
| | | ], |
| | | // linkShop:0,//是否关联商铺(0否1是) |
| | | shopName:[ |
| | | shopName: [ |
| | | { |
| | | required: false, trigger: 'blur', validator: checkLink |
| | | } |
| | |
| | | ], |
| | | streetList: [], |
| | | communityList: [], |
| | | anYouList:[], |
| | | anYouList: [], |
| | | } |
| | | }, |
| | | created() { |
| | | const { setBigKindList,getStreetList,getEventLevel } = this; |
| | | const { setBigKindList, getStreetList, getEventLevel } = this; |
| | | console.log(this.mytype); |
| | | this.vio.category = this.mytype + 1; |
| | | setBigKindList(); |
| | |
| | | this.refresh(); |
| | | }, |
| | | // 设置大类 |
| | | async setBigKindList(){ |
| | | this.bigKindList = await this.getBigKind(); |
| | | async setBigKindList() { |
| | | this.bigKindList = await this.getBigKind(); |
| | | }, |
| | | // 设置小类 |
| | | async setSmallKindList(id){ |
| | | async setSmallKindList(id) { |
| | | let arr = await this.getSmallKind(); |
| | | this.smallKindList = arr.filter(item=>{ |
| | | if(item.parentId===id){ |
| | | this.smallKindList = arr.filter(item => { |
| | | if (item.parentId === id) { |
| | | return item; |
| | | } |
| | | }) |
| | | }, |
| | | // 设置案由 |
| | | async setAnYouList(id){ |
| | | async setAnYouList(id) { |
| | | let arr = await this.getAnYouList(); |
| | | this.anYouList = arr.filter(item=>{ |
| | | if(item.parentId===id){ |
| | | this.anYouList = arr.filter(item => { |
| | | if (item.parentId === id) { |
| | | return item; |
| | | } |
| | | }) |
| | |
| | | return arr |
| | | }, |
| | | // 获取案件等级列表 |
| | | getEventLevel() { |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: 'sccg/violations/query/event_type' |
| | | }) |
| | | .then(res => { |
| | | this.eventLevelList = res.data; |
| | | }) |
| | | async getEventLevel() { |
| | | this.eventLevelList = await getTypeList(1,'02'); |
| | | }, |
| | | // 查询所属案由 |
| | | async getAnYouList() { |
| | |
| | | this.$emit('changeDialog', { flag: false }) |
| | | }, |
| | | // 获取街道信息 |
| | | getStreetList() { |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: 'sccg/dict/query_Street_type' |
| | | }) |
| | | .then(res => { |
| | | this.streetList = res.data; |
| | | }) |
| | | async getStreetList() { |
| | | this.streetList = await getTypeList(1,'10'); |
| | | }, |
| | | // 街道更改 |
| | | handleStreet(id) { |
| | | console.log(id); |
| | | this.vio.communityId = ''; |
| | | // this.communityList = getTypeList(1,'11') |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: 'sccg/dict/query_social_type?id=' + id |
| | |
| | | value === 0 ? this.vio.shopName = '' : ''; |
| | | }, |
| | | // 大类选中 |
| | | handleBigKindChange(id){ |
| | | handleBigKindChange(id) { |
| | | this.vio.actionCause = ''; |
| | | this.vio.typeId = ''; |
| | | this.setSmallKindList(id); |
| | | }, |
| | | // 小类选中 |
| | | handleSmallKindChange(id){ |
| | | handleSmallKindChange(id) { |
| | | this.vio.actionCause = ''; |
| | | this.setAnYouList(id); |
| | | } |
| | | }, |
| | | // 案由输入 |
| | | selectBlur(e){ |
| | | if(e.target.value){ |
| | | this.vio.actionCause = e.target.value; |
| | | console.log(e.target.value); |
| | | } |
| | | } |
| | | }, |
| | | props: ['mytype', 'changeDialog', 'refresh'] |
| | | } |
| | |
| | | .map-area { |
| | | flex: 1; |
| | | } |
| | | |
| | | .not-need { |
| | | color: #4b9bb7; |
| | | |
| | | .not-need__header { |
| | | line-height: 40px; |
| | | } |
| | | |
| | | .my-sp-item { |
| | | display: flex; |
| | | |
| | | .not-item-left, |
| | | .not-item-right { |
| | | display: flex; |
| | | |
| | | .el-input { |
| | | flex: 1; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .not-need-item { |
| | | line-height: 40px; |
| | | margin-bottom: 22px; |
| | | display: flex; |
| | | |
| | | label { |
| | | width: 100px; |
| | | padding-right: 12px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .el-input { |
| | | flex: 1; |
| | | } |
| | | |
| | | .not-need__inner { |
| | | flex: 1; |
| | | line-height: 40px; |
| | | padding: 0 15px; |
| | | border-radius: 4px; |
| | | color: #fff; |
| | | // outline: #409eff solid 1px; |
| | | outline: none; |
| | | background-color: #09152f; |
| | | border: 1px solid #17324c; |
| | | } |
| | | .anyou{ |
| | | :deep(.el-select){ |
| | | display: block; |
| | | } |
| | | } |
| | | |
| | |
| | | <span class="line">|</span> |
| | | <span @click="handleNotDeal(scope.row)">暂不处理</span> |
| | | </div> |
| | | <div class="operation" v-else> |
| | | <span @click="JumpView(scope.row)">查看</span> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <!-- tools --> |
| | | <div class="tools"> |
| | | <div class="funs"> |
| | | <div class="funsItem"> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="all" @change="selectAll()" |
| | | :disabled="tableData.length !== 0 ? false : true">全选</el-checkbox> |
| | | </div> |
| | | <div class="funsItem"> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="unsame" @change="disSame(tableData)">反选</el-checkbox> |
| | | </div> |
| | | <div class="funsItem"> |
| | |
| | | url: `sccg/base_case/baseCaseDetail/${code}` |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | this.info = res.data; |
| | | this.dialogView = true; |
| | | }) |
| | |
| | | |
| | | .funs { |
| | | display: flex; |
| | | |
| | | .funs-sp{ |
| | | border: 1px solid #17324c; |
| | | } |
| | | .funsItem { |
| | | line-height: 28px; |
| | | display: flex; |
| | | align-items: center; |
| | | border: 1px solid #17324c; |
| | | border-radius: 4px; |
| | | font-size: 12px; |
| | | margin-left: 10px; |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | const that = this; |
| | | this.getCodeList(); |
| | | }, |
| | | methods: { |
| | | handleUser() { |
| | |
| | | }, |
| | | handleBack(){ |
| | | this.$emit('sendDialog',{flag:false}) |
| | | }, |
| | | // 获取字典 |
| | | getCodeList(){ |
| | | this.$axios({ |
| | | method:'get', |
| | | url:'sccg/dict/queryByCode?code='+"03" |
| | | }) |
| | | .then(res=>{ |
| | | console.log(res); |
| | | }) |
| | | } |
| | | }, |
| | | props: ['sendDialog'] |
| | |
| | | <span>输入查询:</span> |
| | | <el-input placeholder="店铺(门店)名称" v-model="search"></el-input> |
| | | </div> |
| | | <div class="status"> |
| | | <!-- <div class="status"> |
| | | <span>店铺状态:</span> |
| | | <el-input placeholder="选择店铺状态" v-model="shopStatus"></el-input> |
| | | </div> |
| | | </div> --> |
| | | <div class="findBtn"> |
| | | <el-button type="primary" @click="setSearch" icon="el-icon-search">查询</el-button> |
| | | <el-button icon="el-icon-delete-solid" @click="clearSearch">重置</el-button> |
| | |
| | | <span class="data-detail">{{baseCase.category === 1 ? '违规' : '违建'}}</span> |
| | | </el-form-item> |
| | | <el-form-item label="事件等级:"> |
| | | <span class="data-detail">xxxxxx</span> |
| | | <span class="data-detail">{{baseCase.violations.gradeText}}</span> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="data-item"> |
| | | <el-form-item label="大类名称:"> |
| | | <span class="data-detail">xxxxxx</span> |
| | | <span class="data-detail">{{baseCase.violations.categoryText}}</span> |
| | | </el-form-item> |
| | | <el-form-item label="小类名称:"> |
| | | <span class="data-detail">xxxxxx</span> |
| | | <span class="data-detail">{{baseCase.violations.categoryText}}</span> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="data-item"> |
| | | <el-form-item label="所属区县:"> |
| | | <span class="data-detail">xxxx</span> |
| | | <span class="data-detail"></span> |
| | | </el-form-item> |
| | | <el-form-item label="所属街道:"> |
| | | <span class="data-detail">{{baseCase.streetId}}</span> |
| | | <span class="data-detail">{{baseCase.streetText}}</span> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="data-item"> |
| | | <el-form-item label="所属社区:"> |
| | | <span class="data-detail">{{baseCase.communityId}}</span> |
| | | <span class="data-detail">{{baseCase.communityText}}</span> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="data-item"> |
| | |
| | | <span class="data-detail">{{baseCase.site}}</span> |
| | | </el-form-item> |
| | | <el-form-item label="车牌号:"> |
| | | <span class="data-detail">xxxxx</span> |
| | | <span class="data-detail">{{baseCase.violations.carNumber}}</span> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="data-item"> |
| | | <el-form-item label="关联商铺名称:"> |
| | | <span class="data-detail">xxxxxx</span> |
| | | <span class="data-detail">{{baseCase.violations.shopName}}</span> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="data-item"> |
| | | <el-form-item label="问题描述:"> |
| | | <span class="data-detail">xxxxxxx</span> |
| | | <span class="data-detail">{{baseCase.violations.description}}</span> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="data-item"> |
| | | <el-form-item label="反映人:"> |
| | | <span class="data-detail">xxxxxxx</span> |
| | | <span class="data-detail">{{baseCase.violations.informant}}</span> |
| | | </el-form-item> |
| | | <el-form-item label="联系方式:"> |
| | | <span class="data-detail">xxxxxxx</span> |
| | | <span class="data-detail">{{baseCase.violations.informantPhoneCode}}</span> |
| | | </el-form-item> |
| | | </div> |
| | | <!-- 审核意见 |
| | |
| | | </el-form> |
| | | <div class="form-footer"> |
| | | <el-button type="primary" @click.native.prevent="handleSubmit">结案</el-button> |
| | | <el-button>返回</el-button> |
| | | <el-button @click.native.prevent="handleBack">返回</el-button> |
| | | </div> |
| | | </div> |
| | | <MyProcess v-else-if="activeIndex === 1" :handlePassVo="handlePassVo" :baseCase="baseCase"></MyProcess> |
| | | <MyFilePicture v-else-if="activeIndex === 2" :filesPictureVo="filesPictureVo"></MyFilePicture> |
| | | <MySovleProblem v-else-if="activeIndex === 3" :problemProVo="problemProVo"></MySovleProblem> |
| | | <MyScene v-else :currentSitVo="currentSitVo"></MyScene> |
| | | <MyFilePicture v-else-if="activeIndex === 2" :baseCase="baseCase" :filesPictureVo="filesPictureVo"></MyFilePicture> |
| | | <MySovleProblem v-else-if="activeIndex === 3" :baseCase="baseCase" :problemProVo="problemProVo"></MySovleProblem> |
| | | <MyScene v-else :baseCase="baseCase" :currentSitVo="currentSitVo"></MyScene> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | changeComponent(index) { |
| | | this.activeIndex = index; |
| | | }, |
| | | handleBack(){ |
| | | this.$emit('closeDialog', { flag: false }); |
| | | }, |
| | | // 提交审核意见 |
| | | handleSubmit() { |
| | | const { baseCase } = this; |
| | |
| | | <span class="data-detail">{{baseCase.category === 1 ? '违规' : '违建'}}</span> |
| | | </el-form-item> |
| | | <el-form-item label="大类名称:"> |
| | | <span class="data-detail">xxxxxx</span> |
| | | <span class="data-detail">{{baseCase.violations.categoryText}}</span> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="data-item"> |
| | | <el-form-item label="小类名称:"> |
| | | <span class="data-detail">xxxxxx</span> |
| | | <span class="data-detail">{{baseCase.violations.typeText}}</span> |
| | | </el-form-item> |
| | | <el-form-item label="事件等级:"> |
| | | <span class="data-detail">xxxxxx</span> |
| | | <span class="data-detail">{{baseCase.violations.gradeText}}</span> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="data-item"> |
| | | <el-form-item label="案由:"> |
| | | <span class="data-detail">xxxxx</span> |
| | | <span class="data-detail">{{baseCase.violations.actionCause}}</span> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="data-item"> |
| | |
| | | <span class="data-detail">xxxx</span> |
| | | </el-form-item> |
| | | <el-form-item label="所属街道:"> |
| | | <span class="data-detail">{{baseCase.streetId}}</span> |
| | | <span class="data-detail">{{baseCase.streetText}}</span> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="data-item"> |
| | | <el-form-item label="所属社区:"> |
| | | <span class="data-detail">{{baseCase.communityId}}</span> |
| | | <span class="data-detail">{{baseCase.communityText}}</span> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="data-item"> |
| | |
| | | </div> |
| | | <div class="data-item"> |
| | | <el-form-item label="问题描述:"> |
| | | <span class="data-detail">xxxxxx</span> |
| | | <span class="data-detail">{{baseCase.violations.description}}</span> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="data-item"> |
| | |
| | | </div> |
| | | <div class="show-item"> |
| | | <div class="show-wrap"> |
| | | <MyProcess v-if="activeIndex === 1" :handlePassVo="handlePassVo"></MyProcess> |
| | | <MyFilePicture v-else-if="activeIndex === 2" :filesPictureVo="filesPictureVo"></MyFilePicture> |
| | | <MySovleProblem v-else-if="activeIndex === 3" :problemProVo="problemProVo"></MySovleProblem> |
| | | <MyScene v-else :currentSitVo="currentSitVo"></MyScene> |
| | | <MyProcess v-if="activeIndex === 1" :handlePassVo="handlePassVo" :baseCase="baseCase"></MyProcess> |
| | | <MyFilePicture v-else-if="activeIndex === 2" :filesPictureVo="filesPictureVo" ></MyFilePicture> |
| | | <MySovleProblem v-else-if="activeIndex === 3" :baseCase="baseCase" :problemProVo="problemProVo"></MySovleProblem> |
| | | <MyScene v-else :currentSitVo="currentSitVo" :baseCase="baseCase"></MyScene> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <!-- tools --> |
| | | <div class="tools"> |
| | | <div class="funs"> |
| | | <div class="funsItem"> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="all" @change="selectAll()">全选</el-checkbox> |
| | | </div> |
| | | <div class="funsItem"> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="unsame" @change="disSame(tableData)">反选</el-checkbox> |
| | | </div> |
| | | <div class="funsItem"> |
| | |
| | | |
| | | .funs { |
| | | display: flex; |
| | | |
| | | .funs-sp{ |
| | | border: 1px solid #17324c; |
| | | } |
| | | .funsItem { |
| | | line-height: 28px; |
| | | display: flex; |
| | | align-items: center; |
| | | border: 1px solid #17324c; |
| | | border-radius: 4px; |
| | | font-size: 12px; |
| | | margin-left: 10px; |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <span class="message-add" @click='dialogCreate = true'>添加栏目</span> |
| | | <span class="message-add" @click='dialogCreate = true'> 添加栏目</span> |
| | | </div> |
| | | </el-form-item> |
| | | <!-- 消息标题 --> |
| | |
| | | <!-- 接收对象 --> |
| | | <el-form-item class="optionItem" label="接收对象:" prop="targetTo"> |
| | | <div class="message-item__left"> |
| | | <el-select v-model="role.targetTo" multiple :placeholder="checkNum"> |
| | | <el-select v-model="role.targetTo" placeholder="请选择接收对象"> |
| | | <el-option :value="role.targetTo"> |
| | | <el-tree ref="tree" :data="departList" :props="defaultProps" |
| | | <el-tree ref="tree" check-strictly :data="departList" :props="defaultProps" |
| | | show-checkbox @check="handleCheck" default-expand-all node-key="id"> |
| | | </el-tree> |
| | | </el-option> |
| | |
| | | </el-form-item> |
| | | <!-- 消息内容 --> |
| | | <el-form-item class="optionItem" label="消息内容:" prop="body"> |
| | | <MyEditor :content="role.body"></MyEditor> |
| | | <MyEditor ref="edit" @getMyBody="getMyBody"></MyEditor> |
| | | <!-- <el-input type="textarea" v-model="role.description" placeholder="请输入描述内容200字以内"></el-input> --> |
| | | </el-form-item> |
| | | <!-- 提醒方式 --> |
| | |
| | | <div class="optionBtn"> |
| | | <el-button type="primary" class="btn save">保存 |
| | | </el-button> |
| | | <el-button type="primary" class="btn submit">发布 |
| | | <el-button type="primary" @click.native.prevent="handleSubmit" class="btn submit">发布 |
| | | </el-button> |
| | | <el-button type="primary" class="btn submit">预览 |
| | | </el-button> |
| | | <el-button class="btn cancel">重置</el-button> |
| | | <el-button class="btn cancel" @click.native.prevent="handleReset">重置</el-button> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | } |
| | | }; |
| | | const validateTruename = (rule, value, callback) => { |
| | | if (value) { |
| | | if (value.length !== 0) { |
| | | callback(); |
| | | } else { |
| | | callback(); |
| | | callback(new Error('请选择接收对象')); |
| | | } |
| | | }; |
| | | return { |
| | |
| | | channelCode: 1, |
| | | }, |
| | | createRoleRules: { |
| | | name: [ |
| | | messageType: [ |
| | | { required: true, trigger: "blur", validator: validateNickname }, |
| | | ], |
| | | type: [ |
| | | head: [ |
| | | { required: false, trigger: "blur", validator: validatePass }, |
| | | ], |
| | | description: [ |
| | | targetTo: [ |
| | | { required: false, trigger: "blur", validator: validateTruename }, |
| | | ], |
| | | }, |
| | | colList: [], |
| | | departList: [], |
| | | checkNum: '请选择接收对象', |
| | | typeList: [], |
| | | dialogCreate: false, |
| | | defaultProps: { |
| | |
| | | if (data.createTime) { |
| | | return !data.leaf |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | checkedList: [] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | if (obj.children !== null) { |
| | | if (obj.children.length !== 0) { |
| | | obj.children.forEach(item => { |
| | | return this.setChildren(item); |
| | | return this.setChildren(item); |
| | | }) |
| | | } |
| | | } else { |
| | | if (obj.userInfoDTOS.length !== 0) { |
| | | if (obj.userInfoDTOS.length !== 0) { |
| | | obj.children = []; |
| | | obj.userInfoDTOS.forEach(item => { |
| | | obj.children.push({ id: item.userId, departName: item.username }) |
| | |
| | | }, |
| | | // 选中id |
| | | handleCheck(data, node) { |
| | | console.log(node.checkedKeys); |
| | | // this.checkList = node.checkedKeys; |
| | | // if(node.checkedKeys.length === 1){ |
| | | // this.role.targetTo = data.departName; |
| | | // } |
| | | // let per = node.checkedKeys.length; |
| | | // per ===0 ? this.checkNum="请选择接收对象" : this.checkNum = ''+per; |
| | | console.log(data, node); |
| | | this.checkedList = node.checkedKeys; |
| | | this.role.targetTo = node.checkedKeys.length + '人'; |
| | | }, |
| | | // 新建消息 |
| | | handleSubmit() { |
| | | console.log(this.role); |
| | | this.$refs.user.validate((valid) => { |
| | | console.log(valid) |
| | | if (valid) { |
| | | const {role,checkedList} = this; |
| | | this.$axios({ |
| | | method: 'post', |
| | | url: 'sccg/message/sendMessage', |
| | | data: { |
| | | body: role.body, |
| | | channelCode: role.channelCode, |
| | | head: role.head, |
| | | messageType: role.messageType, |
| | | sendTime: new Date(), |
| | | targetTo: checkedList.join(',') |
| | | } |
| | | }) |
| | | .then(res=>{ |
| | | if(res.code === 200){ |
| | | this.$message({ |
| | | type:'success', |
| | | message:'发送成功', |
| | | }) |
| | | this.$emit('closeMyDialog',{flag:false,index:1}); |
| | | } |
| | | }) |
| | | } else { |
| | | return false; |
| | | } |
| | | }) |
| | | }, |
| | | // 获得消息体 |
| | | getMyBody(obj) { |
| | | console.log(obj); |
| | | this.role.body = obj; |
| | | }, |
| | | // 重置表单 |
| | | handleReset(){ |
| | | this.$refs.edit.editor.txt.clear(); |
| | | // this.$refs.edit.wangEditor.txt.html('<p><br></p>') |
| | | this.setDepartList(); |
| | | this.$refs.user.resetFields(); |
| | | } |
| | | }, |
| | | props: [''] |
| | | props: ['closeMyDialog'] |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="channelCode" label="消息分类" min-width="10"> |
| | | <template slot-scope="scope"> |
| | | <span>{{scope.row.channelCode === '01' ? '站内信':scope.row.channelCode ==='02'?"邮件":'短信'}}</span> |
| | | <span>{{scope.row.channelCode === '01' ? '站内信':scope.row.channelCode |
| | | ==='02'?"邮件":'短信'}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="status" label="发布状态" min-width="5"> |
| | |
| | | <div class="operation"> |
| | | <el-link icon="el-icon-view" :underline="false" @click="dialogView = true">查看</el-link> |
| | | <el-link icon="el-icon-edit" class="leftPx" :underline="false">编辑</el-link> |
| | | <el-link class="leftPx" icon="el-icon-delete-solid" :underline="false" @click="handleDelete([scope.row.id])">删除</el-link> |
| | | <el-link class="leftPx" icon="el-icon-delete-solid" :underline="false" |
| | | @click="handleDelete([scope.row.id])">删除</el-link> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <!-- 新建消息 --> |
| | | <el-dialog title="新建消息" :visible.sync="dialogCreate" v-if="dialogCreate" width="80%" |
| | | :before-close="handleConfirmClose"> |
| | | <MyCreate></MyCreate> |
| | | <MyCreate @closeMyDialog="closeDialog"></MyCreate> |
| | | </el-dialog> |
| | | <!-- 消息详情 --> |
| | | <el-dialog title="消息详情" :visible.sync="dialogView" v-if="dialogView" width="45%" |
| | |
| | | <!-- tools --> |
| | | <div class="tools"> |
| | | <div class="funs"> |
| | | <div class="funsItem"> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="all" @change="selectAll()">全选</el-checkbox> |
| | | </div> |
| | | <div class="funsItem"> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="unsame" @change="disSame(tableData)">反选</el-checkbox> |
| | | </div> |
| | | <div class="funsItem"> |
| | |
| | | import MyCreate from './createUser' |
| | | export default { |
| | | components: { |
| | | MyView,MyCreate |
| | | MyView, MyCreate |
| | | }, |
| | | data() { |
| | | return { |
| | | tableData: [], |
| | | context: "", |
| | | dialogCreate:false, |
| | | dialogView:false, |
| | | dialogCreate: false, |
| | | dialogView: false, |
| | | totalNum: null, |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | |
| | | this.setTableData(); |
| | | }, |
| | | methods: { |
| | | handleDelete(idarr){ |
| | | handleDelete(idarr) { |
| | | this.$axios({ |
| | | method:'post', |
| | | url:'sccg/message/delete?ids='+idarr, |
| | | method: 'post', |
| | | url: 'sccg/message/delete?ids=' + idarr, |
| | | }) |
| | | .then(res=>{ |
| | | if(res.code===200){ |
| | | this.$message({ |
| | | type:'success', |
| | | message:'删除成功', |
| | | }) |
| | | this.setTableData(); |
| | | }else{ |
| | | this.$message({ |
| | | type:'error', |
| | | message:res.message |
| | | }) |
| | | } |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '删除成功', |
| | | }) |
| | | this.setTableData(); |
| | | } else { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: res.message |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | // 设置表格数据 |
| | | async setTableData() { |
| | |
| | | // 获取消息数据 |
| | | async getMessageList() { |
| | | let arr = []; |
| | | const {currentPage,pageSize} = this; |
| | | const { currentPage, pageSize } = this; |
| | | await this.$axios({ |
| | | method: 'post', |
| | | url: 'sccg/message/list', |
| | |
| | | this.search(); |
| | | }, |
| | | // 关闭弹窗 |
| | | handleClose(done){ |
| | | handleClose(done) { |
| | | done(); |
| | | }, |
| | | // 确认关闭弹窗 |
| | | handleConfirmClose(done){ |
| | | handleConfirmClose(done) { |
| | | this.$confirm('确认关闭?') |
| | | .then(_=>{ |
| | | done(); |
| | | }) |
| | | .catch(err=>{ |
| | | console.log(err); |
| | | }) |
| | | .then(_ => { |
| | | done(); |
| | | }) |
| | | .catch(err => { |
| | | console.log(err); |
| | | }) |
| | | }, |
| | | // 自定义关闭弹窗 |
| | | closeDialog({flag,index}){ |
| | | closeDialog({ flag, index }) { |
| | | this.dialogCreate = flag; |
| | | this.dialogView = flag; |
| | | if(index ===1 ){ |
| | | if (index === 1) { |
| | | this.setTableData(); |
| | | } |
| | | } |
| | |
| | | margin-top: 20px; |
| | | padding-bottom: 50px; |
| | | border: 1pox solid #fff; |
| | | .el-link{ |
| | | |
| | | .el-link { |
| | | color: #4b9bb7; |
| | | } |
| | | .leftPx{ |
| | | |
| | | .leftPx { |
| | | margin-left: 10px; |
| | | } |
| | | |
| | | .mainTitle { |
| | | line-height: 60px; |
| | | } |
| | |
| | | .funs { |
| | | display: flex; |
| | | |
| | | .funs-sp { |
| | | border: 1px solid #17324c; |
| | | } |
| | | |
| | | .funsItem { |
| | | line-height: 28px; |
| | | display: flex; |
| | | align-items: center; |
| | | border: 1px solid #17324c; |
| | | |
| | | border-radius: 4px; |
| | | font-size: 12px; |
| | | margin-left: 10px; |
| | |
| | | <!-- 上级部门 --> |
| | | <el-form-item class="optionItems" label="上级部门:" prop="parentId"> |
| | | <el-select v-model="depart.parentId" placeholder="请输入上级部门"> |
| | | <el-option v-for="item in departList" :key="item.departName" :label="item.departName" |
| | | :value="item.id" :disabled="item.disabled"> |
| | | <el-option :value="mylabel"> |
| | | <el-tree ref="tree" :check-strictly="true" :data="departList" :props="defaultProps" |
| | | show-checkbox @check-change="handleCheck" default-expand-all node-key="id"> |
| | | </el-tree> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | <!-- <el-input v-model="depart.departType" placeholder="请选择部门类型"></el-input> --> |
| | | </el-form-item> |
| | | <!--添加人员 --> |
| | | <el-form-item class="optionItem add" label="添加人员:"> |
| | | <ul class="addPerson"> |
| | | <li><i class="el-icon-user-solid"></i></li> |
| | | <li><i class="el-icon-user-solid"></i></li> |
| | | <li><i class="el-icon-user-solid"></i></li> |
| | | <li><i class="el-icon-plus" @click="openUser = true"></i></li> |
| | | <li v-for="(item,index) in cehckedList" :key="index" @click="setLeader(index)"> |
| | | <div class="li-item"> |
| | | <div class="li-icon"> |
| | | <i :class="['el-icon-user-solid',item.checked ? 'leader': '']"></i> |
| | | </div> |
| | | <label style="font-size: 12px;" :class="[item.checked ? 'leader': '']">{{item.username}}</label> |
| | | </div> |
| | | </li> |
| | | <li class="li-btn"><i class="el-icon-plus" @click="openUser = true"></i></li> |
| | | </ul> |
| | | <div class="card" v-if="openUser"> |
| | | <el-card class="box-card"> |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { getTypeList } from '@/utils/helper' |
| | | export default { |
| | | data() { |
| | | const validateNickname = (rule, value, callback) => { |
| | |
| | | if (!value) { |
| | | callback(); |
| | | } else { |
| | | // const rep = /(^1[3|4|5|7|8|9]\d{9}$)|(^09\d{8}$)/ |
| | | // if (!rep.test(value)) { |
| | | // callback("请输入正确的手机号码"); |
| | | // } |
| | | callback(); |
| | | } |
| | | }; |
| | |
| | | userList: [], |
| | | departList: [], |
| | | checkedUser: [], |
| | | cehckedList: [], |
| | | openUser: false, |
| | | departTypeList: [], |
| | | selectOrg: { |
| | | orgsid: [] |
| | | }, |
| | | mylabel: '', |
| | | defaultProps: { |
| | | children: 'children', |
| | | label: 'departName', |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | handleUser() { |
| | | this.$refs.user.validate((valid) => { |
| | | if (valid) { |
| | | const { depart, checkedUser, userList } = this; |
| | | console.log(depart); |
| | | console.log(checkedUser); |
| | | const { depart,cehckedList,selectOrg } = this; |
| | | const arr = []; |
| | | checkedUser.forEach(item => { |
| | | userList.forEach(child => { |
| | | if (item === child.id) { |
| | | arr.push({ isLeader: 0, userId: item,}); |
| | | } |
| | | }) |
| | | cehckedList.forEach(item => { |
| | | arr.push({ isLeader: item.isLeader, userId: item.id, }); |
| | | }) |
| | | console.log(arr); |
| | | this.$axios({ |
| | | method: 'post', |
| | | url:'/sccg/depart/create', |
| | | url: '/sccg/depart/create', |
| | | data: { |
| | | departName: depart.departName, |
| | | parentId: depart.parentId, departType: depart.departType, departDes: depart.departDes, |
| | | parentId: selectOrg.orgsid[0], departType: depart.departType, departDes: depart.departDes, |
| | | departManagerList: arr |
| | | } |
| | | }).then(res => { |
| | |
| | | url: 'sccg/depart/tree', |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | res.data.unshift({ id: 0, departName: '顶级菜单' }) |
| | | this.departList = res.data; |
| | | }) |
| | |
| | | }, |
| | | addUser() { |
| | | console.log(this.checkedUser); |
| | | console.log(this.userList); |
| | | this.cehckedList = []; |
| | | this.userList.forEach(item => { |
| | | this.checkedUser.forEach(child => { |
| | | if (item.id == child) { |
| | | this.cehckedList.push({ id: item.id, username: item.username, isLeader: 0, checked: false }); |
| | | } |
| | | }) |
| | | }) |
| | | this.cehckedList[0].isLeader = 1; |
| | | this.cehckedList[0].checked = true; |
| | | this.openUser = false; |
| | | }, |
| | | handleClose() { |
| | | this.$emit('changMyDialog', { flag: false }); |
| | | }, |
| | | // 获取部门类型 |
| | | getDepartTypeList() { |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: 'sccg/dict/query_depart_type', |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | this.departTypeList = res.data; |
| | | async getDepartTypeList() { |
| | | this.departTypeList = await getTypeList(1, '08') |
| | | }, |
| | | handleCheck(data, checked) { |
| | | this.depart.parentId = data.departName; |
| | | // 获取当前选择的id在数组中的索引 |
| | | const indexs = this.selectOrg.orgsid.indexOf(data.id) |
| | | // 如果不存在数组中,并且数组中已经有一个id并且checked为true的时候,代表不能再次选择。 |
| | | if (indexs < 0 && this.selectOrg.orgsid.length === 1 && checked) { |
| | | this.$message({ |
| | | message: '只能选择一个部门!', |
| | | type: 'warning', |
| | | showClose: true |
| | | }) |
| | | // 设置已选择的节点为false 很重要 |
| | | this.$refs.tree.setChecked(data, false) |
| | | } else if (this.selectOrg.orgsid.length === 0 && checked) { |
| | | // 发现数组为空 并且是已选择 |
| | | // 防止数组有值,首先清空,再push |
| | | this.selectOrg.orgsid = [] |
| | | this.selectOrg.orgsid.push(data.id) |
| | | } else if ( |
| | | indexs >= 0 && |
| | | this.selectOrg.orgsid.length === 1 && |
| | | !checked |
| | | ) { |
| | | // 再次直接进行赋值为空操作 |
| | | this.selectOrg.orgsid = [] |
| | | this.depart.parentId = ''; |
| | | } |
| | | }, |
| | | // 设置领导 |
| | | setLeader(idx){ |
| | | this.cehckedList.forEach((item,index)=>{ |
| | | if(index === idx){ |
| | | item.checked = true; |
| | | item.isLeader = 1; |
| | | }else{ |
| | | item.checked = false; |
| | | item.isLeader = 0; |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | props: ['refresh', 'changMyDialog'] |
| | |
| | | } |
| | | } |
| | | |
| | | .li-item { |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .leader { |
| | | color: red; |
| | | } |
| | | |
| | | footer { |
| | | border-top: 1px solid #fff; |
| | | height: 80px; |
| | |
| | | </el-table-column> --> |
| | | <el-table-column prop="status" label="启用" min-width="5"> |
| | | <template slot-scope="scope"> |
| | | <el-switch class="switchStyle" v-model="scope.row.status" active-text="开" inactive-text="关" |
| | | active-color="#3fef9a" inactive-color="#000212" @change="handleChangeStatus(scope.row)"> |
| | | <!-- @change="handleChangeStatus(scope.row)" --> |
| | | <el-switch class="switchStyle" v-model="scope.row.status" |
| | | active-color="#3fef9a" inactive-color="#000212" disabled> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <!-- tools --> |
| | | <div class="tools"> |
| | | <div class="funs"> |
| | | <div class="funsItem"> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="all" @change="selectAll()">全选</el-checkbox> |
| | | </div> |
| | | <div class="funsItem"> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="unsame" @change="disSame(tableData)">反选</el-checkbox> |
| | | </div> |
| | | <div class="funsItem"> |
| | |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | padding: 0 20px; |
| | | |
| | | .funs-sp{ |
| | | border: 1px solid #17324c; |
| | | } |
| | | .funs { |
| | | display: flex; |
| | | |
| | |
| | | line-height: 28px; |
| | | display: flex; |
| | | align-items: center; |
| | | border: 1px solid #17324c; |
| | | border-radius: 4px; |
| | | font-size: 12px; |
| | | margin-left: 10px; |
| | |
| | | } |
| | | } |
| | | } |
| | | &::v-deep .switchStyle .el-switch__label { |
| | | position: absolute; |
| | | display: none; |
| | | color: #fff; |
| | | } |
| | | // &::v-deep .switchStyle .el-switch__label { |
| | | // position: absolute; |
| | | // display: none; |
| | | // color: #fff; |
| | | // } |
| | | |
| | | &::v-deep .el-switch__core { |
| | | background-color: rgba(166, 166, 166, 1); |
| | | } |
| | | // &::v-deep .el-switch__core { |
| | | // background-color: rgba(166, 166, 166, 1); |
| | | // } |
| | | |
| | | &::v-deep .switchStyle .el-switch__label--left { |
| | | z-index: 9; |
| | | left: 20px; |
| | | } |
| | | // &::v-deep .switchStyle .el-switch__label--left { |
| | | // z-index: 9; |
| | | // left: 20px; |
| | | // } |
| | | |
| | | &::v-deep .switchStyle .el-switch__label--right { |
| | | z-index: 9; |
| | | left: 4px; |
| | | } |
| | | // &::v-deep .switchStyle .el-switch__label--right { |
| | | // z-index: 9; |
| | | // left: 4px; |
| | | // } |
| | | |
| | | &::v-deep .switchStyle .el-switch__label.is-active { |
| | | display: block; |
| | | } |
| | | // &::v-deep .switchStyle .el-switch__label.is-active { |
| | | // display: block; |
| | | // } |
| | | |
| | | &::v-deep .switchStyle.el-switch .el-switch__core, |
| | | &::v-deep .el-switch .el-switch__label { |
| | | width: 50px !important; |
| | | } |
| | | // &::v-deep .switchStyle.el-switch .el-switch__core, |
| | | // &::v-deep .el-switch .el-switch__label { |
| | | // width: 50px !important; |
| | | // } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <div class="mainContent"> |
| | | <el-form ref="user" label-width="140px" autoComplete="on" :model="user" :rules="createUserRules" |
| | | label-position="right"> |
| | | <!-- 部门id --> |
| | | <!-- 部门id |
| | | <el-form-item class="optionItem" label="部门id:" prop="id"> |
| | | <el-input v-model="user.id" placeholder="请输入部门名称" :disabled="!updateFlag"></el-input> |
| | | </el-form-item> |
| | | </el-form-item> --> |
| | | <!-- 部门名称 --> |
| | | <el-form-item class="optionItem" label="部门名称:" prop="departName"> |
| | | <el-input v-model="user.departName" placeholder="请输入部门名称" :disabled="!updateFlag"></el-input> |
| | | </el-form-item> |
| | | <!-- 上级部门 --> |
| | | <el-form-item class="optionItems" label="上级部门:" prop="parentId"> |
| | | <el-select v-model="user.parentId" placeholder="请选择上级部门" :disabled="!updateFlag"> |
| | | <el-option v-for="item in typeList" :key="item.departName" :label="item.departName" |
| | | <el-select v-model="user.parentId" placeholder="请选择上级部门" disabled> |
| | | <el-option v-for="item in departList" :key="item.departName" :label="item.departName" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | <!-- 部门类型 --> |
| | | <el-form-item class="optionItem" label="部门类型:" prop="departType"> |
| | | <el-select v-model="user.departType" placeholder="请选择部门类型" :disabled="!updateFlag"> |
| | | <el-option v-for="item in typeList" :key="item.name" :label="item.name" :value="item.value"> |
| | | <el-option v-for="item in typeList" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import {getTypeList} from '@/utils/helper' |
| | | export default { |
| | | data() { |
| | | const validateNickname = (rule, value, callback) => { |
| | |
| | | { required: false, trigger: "blur" }, |
| | | ], |
| | | }, |
| | | roleList: [ |
| | | { name: '角色1', value: 1 }, { name: '角色2', value: 2 } |
| | | departList: [ |
| | | |
| | | ], |
| | | typeList: [] |
| | | } |
| | |
| | | created() { |
| | | const that = this; |
| | | this.user = JSON.parse(JSON.stringify(that.userInfo)); |
| | | // 获取角色列表 |
| | | // this.$axios.get('') |
| | | // 获取用户类型列表 |
| | | // this.$axios.get('sccg/admin/list',{userType:0}).then(res=>{ |
| | | // console.log(res); |
| | | // }) |
| | | // 获取全部部门列表 |
| | | this.$axios.get('sccg/depart/page').then(res => { |
| | | that.typeList = res.data.records; |
| | | }) |
| | | that.departList = res.data.records; |
| | | }); |
| | | // 获取部门类型 |
| | | this.getDepartType(); |
| | | }, |
| | | methods: { |
| | | handleUser() { |
| | |
| | | return false; |
| | | } |
| | | }) |
| | | }, |
| | | // 获取部门类型 |
| | | async getDepartType(){ |
| | | this.typeList = await getTypeList(1,'08') |
| | | } |
| | | }, |
| | | props: ['userInfo', 'updateFlag', 'getUserList', 'changeDialog'] |
| | |
| | | .updateUser { |
| | | border-radius: 1px; |
| | | background-color: #09152f; |
| | | |
| | | // header { |
| | | // display: flex; |
| | | // justify-content: center; |
| | | // height: 60px; |
| | | // line-height: 60px; |
| | | // padding: 0 20px; |
| | | // border: 1px solid #fff; |
| | | |
| | | // .headerTitle { |
| | | // color: #4b9bb7; |
| | | // font-weight: 600; |
| | | // } |
| | | |
| | | // .headerTip span { |
| | | // color: #ff3b6c; |
| | | // } |
| | | |
| | | // .headerTip label { |
| | | // color: #4b9bb7; |
| | | // } |
| | | // } |
| | | |
| | | main { |
| | | // border: 1px solid #fff; |
New file |
| | |
| | | <template> |
| | | <router-view></router-view> |
| | | </template> |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { getTypeList } from '@/utils/helper' |
| | | export default { |
| | | data() { |
| | | const validateNickname = (rule, value, callback) => { |
| | |
| | | this.refresh(); |
| | | }, |
| | | // 获取角色类型 |
| | | getRoleTypeList(){ |
| | | this.$axios({ |
| | | method:'get', |
| | | url:'sccg/dict/query_role_type', |
| | | }) |
| | | .then(res=>{ |
| | | console.log(res); |
| | | this.typeList = res.data; |
| | | }) |
| | | async getRoleTypeList(){ |
| | | this.typeList = await getTypeList(1,'09'); |
| | | } |
| | | }, |
| | | props: ['refresh'] |
| | |
| | | } |
| | | } |
| | | } |
| | | &::v-deep .switchStyle .el-switch__label { |
| | | position: absolute; |
| | | display: none; |
| | | color: #fff; |
| | | } |
| | | // &::v-deep .switchStyle .el-switch__label { |
| | | // position: absolute; |
| | | // display: none; |
| | | // color: #fff; |
| | | // } |
| | | |
| | | &::v-deep .el-switch__core { |
| | | background-color: rgba(166, 166, 166, 1); |
| | | } |
| | | // &::v-deep .el-switch__core { |
| | | // background-color: rgba(166, 166, 166, 1); |
| | | // } |
| | | |
| | | &::v-deep .switchStyle .el-switch__label--left { |
| | | z-index: 9; |
| | | left: 20px; |
| | | } |
| | | // &::v-deep .switchStyle .el-switch__label--left { |
| | | // z-index: 9; |
| | | // left: 20px; |
| | | // } |
| | | |
| | | &::v-deep .switchStyle .el-switch__label--right { |
| | | z-index: 9; |
| | | left: 4px; |
| | | } |
| | | // &::v-deep .switchStyle .el-switch__label--right { |
| | | // z-index: 9; |
| | | // left: 4px; |
| | | // } |
| | | |
| | | &::v-deep .switchStyle .el-switch__label.is-active { |
| | | display: block; |
| | | } |
| | | // &::v-deep .switchStyle .el-switch__label.is-active { |
| | | // display: block; |
| | | // } |
| | | |
| | | &::v-deep .switchStyle.el-switch .el-switch__core, |
| | | &::v-deep .el-switch .el-switch__label { |
| | | width: 50px !important; |
| | | } |
| | | // &::v-deep .switchStyle.el-switch .el-switch__core, |
| | | // &::v-deep .el-switch .el-switch__label { |
| | | // width: 50px !important; |
| | | // } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <el-form ref="user" label-width="140px" autoComplete="on" :model="user" :rules="createUserRules" |
| | | label-position="right"> |
| | | <!-- 用户名称 --> |
| | | <el-form-item class="optionItem" label="用户名称:" prop="username"> |
| | | <el-input v-model="user.username" placeholder="填写用户名称" autoComplete="new-username"></el-input> |
| | | </el-form-item> |
| | | <!-- 用户密码 --> |
| | | <el-form-item class="optionItems" label="用户密码:" prop="password"> |
| | | <el-input v-model="user.password" type="password" autoComplete="new-password" placeholder="请输入用户密码"></el-input> |
| | | </el-form-item> |
| | | <!-- 所属用户姓名 --> |
| | | <el-form-item class="optionItem" label="所属用户姓名:" prop="nickName"> |
| | | <el-input v-model="user.nickName" placeholder="请填写用户姓名"></el-input> |
| | | </el-form-item> |
| | | <!-- 性别 --> |
| | | <el-form-item class="optionItem" label="性别:" prop="sex"> |
| | | <el-radio-group v-model="user.sex"> |
| | | <el-radio :label="1">男</el-radio> |
| | | <el-radio :label="0">女</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <!-- 是否党员 --> |
| | | <el-form-item class="optionItem" label="是否党员:" prop="isDy"> |
| | | <el-radio-group v-model="user.isDy"> |
| | | <el-radio :label="1">是</el-radio> |
| | | <el-radio :label="0">否</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <!-- 所属手机号码 --> |
| | | <el-form-item class="optionItem" label="所属手机号码:" prop="mobile"> |
| | | <el-input v-model="user.mobile" maxlength="11" placeholder="请填写手机号码"></el-input> |
| | | </el-form-item> |
| | | <!-- 邮箱地址 --> |
| | | <el-form-item class="optionItem" label="邮箱地址:" prop="email"> |
| | | <el-input v-model="user.email" placeholder="请填写邮箱地址"></el-input> |
| | | </el-form-item> |
| | | <!-- 选择角色 --> |
| | | <el-form-item class="optionItem" label="选择角色:" prop="role"> |
| | | <el-select v-model="user.role" placeholder="请选择所属角色" multiple collapse-tags> |
| | | <el-option v-for="item in roleList" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | <!-- <el-select v-model="user.role" placeholder="请选择所属角色"> |
| | | <el-option v-for="item in roleList" :key="item.id" :label="item.name" :value="item.id" |
| | | :disabled="item.disabled"> |
| | | </el-option> |
| | | </el-select> --> |
| | | </el-form-item> |
| | | <!-- 用户类型 --> |
| | | <el-form-item class="optionItem" label="用户类型:" prop="userType"> |
| | | <el-select v-model="user.userType" placeholder="请选择用户类型"> |
| | | <el-option v-for="item in typeList" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- 座机/分机 --> |
| | | <div class="user-item"> |
| | | <el-form-item label="座机/分机:" prop="zjarea"> |
| | | <el-input v-model="user.zjarea" placeholder="电话区号"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="zjnumber" class="left-px"> |
| | | <el-input v-model="user.zjnumber" placeholder="电话号码"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="zjother" class="left-px"> |
| | | <el-input v-model="user.zjother" placeholder="分机号码"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <div class="item-left"> |
| | | <el-form-item class="optionItem" label="用户名称:" prop="username"> |
| | | <el-input v-model="user.username" placeholder="填写用户名称" autoComplete="new-username"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-right"></div> |
| | | </div> |
| | | <!-- 用户密码 --> |
| | | <div class="user-item"> |
| | | <div class="item-left"> |
| | | <el-form-item class="optionItems" label="用户密码:" prop="password"> |
| | | <el-input v-model="user.password" type="password" autoComplete="new-password" |
| | | placeholder="请输入用户密码"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-right">重新输入密码即为修改,密码有效期默认为3个月</div> |
| | | </div> |
| | | <!-- 所属用户姓名 --> |
| | | <div class="user-item"> |
| | | <div class="item-left"> |
| | | <el-form-item class="optionItem" label="所属用户姓名:" prop="nickName"> |
| | | <el-input v-model="user.nickName" placeholder="请填写用户姓名"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-right"></div> |
| | | </div> |
| | | <!-- 性别 --> |
| | | <div class="user-item"> |
| | | <div class="item-left"> |
| | | <el-form-item class="optionItem" label="性别:" prop="sex"> |
| | | <el-radio-group v-model="user.sex"> |
| | | <el-radio :label="1">男</el-radio> |
| | | <el-radio :label="0">女</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-right"></div> |
| | | </div> |
| | | <!-- 是否党员 --> |
| | | <div class="user-item"> |
| | | <div class="item-left"> |
| | | <el-form-item class="optionItem" label="是否党员:" prop="isDy"> |
| | | <el-radio-group v-model="user.isDy"> |
| | | <el-radio :label="1">是</el-radio> |
| | | <el-radio :label="0">否</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-right"></div> |
| | | </div> |
| | | <!-- 所属手机号码 --> |
| | | <div class="user-item"> |
| | | <div class="item-left"> |
| | | <el-form-item class="optionItem" label="所属手机号码:" prop="mobile"> |
| | | <el-input v-model="user.mobile" maxlength="11" placeholder="请填写手机号码"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-right"></div> |
| | | </div> |
| | | <!-- 邮箱地址 --> |
| | | <div class="user-item"> |
| | | <div class="item-left"> |
| | | <el-form-item class="optionItem" label="邮箱地址:" prop="email"> |
| | | <el-input v-model="user.email" placeholder="请填写邮箱地址"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-right"></div> |
| | | </div> |
| | | <!-- 选择角色 --> |
| | | <div class="user-item"> |
| | | <div class="item-left"> |
| | | <el-form-item class="optionItem" label="选择角色:" prop="role"> |
| | | <el-select v-model="user.role" placeholder="请选择所属角色" multiple collapse-tags> |
| | | <el-option v-for="item in roleList" :key="item.id" :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-right"></div> |
| | | </div> |
| | | <!-- 用户类型 --> |
| | | <div class="user-item"> |
| | | <div class="item-left"> |
| | | <el-form-item class="optionItem" label="用户类型:" prop="userType"> |
| | | <el-select v-model="user.userType" placeholder="请选择用户类型"> |
| | | <el-option v-for="item in typeList" :key="item.id" :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-right"></div> |
| | | </div> |
| | | <!-- 座机/分机 --> |
| | | <div class="user-item sp-item"> |
| | | <div class="item-left"> |
| | | <el-form-item label="座机/分机:" prop="zjarea"> |
| | | <el-input v-model="user.zjarea" placeholder="电话区号"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="zjnumber" class="left-px"> |
| | | <el-input v-model="user.zjnumber" placeholder="电话号码"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="zjother" class="left-px"> |
| | | <el-input v-model="user.zjother" placeholder="分机号码"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-right"></div> |
| | | </div> |
| | | <!-- 所属部门 --> |
| | | <el-form-item class="optionItem" label="所属部门:" prop="departmentId"> |
| | | <el-select v-model="user.departmentId" placeholder="请选择所属部门" @change="getDepartName"> |
| | | <el-option v-for="item in departList" :key="item.name" :label="item.departName" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <div class="user-item"> |
| | | <div class="item-left"> |
| | | <el-form-item class="optionItem" label="所属部门:" prop="departmentId"> |
| | | <el-select v-model="user.departmentId" placeholder="请选择所属部门" @change="getDepartName"> |
| | | <el-option :value="mylabel"> |
| | | <el-tree ref="tree" :check-strictly="true" :data="departList" |
| | | :props="defaultProps" show-checkbox @check-change="handleCheck" |
| | | default-expand-all node-key="id"> |
| | | </el-tree> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-right"></div> |
| | | </div> |
| | | <!-- 当前职务 --> |
| | | <el-form-item class="optionItem" label="当前职务:" prop="jobTitle"> |
| | | <el-input v-model="user.jobTitle" placeholder="请输入当前职务"></el-input> |
| | | </el-form-item> |
| | | <div class="user-item"> |
| | | <div class="item-left"> |
| | | <el-form-item class="optionItem" label="当前职务:" prop="jobTitle"> |
| | | <el-input v-model="user.jobTitle" placeholder="请输入当前职务"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-right"></div> |
| | | </div> |
| | | <!-- 填写所属mac地址 --> |
| | | <el-form-item class="optionItem" label="填写所属mac地址:" prop="mac"> |
| | | <el-input v-model="user.mac" placeholder="请填写所属mac地址"></el-input> |
| | | </el-form-item> |
| | | <div class="user-item"> |
| | | <div class="item-left"> |
| | | <el-form-item class="optionItem" label="填写所属mac地址:" prop="mac"> |
| | | <el-input v-model="user.mac" placeholder="请填写所属mac地址"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-right"></div> |
| | | </div> |
| | | <!-- 填写所属ip地址 --> |
| | | <el-form-item class="optionItem" label="填写所属ip地址:" prop="ip"> |
| | | <el-input v-model="user.ip" placeholder="请填写所属ip地址"></el-input> |
| | | </el-form-item> |
| | | <div class="user-item"> |
| | | <div class="item-left"> |
| | | <el-form-item class="optionItem" label="填写所属ip地址:" prop="ip"> |
| | | <el-input v-model="user.ip" placeholder="请填写所属ip地址"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-right"></div> |
| | | </div> |
| | | <el-form-item> |
| | | <div class="optionBtn"> |
| | | <el-button type="primary" class="btn submit" @click.native.prevent="handleUser">提交 |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { getTypeList } from '@/utils/helper' |
| | | export default { |
| | | data() { |
| | | const validateNickname = (rule, value, callback) => { |
| | |
| | | if (!value) { |
| | | callback(new Error("用户姓名不能为空")); |
| | | } else { |
| | | const rep = /^[\u4E00-\u9FA5]{2,4}$/; |
| | | if (!rep.test(value)) { |
| | | callback("请输入正确的用户姓名"); |
| | | } else { |
| | | callback(); |
| | | } |
| | | callback(); |
| | | } |
| | | }; |
| | | const validatePhone = (rule, value, callback) => { |
| | |
| | | const rep = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/; |
| | | if (!rep.test(value)) { |
| | | callback(new Error("请输入正确的邮箱")) |
| | | }else{ |
| | | } else { |
| | | callback(); |
| | | } |
| | | }else{ |
| | | } else { |
| | | callback(); |
| | | } |
| | | }; |
| | |
| | | const validateMac = (rule, value, callback) => { |
| | | if (value) { |
| | | callback(); |
| | | }else{ |
| | | } else { |
| | | callback() |
| | | } |
| | | }; |
| | | const validateIp = (rule, value, callback) => { |
| | | if (value) { |
| | | callback(); |
| | | }else{ |
| | | } else { |
| | | callback() |
| | | } |
| | | }; |
| | |
| | | { required: true, trigger: "blur", validator: validatePhone }, |
| | | ], |
| | | email: [ |
| | | { required: false, trigger: "blur", validator: validateMail }, |
| | | { required: true, trigger: "blur", validator: validateMail }, |
| | | ], |
| | | role: [ |
| | | { required: true, trigger: "change", validator: validateRole }, |
| | |
| | | ], |
| | | }, |
| | | roleList: [ |
| | | |
| | | |
| | | ], |
| | | typeList: [ |
| | | |
| | | |
| | | ], |
| | | departList: [] |
| | | departList: [], |
| | | mylabel: '', |
| | | defaultProps: { |
| | | children: 'children', |
| | | label: 'departName', |
| | | disabled: (data, node) => { |
| | | if (node.level === 1 && node.childNodes.length !== 0) { |
| | | return !data.leaf |
| | | } |
| | | } |
| | | }, |
| | | selectOrg: { |
| | | orgsid: [] |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | const that = this; |
| | | // 获取角色列表 |
| | | this.getRoleList(); |
| | | // 获取全部部门列表 |
| | | this.$axios.get('sccg/depart/page').then(res => { |
| | | that.departList = res.data.records; |
| | | }) |
| | | // 获取用户类型 |
| | | this.getUserTypeList(); |
| | | // 获取部门 |
| | | this.getDepartList(); |
| | | }, |
| | | methods: { |
| | | // 提交注册 |
| | |
| | | this.$refs['user'].validate((valid) => { |
| | | console.log(valid); |
| | | if (valid) { |
| | | const { user } = this; |
| | | const { user, selectOrg } = this; |
| | | console.log(user); |
| | | this.$axios.post('sccg/admin/register', { |
| | | departmentId: user.departmentId, |
| | | departmentId: selectOrg.orgsid[0], |
| | | email: user.email, |
| | | icon:'', |
| | | icon: '', |
| | | isDy: `${user.isDy}`, |
| | | jobTitle: user.jobTitle, |
| | | mobile: user.mobile, |
| | | note:'', |
| | | roleIds:user.role, |
| | | note: '', |
| | | roleIds: user.role, |
| | | // nickName: user.nickName, |
| | | sex:`${user.sex}`, |
| | | sex: `${user.sex}`, |
| | | password: user.password, |
| | | userType: `${user.userType}`, |
| | | username: user.username, |
| | | zj:user.zjarea+`${user.zjnumber}`+user.zjother, |
| | | zj: user.zjarea + `${user.zjnumber}` + user.zjother, |
| | | // departName:user.departName, |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | console.log(1); |
| | | this.$message({ |
| | | type:'success', |
| | | message:res.message, |
| | | type: 'success', |
| | | message: res.message, |
| | | }) |
| | | this.$emit('sendDialog', { flag: false }); |
| | | }else if(res.code === 500 && res.message === "操作失败"){ |
| | | } else if (res.code === 500 && res.message === "操作失败") { |
| | | this.$message({ |
| | | type:'warning', |
| | | message:'该用户已注册' |
| | | type: 'warning', |
| | | message: '该用户已注册' |
| | | }) |
| | | }else{ |
| | | } else { |
| | | this.$message({ |
| | | type:'warning', |
| | | message:res.message |
| | | type: 'warning', |
| | | message: res.message |
| | | }) |
| | | } |
| | | }) |
| | |
| | | }) |
| | | }, |
| | | // 获取用户类型 |
| | | getUserTypeList(){ |
| | | async getUserTypeList() { |
| | | this.typeList = await getTypeList(1, '07'); |
| | | }, |
| | | // 获取部门树 |
| | | getDepartList() { |
| | | this.$axios({ |
| | | method:'get', |
| | | url:'sccg/dict/query_user_type' |
| | | method: 'get', |
| | | url: 'sccg/depart/tree' |
| | | }) |
| | | .then(res=>{ |
| | | console.log(res); |
| | | this.typeList = res.data; |
| | | }) |
| | | } |
| | | .then(res => { |
| | | this.departList = res.data; |
| | | }) |
| | | }, |
| | | handleCheck(data, checked) { |
| | | this.user.departmentId = data.departName; |
| | | // 获取当前选择的id在数组中的索引 |
| | | const indexs = this.selectOrg.orgsid.indexOf(data.id) |
| | | // 如果不存在数组中,并且数组中已经有一个id并且checked为true的时候,代表不能再次选择。 |
| | | if (indexs < 0 && this.selectOrg.orgsid.length === 1 && checked) { |
| | | this.$message({ |
| | | message: '只能选择一个部门!', |
| | | type: 'warning', |
| | | showClose: true |
| | | }) |
| | | // 设置已选择的节点为false 很重要 |
| | | this.$refs.tree.setChecked(data, false) |
| | | } else if (this.selectOrg.orgsid.length === 0 && checked) { |
| | | // 发现数组为空 并且是已选择 |
| | | // 防止数组有值,首先清空,再push |
| | | this.selectOrg.orgsid = [] |
| | | this.selectOrg.orgsid.push(data.id) |
| | | } else if ( |
| | | indexs >= 0 && |
| | | this.selectOrg.orgsid.length === 1 && |
| | | !checked |
| | | ) { |
| | | // 再次直接进行赋值为空操作 |
| | | this.selectOrg.orgsid = [] |
| | | this.user.departmentId = ''; |
| | | } |
| | | }, |
| | | }, |
| | | props: ['sendDialog'] |
| | | } |
| | |
| | | |
| | | .mainContent { |
| | | display: flex; |
| | | justify-content: center; |
| | | // justify-content: center; |
| | | margin-top: 50px; |
| | | |
| | | width: 100%; |
| | | &::v-deep .el-form-item__label { |
| | | color: #4b9bb7; |
| | | } |
| | |
| | | |
| | | .el-form-item__content { |
| | | width: 400px; |
| | | |
| | | .el-select { |
| | | width: 100%; |
| | | } |
| | | } |
| | | |
| | | .sp-item { |
| | | .item-left{ |
| | | display: flex; |
| | | } |
| | | } |
| | | |
| | | .user-item { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | .item-left { |
| | | width: 500px; |
| | | } |
| | | .item-right { |
| | | line-height: 40px; |
| | | color: #4b9bb7; |
| | | font-size: 12px; |
| | | // margin-left: 16px; |
| | | } |
| | | |
| | | .left-px :deep(.el-form-item__content) { |
| | | margin-left: 0px !important; |
| | | } |
| | | } |
| | | .optionBtn { |
| | | display: flex; |
| | | margin-top: 20px; |
| | | |
| | | .btn { |
| | | padding: 12px 50px; |
| | | } |
| | | .optionBtn { |
| | | display: flex; |
| | | margin-top: 20px; |
| | | |
| | | .btn { |
| | | padding: 12px 50px; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <div class="addUser"> |
| | | <!-- :before-close="handleClose" --> |
| | | <el-button class="addBtn" type="primary" @click="dialogCreate = true">添加用户</el-button> |
| | | <el-dialog :visible.sync="dialogCreate" title="新增账户" width="45%" v-if="dialogCreate" |
| | | <el-dialog :visible.sync="dialogCreate" title="新增账户" width="60%" v-if="dialogCreate" |
| | | :before-close="handleClose"> |
| | | <createUser @sendDialog="sendDialog" /> |
| | | </el-dialog> |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="status" label="启用" min-width="5"> |
| | | <template slot-scope="scope"> |
| | | <el-switch class="switchStyle" v-model="scope.row.status" active-text="开" inactive-text="关" |
| | | active-color="#3fef9a" inactive-color="#000212" @change="handleChangeStatus(scope.row)"> |
| | | <!-- @change="handleChangeStatus(scope.row)" --> |
| | | <el-switch class="switchStyle" v-model="scope.row.status" |
| | | active-color="#3fef9a" inactive-color="#000212" disabled> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <!-- tools --> |
| | | <div class="tools"> |
| | | <div class="funs"> |
| | | <div class="funsItem"> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="all" @change="selectAll()">全选</el-checkbox> |
| | | </div> |
| | | <div class="funsItem"> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="unsame" @change="disSame(tableData)">反选</el-checkbox> |
| | | </div> |
| | | <div class="funsItem"> |
| | |
| | | |
| | | .funs { |
| | | display: flex; |
| | | |
| | | .funs-sp{ |
| | | border: 1px solid #17324c; |
| | | } |
| | | .funsItem { |
| | | line-height: 28px; |
| | | display: flex; |
| | | align-items: center; |
| | | border: 1px solid #17324c; |
| | | border-radius: 4px; |
| | | font-size: 12px; |
| | | margin-left: 10px; |
| | |
| | | } |
| | | } |
| | | } |
| | | &::v-deep .switchStyle .el-switch__label { |
| | | position: absolute; |
| | | display: none; |
| | | color: #fff; |
| | | } |
| | | // &::v-deep .switchStyle .el-switch__label { |
| | | // position: absolute; |
| | | // display: none; |
| | | // color: #fff; |
| | | // } |
| | | |
| | | &::v-deep .el-switch__core { |
| | | background-color: rgba(166, 166, 166, 1); |
| | | } |
| | | // &::v-deep .el-switch__core { |
| | | // background-color: rgba(166, 166, 166, 1); |
| | | // } |
| | | |
| | | &::v-deep .switchStyle .el-switch__label--left { |
| | | z-index: 9; |
| | | left: 20px; |
| | | } |
| | | // &::v-deep .switchStyle .el-switch__label--left { |
| | | // z-index: 9; |
| | | // left: 20px; |
| | | // } |
| | | |
| | | &::v-deep .switchStyle .el-switch__label--right { |
| | | z-index: 9; |
| | | left: 4px; |
| | | } |
| | | // &::v-deep .switchStyle .el-switch__label--right { |
| | | // z-index: 9; |
| | | // left: 4px; |
| | | // } |
| | | |
| | | &::v-deep .switchStyle .el-switch__label.is-active { |
| | | display: block; |
| | | } |
| | | // &::v-deep .switchStyle .el-switch__label.is-active { |
| | | // display: block; |
| | | // } |
| | | |
| | | &::v-deep .switchStyle.el-switch .el-switch__core, |
| | | &::v-deep .el-switch .el-switch__label { |
| | | width: 56px !important; |
| | | } |
| | | // &::v-deep .switchStyle.el-switch .el-switch__core, |
| | | // &::v-deep .el-switch .el-switch__label { |
| | | // width: 56px !important; |
| | | // } |
| | | } |
| | | </style> |
| | |
| | | background-color: #09152f; |
| | | color: #4b9bb7; |
| | | } |
| | | |
| | | // .el-select-dropdown__item :deep(.selected){ |
| | | // background-color: #09152f; |
| | | // color: #4b9bb7; |
| | | // } |
| | | main { |
| | | text-align: left; |
| | | padding: 0 55px; |
New file |
| | |
| | | <template> |
| | | <div class="create"> |
| | | <el-form ref="device" label-position="right" label-width="120px" :model="bayonet" :rule="rules"> |
| | | <!-- 卡口名称 --> |
| | | <div class="device-item"> |
| | | <div class="item-left"> |
| | | <el-form-item label="卡口名称:" prop="name"> |
| | | <el-input v-model="bayonet.name" placeholder="请填写卡口名称"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-right"></div> |
| | | </div> |
| | | <!-- 经纬度位置 --> |
| | | <div class="device-item"> |
| | | <div class="item-left"> |
| | | <el-form-item label="经纬度位置:" prop="longitude"> |
| | | <el-input v-model="bayonet.longitude" placeholder="请填写经度位置"></el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="latitude"> |
| | | <el-input v-model="bayonet.latitude" placeholder="请填写纬度位置"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-right"></div> |
| | | </div> |
| | | <!-- 所属区域 --> |
| | | <div class="device-item"> |
| | | <div class="item-left"> |
| | | <el-form-item label="所属区域:" prop="area"> |
| | | <el-input v-model="bayonet.area" placeholder="请填写区域名称"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-right"></div> |
| | | </div> |
| | | <!-- 域名/ip --> |
| | | <div class="device-item"> |
| | | <div class="item-left"> |
| | | <el-form-item label="域名/IP:" prop="domainName"> |
| | | <el-input v-model="bayonet.domainName" placeholder="请填写域名或者IP"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-right"></div> |
| | | </div> |
| | | <!-- 端口号 --> |
| | | <div class="device-item"> |
| | | <div class="item-left"> |
| | | <el-form-item label="端口号:" prop="port"> |
| | | <el-input v-model="bayonet.port" placeholder="请输入端口号"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-right"></div> |
| | | </div> |
| | | <!-- 前端类型 --> |
| | | <div class="device-item"> |
| | | <div class="item-left"> |
| | | <el-form-item label="前端类型:" prop="webType"> |
| | | <el-input v-model="bayonet.webType" placeholder="请输入前端类型"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-right"></div> |
| | | </div> |
| | | <!-- 出入城类型 --> |
| | | <div class="device-item"> |
| | | <div class="item-left"> |
| | | <el-form-item label="出入城类型:" prop="cityType"> |
| | | <el-input v-model="bayonet.cityType" placeholder="出城/入城"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-right"></div> |
| | | </div> |
| | | <!-- 描述 --> |
| | | <div class="device-item"> |
| | | <div class="item-left"> |
| | | <el-form-item label="描述:" prop="description"> |
| | | <el-input type="textarea" :rows='5' maxlength="200" v-model="bayonet.description" placeholder="请输入描述内容200字以内"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-right"></div> |
| | | </div> |
| | | <!-- 按钮 --> |
| | | <div class="device-btn"> |
| | | <el-button>返回</el-button> |
| | | <el-button type="primary">确定</el-button> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | bayonet: { |
| | | name: '', |
| | | latitude: '', |
| | | longitude: '', |
| | | area: '', |
| | | domainName: '', |
| | | port: '', |
| | | webType: '', |
| | | cityType: '', |
| | | description: '', |
| | | }, |
| | | rules: { |
| | | |
| | | } |
| | | } |
| | | }, |
| | | |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .create { |
| | | padding: 20px; |
| | | |
| | | .device-item { |
| | | display: flex; |
| | | |
| | | .item-left { |
| | | flex: 6; |
| | | display: flex; |
| | | |
| | | .el-form-item { |
| | | flex: 1; |
| | | } |
| | | } |
| | | |
| | | .item-right { |
| | | flex: 4; |
| | | } |
| | | } |
| | | |
| | | .device-btn { |
| | | padding-top: 20px; |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | | } |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <div class="userList"> |
| | | <header> |
| | | <div class="header-content"> |
| | | <div class="search"> |
| | | <span>筛选条件:</span> |
| | | <el-select v-model="value" placeholder="请选择"> |
| | | <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <!-- <el-input placeholder="请输入内容" v-model="context"></el-input> --> |
| | | </div> |
| | | </div> |
| | | </header> |
| | | <main> |
| | | <div class="main-content"> |
| | | <div class="main-title"> |
| | | <el-button class="el-icon-plus" type="primary" @click="dialogCreate = true">添加</el-button> |
| | | <el-button class="">导出卡口</el-button> |
| | | </div> |
| | | <!-- 数据展示 --> |
| | | <el-table ref="multipleTable" |
| | | :header-cell-style="{background:'#06122c','font-size':'12px',color:'#4b9bb7','font-weight':'650','line-height':'45px'}" |
| | | :data="tableData" style="width: 100%" :row-class-name="tableRowClassName" |
| | | @selection-change="tableChange"> |
| | | <el-table-column type="selection" min-width="5"> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="卡口名称" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column prop="sort" label="经纬度位置" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column prop="adminCount" label="所属区域" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column prop="description" label="域名/IP" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column prop="description" label="端口号" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column prop="description" label="前端类型" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column prop="description" label="出入城类型" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column prop="operation" label="操作" min-width="15"> |
| | | <template slot-scope="scope"> |
| | | <div class="operation"> |
| | | <span>编辑</span> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <!-- tools --> |
| | | <!-- <div class="tools"> |
| | | <div class="funs"> |
| | | <div class="funsItem"> |
| | | <el-checkbox v-model="all" @change="selectAll()">全选</el-checkbox> |
| | | </div> |
| | | <div class="funsItem"> |
| | | <el-checkbox v-model="unsame" @change="disSame(tableData)">反选</el-checkbox> |
| | | </div> |
| | | <div class="funsItem"> |
| | | <el-select v-model="myIdx" placeholder="批量操作" @change="selectChange"> |
| | | <el-option v-for="item in options" :key="item.value" :label="item.label" |
| | | :value="item.value" :disabled="item.disabled"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div class="pagination"> |
| | | <el-pagination background :current-page="currentPage" layout="prev, pager, next" |
| | | :total="totalNum" :page-size="pageSize" @current-change="changeCurrentPage" |
| | | @prev-click="handlePrev" @next-click="handleNext"> |
| | | </el-pagination> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | </main> |
| | | <footer> |
| | | <!-- 添加卡口 --> |
| | | <el-dialog title="添加卡口" :visible.sync="dialogCreate" width="60%" :before-close="handleClose"> |
| | | <MyCreate></MyCreate> |
| | | </el-dialog> |
| | | </footer> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import helper from "@/utils/mydate.js" |
| | | import MyCreate from './create' |
| | | export default { |
| | | components: { |
| | | MyCreate |
| | | }, |
| | | data() { |
| | | return { |
| | | tableData: [], |
| | | context: "", |
| | | dialogCreate: false, |
| | | totalNum: null, |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | all: false, |
| | | unsame: false, |
| | | myIdx: 0, |
| | | preMyIdx: 0, |
| | | options: [ |
| | | { |
| | | value: 0, |
| | | label: '离线', |
| | | }, |
| | | { |
| | | value: 1, |
| | | label: '在线', |
| | | } |
| | | ], |
| | | tempList: [] |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | async selectChange(list) { |
| | | console.log(this.tempList); |
| | | if (this.tempList.length !== 0) { |
| | | this.preMyIdx = list; |
| | | if (list === 3) { |
| | | await this.handleDelete(this.tempList); |
| | | } else if (list === 2) { |
| | | await this.mulUpdateStatus(this.tempList, 0); |
| | | } else { |
| | | await this.mulUpdateStatus(this.tempList, 1); |
| | | } |
| | | this.myIdx = 0; |
| | | } else { |
| | | this.myIdx = this.preMyIdx; |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: '您还没选中任何数据', |
| | | }) |
| | | } |
| | | }, |
| | | mulUpdateStatus(idArr, flag) { |
| | | this.$confirm(flag === 1 ? "您确定要进行批量启用角色吗?" : '您确定要进行批量禁用角色吗?') |
| | | .then(_ => { |
| | | this.$axios({ |
| | | method: 'post', |
| | | url: 'sccg/role/updateStatusBatch?ids=' + idArr + '&status=' + flag, |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '更改用户状态成功', |
| | | }) |
| | | this.getUserList(); |
| | | } else { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: res.message |
| | | }) |
| | | } |
| | | console.log(res); |
| | | }) |
| | | }) |
| | | .catch(err => { console.log(err) }) |
| | | }, |
| | | tableChange(list) { |
| | | this.tempList = []; |
| | | list.forEach(item => { |
| | | this.tempList.push(item.id); |
| | | }) |
| | | if (list.length === this.tableData.length) { |
| | | this.all = true; |
| | | } else { |
| | | this.all = false |
| | | } |
| | | }, |
| | | changeTime({ createTime }) { |
| | | return helper(createTime); |
| | | }, |
| | | selectAll() { |
| | | this.$refs.multipleTable.toggleAllSelection(); |
| | | }, |
| | | disSame(list) { |
| | | list.forEach(row => { |
| | | this.$refs.multipleTable.toggleRowSelection(row) |
| | | }) |
| | | }, |
| | | handleDelete(id) { |
| | | const that = this; |
| | | // let arr = []; |
| | | // arr.push(id); |
| | | this.$confirm('确认删除?') |
| | | .then(_ => { |
| | | that.$axios({ |
| | | method: 'post', |
| | | url: 'sccg/role/delete?ids=' + id, |
| | | }) |
| | | .then(res => { |
| | | this.myIdx = 0; |
| | | this.preMyIdx = 0; |
| | | console.log(res); |
| | | this.$message({ |
| | | type: 'success', |
| | | message: res.message |
| | | }) |
| | | |
| | | this.getUserList(); |
| | | }) |
| | | }) |
| | | .catch(_ => { }); |
| | | }, |
| | | // 设置表格斑马纹 |
| | | tableRowClassName({ row, rowIndex }) { |
| | | if ((rowIndex + 1) % 2 == 0) { |
| | | return 'warning-row'; |
| | | } else { |
| | | return 'success-row'; |
| | | } |
| | | return ''; |
| | | }, |
| | | // 当前页改变触发事件 |
| | | changeCurrentPage(page) { |
| | | this.currentPage = page; |
| | | }, |
| | | // 上一页点击事件 |
| | | handlePrev(page) { |
| | | this.currentPage = page; |
| | | }, |
| | | // 下一页点击事件 |
| | | handleNext(page) { |
| | | this.currentPage = page; |
| | | }, |
| | | // 关闭弹窗 |
| | | handleClose(done) { |
| | | this.$confirm('确认关闭?') |
| | | .then(_ => { |
| | | done(); |
| | | }) |
| | | .catch(_ => { }); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .userList { |
| | | text-align: left; |
| | | margin: 10px 20px; |
| | | color: #4b9bb7; |
| | | |
| | | header { |
| | | background-color: #09152f; |
| | | border: 1pox solid #fff; |
| | | |
| | | .header-content { |
| | | padding: 0 40px; |
| | | display: flex; |
| | | line-height: 100px; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | |
| | | .search { |
| | | display: flex; |
| | | justify-content: flex-start; |
| | | |
| | | span { |
| | | flex: 1; |
| | | } |
| | | |
| | | .el-input { |
| | | flex: 2; |
| | | color: #1d3f57; |
| | | |
| | | &::v-deep .el-input__inner { |
| | | background-color: #09152f; |
| | | border: 1px solid #17324c; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | main { |
| | | background-color: #09152f; |
| | | margin-top: 20px; |
| | | padding-bottom: 50px; |
| | | border: 1pox solid #fff; |
| | | |
| | | .main-title { |
| | | line-height: 60px; |
| | | padding: 10px 20px; |
| | | } |
| | | |
| | | .tools { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | padding: 0 20px; |
| | | |
| | | .funs { |
| | | display: flex; |
| | | |
| | | .funsItem { |
| | | line-height: 28px; |
| | | display: flex; |
| | | align-items: center; |
| | | border: 1px solid #17324c; |
| | | border-radius: 4px; |
| | | font-size: 12px; |
| | | margin-left: 10px; |
| | | |
| | | .el-checkbox { |
| | | width: 80px; |
| | | padding: 0 10px; |
| | | } |
| | | |
| | | .el-select { |
| | | width: 120px; |
| | | } |
| | | |
| | | &::v-deep .el-input__inner { |
| | | border: none; |
| | | background-color: #09152f; |
| | | } |
| | | |
| | | &:hover { |
| | | border: 1px solid #4b9bb7; |
| | | } |
| | | |
| | | &:hover .el-checkbox { |
| | | color: #4b9bb7; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | .pagination { |
| | | margin-top: 50px; |
| | | display: flex; |
| | | line-height: 50px; |
| | | justify-content: center; |
| | | |
| | | .el-pagination { |
| | | |
| | | &::v-deep li, |
| | | &::v-deep .btn-prev, |
| | | &::v-deep .btn-next { |
| | | background-color: #071f39; |
| | | color: #4b9bb7; |
| | | } |
| | | |
| | | &::v-deep .active { |
| | | background-color: #409eff; |
| | | color: #fff; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .el-table { |
| | | color: #4b9bb7; |
| | | font-size: 10px; |
| | | |
| | | .operation { |
| | | display: flex; |
| | | |
| | | .line { |
| | | padding: 0 5px; |
| | | } |
| | | |
| | | span:hover { |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <div class="grid"> |
| | | 222 |
| | | </div> |
| | | </template> |
New file |
| | |
| | | <template> |
| | | <router-view></router-view> |
| | | </template> |
New file |
| | |
| | | <template> |
| | | <div class="point"> |
| | | 111 |
| | | </div> |
| | | </template> |
New file |
| | |
| | | <template> |
| | | <router-view></router-view> |
| | | </template> |
| | |
| | | target: `http://42.193.1.25:8082`, |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | "^/api": '' |
| | | "^/sccg": '' |
| | | } |
| | | } |
| | | }, |