Merge branch 'master' of http://192.168.0.105:10010/r/jfpt-Vue
6 files modified
2 files added
| New file |
| | |
| | | <template> |
| | | <span id="l-legendOur"> |
| | | <span v-for="(value,index) in datas" :key="index" class="l-l-o"> |
| | | <span class="l-l-Img" :style="{backgroundColor: value.color}"></span> |
| | | <span class="l-l-Text">{{value.text}}</span> |
| | | </span> |
| | | </span> |
| | | </template> |
| | | <script> |
| | | import { color } from "echarts" |
| | | |
| | | |
| | | export default ({ |
| | | props:['datas'], |
| | | data(){ |
| | | return{ |
| | | datalist:[//示例数据格式 |
| | | { |
| | | color: 'rgb(233, 39, 25)', |
| | | text: '掉线' |
| | | }, |
| | | { |
| | | color: 'black', |
| | | text: '在线' |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }) |
| | | </script> |
| | | |
| | | <style lang="scss" > |
| | | #l-legendOur{ |
| | | position: absolute; |
| | | right: 0; |
| | | .l-l-o{ |
| | | color: rgba($color: #000000, $alpha: .5); |
| | | position: relative; |
| | | right: 150px; |
| | | margin-left: 10px; |
| | | font-size: 12px; |
| | | font-weight: 300; |
| | | font-family: 'Chinese Quote,-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol'; |
| | | } |
| | | .l-l-Img{ |
| | | display: inline-block; |
| | | width: 7px; |
| | | height: 7px; |
| | | // border: 1px solid rgb(17, 198, 253); |
| | | border-radius: 7px; |
| | | margin-right: 7px; |
| | | } |
| | | } |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <div class="breadEval"> |
| | | <div class="breadTitle"> |
| | | <el-breadcrumb-item style="position: relative;top: -3px;left: 5px">您的位置:</el-breadcrumb-item> |
| | | <el-breadcrumb separator="/"> |
| | | <el-breadcrumb-item :to="{ path: '/wel/index' }">首页</el-breadcrumb-item> |
| | | <el-breadcrumb-item :to="item.path" v-for="item of breadListLast" :key="item.path"> |
| | | {{item.name}} |
| | | </el-breadcrumb-item> |
| | | </el-breadcrumb> |
| | | </div> |
| | | <!-- <router-view></router-view> --> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | //面包屑解决方案,此方法只适用于面包屑与路由显示顺序一致,例如path:01/02/03 面包屑也是01/02/03 |
| | | data() { |
| | | return { |
| | | //手动配置项:breadListIm为路由与面包屑名称对应关系,breadLoadName为面包屑组件路由 |
| | | upName: { |
| | | '监控台': 'welcomeData', |
| | | '预警管理': 'alarmManagement', |
| | | "预警管理": "realTimePolice", |
| | | "客户管理": 'suser', |
| | | "设备管理": 'clientManagement', |
| | | "研判洞察": 'home', |
| | | "报表管理": 'report', |
| | | "报表管理": 'myiframe', |
| | | "报表配置": 'urlPath', |
| | | "警情调度": 'policeInformationDistribution', |
| | | "系统监控": 'monitor', |
| | | "日志管理": "log", |
| | | "资源管理": 'resource', |
| | | "权限管理": 'authority', |
| | | "系统管理": 'system', |
| | | }, |
| | | breadListIm: [ |
| | | { |
| | | path: '01', |
| | | name: '一级' |
| | | }, |
| | | { |
| | | path: '02', |
| | | name: '二级' |
| | | }, |
| | | { |
| | | path: '03', |
| | | name: '三级' |
| | | }, |
| | | ], |
| | | breadListLast: [] |
| | | }; |
| | | }, |
| | | methods: { |
| | | loadChange() { |
| | | this.breadListLast = [ |
| | | // { |
| | | // name: '首页', |
| | | // path: '/wel/index' |
| | | // }, |
| | | // { |
| | | // name: this.$route.name, |
| | | // path: this.$route.path |
| | | // }, |
| | | // {// 主要数据 |
| | | // name: this.$route.name, |
| | | // path: this.$route.path |
| | | // } |
| | | ] |
| | | if(this.$route.path){ |
| | | var uN = this.upName; |
| | | var pa = this.$route.path, |
| | | na = this.$route.name; |
| | | var uspa = pa.split('/'); |
| | | uspa.shift(); |
| | | console.log(uspa, pa); |
| | | for(var upk in uspa){ |
| | | if(uspa[upk] =='index' || uspa[upk] =='wel' ){continue}; |
| | | var nameD; |
| | | for(var key in uN){ |
| | | if(uN[key] == uspa[upk]){ |
| | | nameD = key; |
| | | break; |
| | | }else{ |
| | | nameD = na; |
| | | } |
| | | } |
| | | this.breadListLast.push( |
| | | { |
| | | name: nameD, |
| | | path: pa, |
| | | } |
| | | ) |
| | | if(uspa[upk] =='dataL'){ |
| | | this.breadListLast = [ |
| | | { |
| | | name: '卡片模式', |
| | | path: '/welcomeData/card', |
| | | }, |
| | | { |
| | | name: nameD, |
| | | path: pa, |
| | | } |
| | | ] |
| | | } |
| | | if(uspa[upk] =='track'){ |
| | | this.breadListLast = [ |
| | | { |
| | | name: '警情纪录', |
| | | path: '/realTimePolice/real', |
| | | }, |
| | | { |
| | | name: nameD, |
| | | path: pa, |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | console.log(this.breadListLast); |
| | | }else{ |
| | | console.log('未识别到路由') |
| | | } |
| | | } |
| | | }, |
| | | watch: { |
| | | $route(to, from) { |
| | | this.loadChange() |
| | | // console.log(to.path); |
| | | } |
| | | }, |
| | | //页面挂载之后,解析路由,给出面包屑,路由里面一定要含有breadCom组件的path |
| | | mounted: function () { |
| | | this.loadChange() |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .breadEval { |
| | | position: relative; |
| | | top: -10px; |
| | | font-size: 14px; |
| | | height: 100%; |
| | | background: #F3F7FD; |
| | | .breadTitle{ |
| | | padding: 20px 30px; |
| | | background: #fff; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div> |
| | | <div class="avue-top"> |
| | | <div class="top-bar__left"> |
| | | <div |
| | |
| | | </el-dropdown> |
| | | </div> |
| | | </div> |
| | | <!-- //面包屑 --> |
| | | <div id="crumbsL"> |
| | | <crumbsL></crumbsL> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { resetRouter } from "@/router/router"; |
| | |
| | | import topNotice from "./top-notice"; |
| | | import topLang from "./top-lang"; |
| | | |
| | | //面包屑 |
| | | import crumbsL from '../../crumbsL/crumbsL' |
| | | |
| | | export default { |
| | | components: { |
| | | topLock, |
| | |
| | | topColor, |
| | | topNotice, |
| | | topLang, |
| | | //面包屑 |
| | | crumbsL |
| | | }, |
| | | name: "top", |
| | | data() { |
| | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | //面包屑 |
| | | #crumbsL{ |
| | | background-color: #fff; |
| | | padding-left: 20px; |
| | | height: 30px; |
| | | overflow: hidden; |
| | | } |
| | | </style> |
| | |
| | | left: 240px; |
| | | padding: 0; |
| | | width: calc(100% - 240px); |
| | | height: calc(100% - 64px); |
| | | height: calc(100% - 104px); |
| | | box-sizing: border-box; |
| | | overflow: hidden; |
| | | transition: all 0.5s; |
| | |
| | | v-if="permission.clientManagement_delete" |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | <span><!--图例 components--> |
| | | <Legend :datas="datalistLIU"></Legend> |
| | | </span> |
| | | </template> |
| | | |
| | | |
| | |
| | | import {getList, remove, update, add, getclient, getDeptLazyTree, getAll, updates} from "@/api/client/client"; |
| | | import {mapGetters} from "vuex"; |
| | | import axios from "axios"; |
| | | import Legend from '../../components/liu-legend/Legend' |
| | | |
| | | export default { |
| | | components:{ |
| | | Legend, |
| | | }, |
| | | created() { |
| | | //this.payWin(); |
| | | }, |
| | | data() { |
| | | return { |
| | | //legend-liu数据 |
| | | datalistLIU:[ |
| | | { |
| | | color: 'rgb(233, 39, 25)', |
| | | text: '掉线' |
| | | }, |
| | | { |
| | | color: 'black', |
| | | text: '在线' |
| | | } |
| | | ], |
| | | form: {}, |
| | | query: {}, |
| | | showMap: false, |
| | |
| | | cascaderItem: ["city", "district"], |
| | | dicUrl: "/api/blade-system/region/select", |
| | | span: 6, |
| | | className: "cityClass1", |
| | | className: "city1", |
| | | hide: true, |
| | | // width: 10, |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | |
| | | dicUrl: "/api/blade-system/region/select?code={{key}}", |
| | | span: 3, |
| | | labelWidth: "0", |
| | | className: "cityClass2", |
| | | className: "city2", |
| | | hide: true, |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | |
| | | dicUrl: "/api/blade-system/region/select?code={{key}}", |
| | | span: 3, |
| | | labelWidth: "0", |
| | | className: "cityClass3", |
| | | className: "city3", |
| | | hide: true, |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | <style lang="scss" scoped> |
| | | $city-m-l: 10px; |
| | | |
| | | .payWin { |
| | | overflow-y: auto; |
| | | height: 350px; |
| | |
| | | } |
| | | |
| | | |
| | | /*页面样式*/ |
| | | .el-card__body .cityClass1 { |
| | | width: 155px; |
| | | padding-right: 0px !important; |
| | | } |
| | | // /*页面样式*/ //丢弃 因为不起作用,样式在cs.vue中 city1,2,3 liuyg改 |
| | | // .el-card__body .cityClass1 { |
| | | // width: 50px; |
| | | // padding-right: 0px !important; |
| | | // margin-left: $city-m-l; |
| | | // } |
| | | |
| | | .el-card__body .cityClass2 { |
| | | width: 100px; |
| | | padding-left: 0px !important; |
| | | padding-right: 0px !important; |
| | | } |
| | | // .el-card__body .cityClass2 { |
| | | // width: 50px; |
| | | // padding-left: 0px !important; |
| | | // padding-right: 0px !important; |
| | | // margin-left: $city-m-l; |
| | | // } |
| | | |
| | | .el-card__body .cityClass3 { |
| | | width: 100px; |
| | | padding-left: 0px !important; |
| | | padding-right: 0px !important; |
| | | } |
| | | // .el-card__body .cityClass3 { |
| | | // width: 50px; |
| | | // padding-left: 0px !important; |
| | | // padding-right: 0px !important; |
| | | // margin-left: $city-m-l; |
| | | // } |
| | | |
| | | /*新增窗体样式*/ |
| | | .el-dialog .cityClass1 { |
| | | width: 220px; |
| | | padding-right: 0px !important; |
| | | } |
| | | // /*新增窗体样式*/ |
| | | // .el-dialog .city1 { |
| | | // width: 155px; |
| | | // padding-right: 0px !important; |
| | | // margin-left: $city-m-l; |
| | | // } |
| | | |
| | | .el-dialog .cityClass2 { |
| | | width: 110px; |
| | | padding-left: 5px !important; |
| | | padding-right: 5px !important; |
| | | } |
| | | // .el-dialog .city2 { |
| | | // width: 100px; |
| | | // padding-left: 5px !important; |
| | | // padding-right: 5px !important; |
| | | // margin-left: $city-m-l; |
| | | // } |
| | | |
| | | .el-dialog .cityClass3 { |
| | | width: 110px; |
| | | padding-left: 0px !important; |
| | | padding-right: 0px !important; |
| | | } |
| | | // .el-dialog .city3 { |
| | | // width: 100px; |
| | | // padding-left: 0px !important; |
| | | // padding-right: 0px !important; |
| | | // margin-left: $city-m-l; |
| | | // } |
| | | |
| | | .cityClass2 div label { |
| | | display: none; |
| | | } |
| | | // .city2 div label { |
| | | // display: none; |
| | | // } |
| | | |
| | | .cityClass3 div label { |
| | | display: none; |
| | | } |
| | | // .city3 div label { |
| | | // display: none; |
| | | // } |
| | | |
| | | .real-jf-dialog { |
| | | position: absolute !important; |
| | |
| | | :class="{ |
| | | 'l-t-s-grey': state == dataState[0], |
| | | 'l-t-s-green': state == dataState[1], |
| | | 'l-t-s-red': state == dataState[2], |
| | | 'l-t-s-yewllo': state == dataState[3], |
| | | 'l-t-s-red': state == dataState[3], |
| | | 'l-t-s-yuan': true, |
| | | }" |
| | | ></span> |
| | |
| | | {{ value.year }}年 |
| | | </p> |
| | | <div class="l-m-2-m-tablemain"> |
| | | <el-table :data="value.data" style="width: 100%"> |
| | | <el-table :data="value.data" style="width: 100%" highlight-current-row @current-change="handleCurrentChange"><!--highlight-current-row: 单选,current-change单选事件--> |
| | | <el-table-column type="index"> </el-table-column> |
| | | <el-table-column label="日期" prop="day"> |
| | | </el-table-column> |
| | |
| | | <el-tag>{{ props.row.state }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="跳转实时" prop=""> |
| | | </el-table-column> |
| | | <!-- <el-table-column label="跳转实时" prop=""> |
| | | |
| | | </el-table-column> --> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col span="12"> |
| | | <el-form-item label="心跳时间"> |
| | | <el-input |
| | |
| | | width="100%" |
| | | height="100%" |
| | | ></iframe> --> |
| | | |
| | | <!-- <button @click="re">刷新</button> --> |
| | | <iframe |
| | | id="detailMap" |
| | | ref="detailMap" |
| | |
| | | isRecord: true, |
| | | screens: false, |
| | | //复选框 |
| | | dataState: ["掉线", "在线", "报警"], //[grey,green,red][0,1,2] |
| | | dataState: ["掉线", "在线", '故障', "预警"], |
| | | // [grey,green,red][ |
| | | // onlineStatus = 0, |
| | | // onlineStatus = 1, |
| | | // state!= "", |
| | | // jtype != 2 |
| | | // ] |
| | | checkAll: false, |
| | | checkedCities: [], //选择的 |
| | | cities: cityOptions, |
| | |
| | | this.myChart.setOption(option); |
| | | this.myChart.hideLoading(); |
| | | //建议加上以下这一行代码,不加的效果图如下(当浏览器窗口缩小的时候)。超过了div的界限(红色边框) |
| | | window.addEventListener("resize", function () { |
| | | myChart.resize(); |
| | | }); |
| | | // window.addEventListener("resize", function () { |
| | | // this.myChart.resize(); |
| | | // }); |
| | | }, |
| | | modifyl() { |
| | | //right 修改按钮 |
| | |
| | | }, |
| | | stetDetails(d) { |
| | | this.name = "无数据" && d.deviceName; |
| | | this.state = |
| | | "无数据" && this.a.dtype == 0 |
| | | ? this.dataState[0] |
| | | : this.a.dtype == 1 |
| | | ? this.dataState[1] |
| | | : this.dataState[2]; |
| | | //设备状态 |
| | | // [grey,green,red][ |
| | | // onlineStatus = 0, |
| | | // onlineStatus = 1, |
| | | // state!= "", |
| | | // jtype != 2 |
| | | // ] |
| | | var states, |
| | | o = this.a.onlineStatus, |
| | | s = this.a.state, |
| | | j = this.a.jtype; |
| | | if(o == 0){ |
| | | states = '掉线'; |
| | | }else if(o == 1){ |
| | | states = '在线'; |
| | | }else if(s != ""){ |
| | | states = '故障'; |
| | | }else if(j != 2){ |
| | | states = '预警'; |
| | | } |
| | | this.state = "无数据" && states; |
| | | |
| | | this.evaluate = "空气质量"; |
| | | this.machineCode = "无数据" && d.deviceNumber; |
| | | this.smoke = "烟雾"; |
| | |
| | | this.contacts = "无数据" && d.oneContacts; |
| | | this.calls = "无数据" && d.onePhone; |
| | | this.labels = ["无数据"] && [d.deviceType]; |
| | | this.imgsl = ["no"]; |
| | | var imgD = ["no"]; |
| | | this.imgsl = ["no"] && imgD; |
| | | this.deploymentTime = "无数据" && d.stime; |
| | | |
| | | this.detailsData = { |
| | |
| | | creates(i, tData); |
| | | } |
| | | } |
| | | for(var k1 in Num){//添加序号 |
| | | var n2 = Num[k1]; |
| | | for(var k2 in n2){ |
| | | if(k2 == 'year'){continue}; |
| | | // console.log(n2[k2]) |
| | | var n3 = n2[k2]; |
| | | for(var k3 in n3){ |
| | | // console.log(+k3 + 1); |
| | | n3[k3].i = +k3 + 1; |
| | | } |
| | | } |
| | | } |
| | | // console.log(Num); |
| | | this.eventDetaill = Num; |
| | | this.eventDetails = this.eventDetaill; //载入历史事件数据 |
| | |
| | | // console.log(dataM); |
| | | this.numdatalist = dataM; |
| | | this.startEcharts01(); |
| | | }, |
| | | getMap() { |
| | | window.frames[0].init("DetailMap", { |
| | | x: this.a.jd, |
| | | y: this.a.wd, |
| | | }); |
| | | }, |
| | | re() { |
| | | // var _body = window.parent; |
| | | // var _iframe1=_body.document.getElementById('detailMap'); |
| | | // window.onbeforeunload=function(){}; |
| | | // _iframe1.contentWindow.location.reload(true); |
| | | location.reload(); |
| | | }, |
| | | handleCurrentChange(val){ |
| | | console.log(val.i) |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.a = this.$route.query; |
| | | this.baseUrl = `/map/index.html?ISinit=1&openid=DetailMap&jd=${this.a.jd}&wd=${this.a.wd}`; |
| | | this.myDeviceNumber = this.$route.query.deviceNumber; |
| | | |
| | | // console.log(this.a); |
| | | // console.log(this.myDeviceNumber); |
| | | this.getdata(); |
| | | this.getdataG(); |
| | |
| | | this.loginEcharts01(); //载入折线图等待数据 |
| | | // this.eventDetails = this.eventDetaill;//载入历史事件数据 |
| | | // this.doEvents(); |
| | | this.$refs.detailMap.onload = () => { |
| | | window.frames[0].init("DetailMap", { |
| | | x: this.a.jd, |
| | | y: this.a.wd, |
| | | }); |
| | | }; |
| | | // var timel = setTimeout(() => { |
| | | this.$refs.detailMap.onload = () => { |
| | | // window.frames[0].init("DetailMap", { |
| | | // x: this.a.jd, |
| | | // y: this.a.wd, |
| | | // }); |
| | | if (window.frames[0].init) { |
| | | this.getMap(); |
| | | } else { |
| | | // this.re(); |
| | | console.log(`没有找到到window.frames[0].init`) |
| | | } |
| | | }; |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | .l-t-s-green { |
| | | background-color: rgb(41, 202, 135); |
| | | } |
| | | .l-t-s-yewllo{ |
| | | background-color: rgb(240, 181, 20); |
| | | } |
| | | .l-t-s-red { |
| | | background-color: rgb(243, 75, 75); |
| | | background-color: rgba(247, 28, 28, 0.877); |
| | | } |
| | | } |
| | | } |
| | |
| | | .l-m-2-main { |
| | | width: 100%; |
| | | height: 370px; |
| | | overflow: scroll; |
| | | // overflow: scroll; |
| | | overflow-y: scroll;//滚动条 |
| | | scrollbar-color: transparent transparent; |
| | | scrollbar-track-color: transparent; |
| | | -ms-scrollbar-track-color: transparent; |
| | | |
| | | // border: 1px solid rg b(23, 66, 209); |
| | | .l-m-2-m-not { |
| | | display: flex; |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | // border: 1px solid rgb(148, 199, 159); |
| | | padding: 10px 0 10px 0; |
| | | margin-bottom: 5px; |
| | | } |
| | | .r-b-t-left { |
| | | display: block; |
| | |
| | | } |
| | | .r-b-map { |
| | | height: 500px; |
| | | border: 1px solid rgba(109, 109, 109, 0.2); |
| | | // border: 1px solid rgba(109, 109, 109, 0.2); |
| | | #detailMap { |
| | | position: relative; |
| | | top: 25px; |
| | | width: 100%; |
| | | height: 500px; |
| | | } |
| | |
| | | @click="getQBdata(3)" |
| | | >全部 |
| | | </el-button> |
| | | <span> |
| | | <Legend :datas="datalistLIU"></Legend> |
| | | </span> |
| | | </template> |
| | | |
| | | <template slot="menuLeft"> |
| | |
| | | |
| | | import Recorder from "js-audio-recorder"; |
| | | |
| | | import Legend from '../../components/liu-legend/Legend' |
| | | |
| | | export default { |
| | | components:{ |
| | | Legend, |
| | | }, |
| | | data() { |
| | | return { |
| | | //legend-liu数据 |
| | | datalistLIU:[ |
| | | { |
| | | color: 'rgb(233, 39, 25)', |
| | | text: '未处理' |
| | | }, |
| | | { |
| | | color: 'rgb(17, 198, 253)', |
| | | text: '处理中' |
| | | }, |
| | | { |
| | | color: 'black', |
| | | text: '已处理' |
| | | } |
| | | ], |
| | | |
| | | showMap: false, |
| | | hls: "", |
| | | videoSource: "", |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | ref="crud" |
| | | v-model="form" |
| | | :page.sync="page" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | @row-del="rowDel" |
| | | row-class-name="tabFontSize" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | ref="crud" |
| | | v-model="form" |
| | | :page.sync="page" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | @row-del="rowDel" |
| | | row-class-name="tabFontSize" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button type="danger" |
| | | size="mini" |
| | | icon="el-icon-delete" |
| | | v-if="permission.tenant_delete" |
| | | plain |
| | | @click="handleDelete">删 除 |
| | | <el-button |
| | | type="danger" |
| | | size="mini" |
| | | icon="el-icon-delete" |
| | | v-if="permission.tenant_delete" |
| | | plain |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | <!-- <el-button size="small"--> |
| | | <!-- plain--> |
| | | <!-- v-if="userInfo.role_name.includes('administrator')"--> |
| | | <!-- icon="el-icon-setting"--> |
| | | <!-- @click="handleSetting">授权配置--> |
| | | <!-- </el-button>--> |
| | | <!-- <el-button size="small"--> |
| | | <!-- plain--> |
| | | <!-- v-if="userInfo.role_name.includes('administrator')"--> |
| | | <!-- icon="el-icon-coin"--> |
| | | <!-- @click="handleDatasource">数据源配置--> |
| | | <!-- </el-button>--> |
| | | <!-- <el-button size="small"--> |
| | | <!-- plain--> |
| | | <!-- v-if="userInfo.role_name.includes('administrator')"--> |
| | | <!-- icon="el-icon-setting"--> |
| | | <!-- @click="handleSetting">授权配置--> |
| | | <!-- </el-button>--> |
| | | <!-- <el-button size="small"--> |
| | | <!-- plain--> |
| | | <!-- v-if="userInfo.role_name.includes('administrator')"--> |
| | | <!-- icon="el-icon-coin"--> |
| | | <!-- @click="handleDatasource">数据源配置--> |
| | | <!-- </el-button>--> |
| | | </template> |
| | | <template slot-scope="{row}" |
| | | slot="accountNumber"> |
| | | <el-tag>{{ row.accountNumber > 0 ? row.accountNumber : '不限制' }}</el-tag> |
| | | <template slot-scope="{ row }" slot="accountNumber"> |
| | | <el-tag>{{ |
| | | row.accountNumber > 0 ? row.accountNumber : "不限制" |
| | | }}</el-tag> |
| | | </template> |
| | | <template slot-scope="{row}" |
| | | slot="expireTime"> |
| | | <el-tag>{{ row.expireTime ? row.expireTime : '不限制' }}</el-tag> |
| | | <template slot-scope="{ row }" slot="expireTime"> |
| | | <el-tag>{{ row.expireTime ? row.expireTime : "不限制" }}</el-tag> |
| | | </template> |
| | | <template slot-scope="{row}" slot="type"> |
| | | <el-tag>{{row.type==='0'?'医院':row.type==='1'?'学校':row.type==='2'?'小区':'未知'}}</el-tag> |
| | | <template slot-scope="{ row }" slot="type"> |
| | | <el-tag>{{ |
| | | row.type === "0" |
| | | ? "医院" |
| | | : row.type === "1" |
| | | ? "学校" |
| | | : row.type === "2" |
| | | ? "小区" |
| | | : "未知" |
| | | }}</el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog title="租户授权配置" |
| | | append-to-body |
| | | :visible.sync="box" |
| | | width="450px"> |
| | | <avue-form :option="settingOption" v-model="settingForm" @submit="handleSubmit"/> |
| | | <el-dialog |
| | | title="租户授权配置" |
| | | append-to-body |
| | | :visible.sync="box" |
| | | width="450px" |
| | | > |
| | | <avue-form |
| | | :option="settingOption" |
| | | v-model="settingForm" |
| | | @submit="handleSubmit" |
| | | /> |
| | | </el-dialog> |
| | | <el-dialog title="租户数据源配置" |
| | | append-to-body |
| | | :visible.sync="datasourceBox" |
| | | width="450px"> |
| | | <avue-form :option="datasourceOption" v-model="datasourceForm" @submit="handleDatasourceSubmit"/> |
| | | <el-dialog |
| | | title="租户数据源配置" |
| | | append-to-body |
| | | :visible.sync="datasourceBox" |
| | | width="450px" |
| | | > |
| | | <avue-form |
| | | :option="datasourceOption" |
| | | v-model="datasourceForm" |
| | | @submit="handleDatasourceSubmit" |
| | | /> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList, getDetail, remove, update, add, setting, datasource,instery,updateInfoy,selectTy,insertss,updateInfos,selectTs,insertsr,updateInfor,selectTr,deletey,deletes,deleter} from "@/api/system/tenant"; |
| | | import {mapGetters} from "vuex"; |
| | | import { |
| | | getList, |
| | | getDetail, |
| | | remove, |
| | | update, |
| | | add, |
| | | setting, |
| | | datasource, |
| | | instery, |
| | | updateInfoy, |
| | | selectTy, |
| | | insertss, |
| | | updateInfos, |
| | | selectTs, |
| | | insertsr, |
| | | updateInfor, |
| | | selectTr, |
| | | deletey, |
| | | deletes, |
| | | deleter, |
| | | } from "@/api/system/tenant"; |
| | | import { mapGetters } from "vuex"; |
| | | import website from "@/config/website"; |
| | | import {getRoleTree} from "@/api/system/role"; |
| | | import AvueMap from 'avue-plugin-map' |
| | | import { getRoleTree } from "@/api/system/role"; |
| | | import AvueMap from "avue-plugin-map"; |
| | | var that; |
| | | export default { |
| | | |
| | | data() { |
| | | that = this; |
| | | return { |
| | |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | total: 0, |
| | | }, |
| | | option: { |
| | | height: 'auto', |
| | | height: "auto", |
| | | calcHeight: 80, |
| | | size: "mini", |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | stripe:true, |
| | | stripe: true, |
| | | index: true, |
| | | selection: true, |
| | | viewBtn: true, |
| | | //dialogType: 'drawer', |
| | | dialogClickModal: false, |
| | | // searchSize: 'mini', |
| | | column: [ |
| | | { |
| | | label: "客户ID", |
| | |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | span: 24, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入租户ID", |
| | | trigger: "blur" |
| | | }] |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入租户ID", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "客户名称", |
| | |
| | | search: true, |
| | | width: 190, |
| | | span: 12, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入参数名称", |
| | | trigger: "blur" |
| | | }] |
| | | searchSpan: 3, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入参数名称", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "联系人", |
| | | prop: "linkman", |
| | | width: 100, |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入联系人", |
| | | trigger: "blur" |
| | | }] |
| | | searchSpan: 3, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入联系人", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "联系电话", |
| | |
| | | type: "select", |
| | | props: { |
| | | label: "name", |
| | | value: "code" |
| | | value: "code", |
| | | }, |
| | | cascaderItem: ["city", "district"], |
| | | dicUrl: "/api/blade-system/region/select", |
| | | span: 6, |
| | | className: "cityClass1" |
| | | className: "cityClass1", |
| | | }, |
| | | { |
| | | label: "地市", |
| | |
| | | search: true, |
| | | props: { |
| | | label: "name", |
| | | value: "code" |
| | | value: "code", |
| | | }, |
| | | dicUrl: "/api/blade-system/region/select?code={{key}}", |
| | | span: 3, |
| | | labelWidth: "0", |
| | | className: "cityClass2" |
| | | className: "cityClass2", |
| | | }, |
| | | { |
| | | label: "区县", |
| | |
| | | type: "select", |
| | | props: { |
| | | label: "name", |
| | | value: "code" |
| | | value: "code", |
| | | }, |
| | | dicUrl: "/api/blade-system/region/select?code={{key}}", |
| | | span: 3, |
| | | labelWidth: "0", |
| | | className: "cityClass3" |
| | | className: "cityClass3", |
| | | }, |
| | | { |
| | | label: '坐标', |
| | | prop: 'map', |
| | | label: "地址", |
| | | prop: "map", |
| | | hide: true, |
| | | span: 24, |
| | | component: "AvueMap", |
| | | }, |
| | | { |
| | | label: '经度', |
| | | label: "纬度", |
| | | hide: true, |
| | | addDisplay: false, |
| | | prop: 'jd', |
| | | prop: "wd", |
| | | }, |
| | | { |
| | | label: '纬度', |
| | | label: "经度", |
| | | hide: true, |
| | | addDisplay: false, |
| | | prop: 'wd', |
| | | prop: "jd", |
| | | }, |
| | | { |
| | | label: "账号额度", |
| | |
| | | prop: "type", |
| | | width: 80, |
| | | type: "select", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择类型", |
| | | trigger: "blur" |
| | | }], |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择类型", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | dicData: [ |
| | | { |
| | | label: "医院", |
| | | value: "0" |
| | | value: "0", |
| | | }, |
| | | { |
| | | label: "学校", |
| | | value: "1" |
| | | value: "1", |
| | | }, |
| | | { |
| | | label: "小区", |
| | | value: "2" |
| | | } |
| | | value: "2", |
| | | }, |
| | | ], |
| | | change: function (value,column) { |
| | | change: function (value, column) { |
| | | if (value.value == "0") { |
| | | that.option.group = [ |
| | | { |
| | | label: '详细信息', |
| | | prop: 'detailInfo', |
| | | icon: 'el-icon-s-order', |
| | | label: "详细信息", |
| | | prop: "detailInfo", |
| | | icon: "el-icon-s-order", |
| | | column: [ |
| | | { |
| | | label: "医院等级", |
| | |
| | | dicData: [], |
| | | props: { |
| | | label: "title", |
| | | value:"" |
| | | value: "", |
| | | }, |
| | | checkStrictly: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入医院等级", |
| | | trigger: "blur" |
| | | }] |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入医院等级", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "医院类别", |
| | | prop: "ht", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入医院类别", |
| | | trigger: "blur" |
| | | }] |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入医院类别", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "成立时间", |
| | |
| | | prop: "ctime", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入成立时间", |
| | | trigger: "blur" |
| | | }] |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入成立时间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "地址", |
| | | prop:"had", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入地址", |
| | | trigger: "blur" |
| | | }] |
| | | prop: "had", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入地址", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "介绍", |
| | | prop: "content", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入介绍", |
| | | trigger: "blur" |
| | | }], |
| | | span:24, |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | } |
| | | else if (value.value=="1"){ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入介绍", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | span: 24, |
| | | }, |
| | | ], |
| | | }, |
| | | ]; |
| | | } else if (value.value == "1") { |
| | | that.option.group = [ |
| | | { |
| | | label: '详细信息', |
| | | prop: 'dutyInfo', |
| | | icon: 'el-icon-s-custom', |
| | | label: "详细信息", |
| | | prop: "dutyInfo", |
| | | icon: "el-icon-s-custom", |
| | | column: [ |
| | | { |
| | | label: "学校性质", |
| | |
| | | dicData: [], |
| | | props: { |
| | | label: "title", |
| | | value:"" |
| | | value: "", |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入学校性质", |
| | | trigger: "blur" |
| | | }] |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入学校性质", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "校训", |
| | | prop: "motto", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入校训", |
| | | trigger: "blur" |
| | | }] |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入校训", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "创办时间", |
| | |
| | | prop: "ctime", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入创办时间" |
| | | }] |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入创办时间", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "地址", |
| | | prop:"had", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入地址" |
| | | }] |
| | | prop: "had", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入地址", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "介绍", |
| | | prop: "content", |
| | | span:24, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入介绍" |
| | | }] |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | } |
| | | else if (value.value=="2") { |
| | | span: 24, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入介绍", |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | }, |
| | | ]; |
| | | } else if (value.value == "2") { |
| | | that.option.group = [ |
| | | { |
| | | label: '详细信息', |
| | | prop: 'baseInfo', |
| | | icon: 'el-icon-s-solid', |
| | | label: "详细信息", |
| | | prop: "baseInfo", |
| | | icon: "el-icon-s-solid", |
| | | column: [ |
| | | { |
| | | label: "小区类别", |
| | |
| | | dicData: [], |
| | | props: { |
| | | label: "title", |
| | | value:"" |
| | | value: "", |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入小区类别" |
| | | }] |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入小区类别", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "小区属性", |
| | | prop: "attributes", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入小区属性" |
| | | }] |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入小区属性", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "开发商", |
| | | prop:"developers", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入开发商" |
| | | }] |
| | | prop: "developers", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入开发商", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "地址", |
| | | prop:"had", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入地址" |
| | | }] |
| | | prop: "had", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入地址", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "户型", |
| | | prop:"housetype", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入户型" |
| | | }] |
| | | prop: "housetype", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入户型", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "介绍", |
| | | prop: "content", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入介绍" |
| | | }], |
| | | span:24, |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入介绍", |
| | | }, |
| | | ], |
| | | span: 24, |
| | | }, |
| | | ], |
| | | }, |
| | | ]; |
| | | } else { |
| | | that.option.group = []; |
| | | } |
| | | else { |
| | | that.option.group =[] |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | label: "绑定域名", |
| | |
| | | { |
| | | label: "系统背景", |
| | | prop: "backgroundUrl", |
| | | type: 'upload', |
| | | listType: 'picture-img', |
| | | action: '/api/blade-resource/oss/endpoint/put-file', |
| | | type: "upload", |
| | | listType: "picture-img", |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | | propsHttp: { |
| | | res: 'data', |
| | | url: 'link', |
| | | res: "data", |
| | | url: "link", |
| | | }, |
| | | hide: true, |
| | | span: 24, |
| | | }, |
| | | ], |
| | | group: [ |
| | | ] |
| | | group: [], |
| | | }, |
| | | data: [], |
| | | settingForm: {}, |
| | |
| | | valueFormat: "yyyy-MM-dd hh:mm:ss", |
| | | span: 24, |
| | | }, |
| | | ] |
| | | ], |
| | | }, |
| | | datasourceForm: {}, |
| | | datasourceOption: { |
| | |
| | | dicUrl: "/api/blade-develop/datasource/select", |
| | | props: { |
| | | label: "name", |
| | | value: "id" |
| | | value: "id", |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择数据源", |
| | | trigger: "blur" |
| | | }] |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择数据源", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | ] |
| | | } |
| | | ], |
| | | }, |
| | | }; |
| | | }, |
| | | watch:{ |
| | | 'form.map':{// form是表单或者表格绑定的数据集,v-model='form' |
| | | handler(val){ |
| | | if (val!=undefined) { |
| | | this.form.jd = val.latitude |
| | | this.form.wd = val.longitude |
| | | //报错: TypeError: val is undefined 处理时间2021.4.10,处理人 liuyg |
| | | watch: { |
| | | "form.map": { |
| | | // form是表单或者表格绑定的数据集,v-model='form' |
| | | |
| | | handler(val) { |
| | | if (val) { |
| | | this.form.wd = val.latitude; |
| | | this.form.jd = val.longitude; |
| | | } |
| | | }, |
| | | immediate: true |
| | | } |
| | | immediate: true, |
| | | }, |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userInfo", "permission"]), |
| | |
| | | addBtn: this.vaildData(this.permission.tenant_add, false), |
| | | viewBtn: this.vaildData(this.permission.tenant_view, false), |
| | | delBtn: this.vaildData(this.permission.tenant_delete, false), |
| | | editBtn: this.vaildData(this.permission.tenant_edit, false) |
| | | editBtn: this.vaildData(this.permission.tenant_edit, false), |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | tenantId() { |
| | | return this.selectionList[0].tenantId; |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | rowSave(row, done, loading) { |
| | | add(row).then(() => { |
| | | if (row.type=="0"){ |
| | | instery(row.dj,row.had,row.ht,row.ctime,row.content,row.tenantName); |
| | | add(row).then( |
| | | () => { |
| | | if (row.type == "0") { |
| | | instery( |
| | | row.dj, |
| | | row.had, |
| | | row.ht, |
| | | row.ctime, |
| | | row.content, |
| | | row.tenantName |
| | | ); |
| | | } else if (row.type == "1") { |
| | | insertss( |
| | | row.nature, |
| | | row.had, |
| | | row.motto, |
| | | row.ctime, |
| | | row.content, |
| | | row.tenantName |
| | | ); |
| | | } else if (row.type == "2") { |
| | | insertsr( |
| | | row.category, |
| | | row.attributes, |
| | | row.developers, |
| | | row.had, |
| | | row.housetype, |
| | | row.content, |
| | | row.hn |
| | | ); |
| | | } |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | else if (row.type=="1"){ |
| | | insertss(row.nature,row.had,row.motto,row.ctime,row.content,row.tenantName); |
| | | } |
| | | else if (row.type=="2") { |
| | | insertsr(row.category, row.attributes, row.developers,row.had, row.housetype, row.content, row.hn) |
| | | } |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | }); |
| | | ); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | if (row.type=="0"){ |
| | | updateInfoy(row.dj,row.had,row.ht,row.ctime,row.content,row.tenantName); |
| | | if (row.type == "0") { |
| | | updateInfoy( |
| | | row.dj, |
| | | row.had, |
| | | row.ht, |
| | | row.ctime, |
| | | row.content, |
| | | row.tenantName |
| | | ); |
| | | } else if (row.type == "1") { |
| | | updateInfos( |
| | | row.nature, |
| | | row.had, |
| | | row.motto, |
| | | row.ctime, |
| | | row.content, |
| | | row.tenantName |
| | | ); |
| | | } else if (row.type == "2") { |
| | | updateInfor( |
| | | row.category, |
| | | row.attributes, |
| | | row.developers, |
| | | row.had, |
| | | row.housetype, |
| | | row.content, |
| | | row.tenantName |
| | | ); |
| | | } |
| | | else if (row.type=="1"){ |
| | | updateInfos(row.nature,row.had,row.motto,row.ctime,row.content,row.tenantName); |
| | | } |
| | | else if (row.type=="2"){ |
| | | updateInfor(row.category, row.attributes, row.developers,row.had, row.housetype, row.content, row.tenantName) |
| | | } |
| | | update(row).then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | }); |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | if (row.type=="0"){ |
| | | deletey(row.tenantName) |
| | | } |
| | | else if (row.type=="1"){ |
| | | deletes(row.tenantName) |
| | | } |
| | | else if (row.type=="2"){ |
| | | deleter(row.tenantName) |
| | | if (row.type == "0") { |
| | | deletey(row.tenantName); |
| | | } else if (row.type == "1") { |
| | | deletes(row.tenantName); |
| | | } else if (row.type == "2") { |
| | | deleter(row.tenantName); |
| | | } |
| | | return remove(row.id); |
| | | }) |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit"].includes(type)) { |
| | | getDetail(this.form.id).then(res => { |
| | | if (this.form.type=="1"){ |
| | | getDetail(this.form.id).then((res) => { |
| | | if (this.form.type == "1") { |
| | | const data = res.data.data; |
| | | selectTs(this.form.tenantName).then( re=>{ |
| | | selectTs(this.form.tenantName).then((re) => { |
| | | const data = res.data.data; |
| | | data.nature=re.data.data[0].nature |
| | | data.motto=re.data.data[0].motto |
| | | data.ctime=re.data.data[0].ctime |
| | | data.had=re.data.data[0].had |
| | | data.content=re.data.data[0].content |
| | | data.nature = re.data.data[0].nature; |
| | | data.motto = re.data.data[0].motto; |
| | | data.ctime = re.data.data[0].ctime; |
| | | data.had = re.data.data[0].had; |
| | | data.content = re.data.data[0].content; |
| | | this.form = data; |
| | | }) |
| | | } |
| | | else if (this.form.type=="0"){ |
| | | selectTy(this.form.tenantName).then( re=>{ |
| | | }); |
| | | } else if (this.form.type == "0") { |
| | | selectTy(this.form.tenantName).then((re) => { |
| | | const data = res.data.data; |
| | | data.dj=re.data.data[0].dj |
| | | data.ht=re.data.data[0].ht |
| | | data.ctime=re.data.data[0].ctime |
| | | data.had=re.data.data[0].had |
| | | data.content=re.data.data[0].content |
| | | data.dj = re.data.data[0].dj; |
| | | data.ht = re.data.data[0].ht; |
| | | data.ctime = re.data.data[0].ctime; |
| | | data.had = re.data.data[0].had; |
| | | data.content = re.data.data[0].content; |
| | | this.form = data; |
| | | }) |
| | | } |
| | | else if (this.form.type=="2"){ |
| | | selectTr(this.form.tenantName).then( re=>{ |
| | | }); |
| | | } else if (this.form.type == "2") { |
| | | selectTr(this.form.tenantName).then((re) => { |
| | | const data = res.data.data; |
| | | data.category=re.data.data[0].category |
| | | data.attributes=re.data.data[0].attributes |
| | | data.developers=re.data.data[0].developers |
| | | data.had=re.data.data[0].had |
| | | data.housetype=re.data.data[0].housetype |
| | | data.content=re.data.data[0].content |
| | | data.category = re.data.data[0].category; |
| | | data.attributes = re.data.data[0].attributes; |
| | | data.developers = re.data.data[0].developers; |
| | | data.had = re.data.data[0].had; |
| | | data.housetype = re.data.data[0].housetype; |
| | | data.content = re.data.data[0].content; |
| | | this.form = data; |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | }); |
| | | } |
| | | else if (["view"].includes(type)){ |
| | | getDetail(this.form.id).then(res => { |
| | | if (this.form.type=="1") { |
| | | selectTs(this.form.tenantName).then( re=>{ |
| | | } else if (["view"].includes(type)) { |
| | | getDetail(this.form.id).then((res) => { |
| | | if (this.form.type == "1") { |
| | | selectTs(this.form.tenantName).then((re) => { |
| | | const data = res.data.data; |
| | | data.nature=re.data.data[0].nature |
| | | data.motto=re.data.data[0].motto |
| | | data.ctime=re.data.data[0].ctime |
| | | data.had=re.data.data[0].had |
| | | data.content=re.data.data[0].content |
| | | data.nature = re.data.data[0].nature; |
| | | data.motto = re.data.data[0].motto; |
| | | data.ctime = re.data.data[0].ctime; |
| | | data.had = re.data.data[0].had; |
| | | data.content = re.data.data[0].content; |
| | | if (!(data.accountNumber > 0)) { |
| | | data.accountNumber = "不限制"; |
| | | } |
| | |
| | | data.expireTime = "不限制"; |
| | | } |
| | | this.form = data; |
| | | }) |
| | | } |
| | | else if (this.form.type=="0"){ |
| | | selectTy(this.form.tenantName).then( re=>{ |
| | | }); |
| | | } else if (this.form.type == "0") { |
| | | selectTy(this.form.tenantName).then((re) => { |
| | | const data = res.data.data; |
| | | data.dj=re.data.data[0].dj |
| | | data.ht=re.data.data[0].ht |
| | | data.ctime=re.data.data[0].ctime |
| | | data.had=re.data.data[0].had |
| | | data.content=re.data.data[0].content |
| | | data.dj = re.data.data[0].dj; |
| | | data.ht = re.data.data[0].ht; |
| | | data.ctime = re.data.data[0].ctime; |
| | | data.had = re.data.data[0].had; |
| | | data.content = re.data.data[0].content; |
| | | if (!(data.accountNumber > 0)) { |
| | | data.accountNumber = "不限制"; |
| | | } |
| | |
| | | data.expireTime = "不限制"; |
| | | } |
| | | this.form = data; |
| | | }) |
| | | } |
| | | else if (this.form.type=="2"){ |
| | | selectTr(this.form.tenantName).then( re=>{ |
| | | }); |
| | | } else if (this.form.type == "2") { |
| | | selectTr(this.form.tenantName).then((re) => { |
| | | const data = res.data.data; |
| | | data.category=re.data.data[0].category |
| | | data.attributes=re.data.data[0].attributes |
| | | data.developers=re.data.data[0].developers |
| | | data.had=re.data.data[0].had |
| | | data.housetype=re.data.data[0].housetype |
| | | data.content=re.data.data[0].content |
| | | data.category = re.data.data[0].category; |
| | | data.attributes = re.data.data[0].attributes; |
| | | data.developers = re.data.data[0].developers; |
| | | data.had = re.data.data[0].had; |
| | | data.housetype = re.data.data[0].housetype; |
| | | data.content = re.data.data[0].content; |
| | | if (!(data.accountNumber > 0)) { |
| | | data.accountNumber = "不限制"; |
| | | } |
| | |
| | | data.expireTime = "不限制"; |
| | | } |
| | | this.form = data; |
| | | }) |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | |
| | | return; |
| | | } |
| | | if (this.selectionList.length === 1) { |
| | | getDetail(this.selectionList[0].id).then(res => { |
| | | getDetail(this.selectionList[0].id).then((res) => { |
| | | const data = res.data.data; |
| | | this.settingForm.accountNumber = data.accountNumber; |
| | | this.settingForm.expireTime = data.expireTime; |
| | | }); |
| | | } else { |
| | | this.settingForm.accountNumber = -1; |
| | | this.settingForm.expireTime = ''; |
| | | this.settingForm.expireTime = ""; |
| | | } |
| | | this.box = true; |
| | | }, |
| | |
| | | this.$message.warning("只能选择一条数据"); |
| | | return; |
| | | } |
| | | getDetail(this.selectionList[0].id).then(res => { |
| | | getDetail(this.selectionList[0].id).then((res) => { |
| | | const data = res.data.data; |
| | | this.datasourceForm.datasourceId = data.datasourceId; |
| | | }); |
| | | this.datasourceBox = true; |
| | | }, |
| | | handleSubmit(form, done, loading) { |
| | | setting(this.ids, form).then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "配置成功!" |
| | | }); |
| | | done(); |
| | | this.box = false; |
| | | }, error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | }); |
| | | setting(this.ids, form).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "配置成功!", |
| | | }); |
| | | done(); |
| | | this.box = false; |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | handleDatasourceSubmit(form, done, loading) { |
| | | datasource(this.tenantId, form.datasourceId).then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "配置成功!" |
| | | }); |
| | | done(); |
| | | this.datasourceBox = false; |
| | | }, error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | }); |
| | | datasource(this.tenantId, form.datasourceId).then( |
| | | () => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "配置成功!", |
| | | }); |
| | | done(); |
| | | this.datasourceBox = false; |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | getList( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | <style lang="scss" > |
| | | //scoped |
| | | $city-m-l: 10px; |
| | | |
| | | /*页面样式*/ |
| | | .el-card__body .cityClass1 { |
| | | width: 155px; |
| | | padding-right: 0px !important; |
| | | } |
| | | /*页面样式clientManagement.vue的样式 liuyg改*/ |
| | | .el-card__body .city1 { |
| | | width: 155px; |
| | | padding-right: 0px !important; |
| | | margin-left: $city-m-l; |
| | | } |
| | | |
| | | .el-card__body .cityClass2 { |
| | | width: 100px; |
| | | padding-left: 0px !important; |
| | | padding-right: 0px !important; |
| | | } |
| | | .el-card__body .city2 { |
| | | width: 100px; |
| | | padding-left: 0px !important; |
| | | padding-right: 0px !important; |
| | | margin-left: $city-m-l; |
| | | } |
| | | |
| | | .el-card__body .cityClass3 { |
| | | width: 100px; |
| | | padding-left: 0px !important; |
| | | padding-right: 0px !important; |
| | | } |
| | | .el-card__body .city3 { |
| | | width: 100px; |
| | | padding-left: 0px !important; |
| | | padding-right: 0px !important; |
| | | margin-left: $city-m-l; |
| | | } |
| | | |
| | | /*新增窗体样式*/ |
| | | .el-dialog .cityClass1 { |
| | | width: 220px; |
| | | padding-right: 0px !important; |
| | | } |
| | | /*新增窗体样式*/ |
| | | .el-dialog .city1 { |
| | | width: 210px; |
| | | padding-right: 0px !important; |
| | | margin-left: $city-m-l; |
| | | } |
| | | |
| | | .el-dialog .cityClass2 { |
| | | width: 110px; |
| | | padding-left: 5px !important; |
| | | padding-right: 5px !important; |
| | | } |
| | | .el-dialog .city2 { |
| | | width: 105px; |
| | | padding-left: 5px !important; |
| | | padding-right: 5px !important; |
| | | margin-left: $city-m-l; |
| | | } |
| | | |
| | | .el-dialog .cityClass3 { |
| | | width: 110px; |
| | | padding-left: 0px !important; |
| | | padding-right: 0px !important; |
| | | } |
| | | .el-dialog .city3 { |
| | | width: 105px; |
| | | padding-left: 0px !important; |
| | | padding-right: 0px !important; |
| | | margin-left: $city-m-l; |
| | | } |
| | | .city2 div label { |
| | | display: none; |
| | | } |
| | | |
| | | .cityClass2 div label { |
| | | display: none; |
| | | } |
| | | .city3 div label { |
| | | display: none; |
| | | } |
| | | |
| | | .cityClass3 div label { |
| | | display: none; |
| | | } |
| | | /*页面样式*/ |
| | | .el-card__body .cityClass1 { |
| | | width: 155px; |
| | | padding-right: 0px !important; |
| | | margin-left: $city-m-l; |
| | | } |
| | | |
| | | .tabFontSize{ |
| | | font-size: 15px; |
| | | } |
| | | .el-card__body .cityClass2 { |
| | | width: 100px; |
| | | padding-left: 0px !important; |
| | | padding-right: 0px !important; |
| | | margin-left: $city-m-l; |
| | | } |
| | | |
| | | .el-card__body .cityClass3 { |
| | | width: 100px; |
| | | padding-left: 0px !important; |
| | | padding-right: 0px !important; |
| | | margin-left: $city-m-l; |
| | | } |
| | | |
| | | /*新增窗体样式*/ |
| | | .el-dialog .cityClass1, |
| | | .el-dialog .cityClass2, |
| | | .el-dialog .cityClass3 { |
| | | margin-left: $city-m-l; |
| | | position: relative; |
| | | left: -10px; |
| | | } |
| | | .el-dialog .cityClass1 { |
| | | width: 220px; |
| | | padding-right: 0px !important; |
| | | } |
| | | |
| | | .el-dialog .cityClass2 { |
| | | width: 130px; |
| | | padding-left: 5px !important; |
| | | padding-right: 5px !important; |
| | | } |
| | | |
| | | .el-dialog .cityClass3 { |
| | | width: 130px; |
| | | padding-left: 0px !important; |
| | | padding-right: 0px !important; |
| | | } |
| | | |
| | | .cityClass2 div label { |
| | | display: none; |
| | | } |
| | | |
| | | .cityClass3 div label { |
| | | display: none; |
| | | } |
| | | |
| | | .tabFontSize { |
| | | font-size: 15px; |
| | | } |
| | | |
| | | .el-input__inner { |
| | | width: aotu; |
| | | } |
| | | </style> |