Merge branch 'master' of http://192.168.4.125:32792/04787/smart-power-ui
This commit is contained in:
commit
589a1d992d
|
@ -189,3 +189,12 @@ aside {
|
||||||
.multiselect--active {
|
.multiselect--active {
|
||||||
z-index: 1000 !important;
|
z-index: 1000 !important;
|
||||||
}
|
}
|
||||||
|
.lay-table-textarea {
|
||||||
|
letter-spacing: initial;
|
||||||
|
white-space: nowrap;
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
line-height: 0.9;
|
||||||
|
}
|
||||||
|
|
|
@ -200,7 +200,7 @@ export default {
|
||||||
list.forEach(v => {
|
list.forEach(v => {
|
||||||
// if (v.unProcessAlarmTotal > 0) {
|
// if (v.unProcessAlarmTotal > 0) {
|
||||||
resultStr = resultStr + `
|
resultStr = resultStr + `
|
||||||
<div class="item-device">
|
<div class="item-device" onclick="${_this}">
|
||||||
<img class="d-img" src="${infoDeviceIcon}" />
|
<img class="d-img" src="${infoDeviceIcon}" />
|
||||||
<span class="device-info" name="${v.deviceId}"
|
<span class="device-info" name="${v.deviceId}"
|
||||||
onclick="window['_this'].$router.push({ name:'systemDevice', params: { 'deviceId': ${v.deviceId}, 'tempType': 'details' } })"
|
onclick="window['_this'].$router.push({ name:'systemDevice', params: { 'deviceId': ${v.deviceId}, 'tempType': 'details' } })"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="amap-bigsc-location">
|
<div class="amap-bigsc-location">
|
||||||
<div id="container" style="width:100%; height:100%"></div>
|
<div id="container" style="width: 100%; height: 100%"></div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
@ -20,21 +20,21 @@ export default {
|
||||||
default: {
|
default: {
|
||||||
lng: 116.397428,
|
lng: 116.397428,
|
||||||
lat: 39.90923,
|
lat: 39.90923,
|
||||||
address: ""
|
address: "",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
zoom: {
|
zoom: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: 10
|
default: 10,
|
||||||
},
|
},
|
||||||
draggable: {
|
draggable: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false,
|
||||||
},
|
},
|
||||||
projectList: {
|
projectList: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: []
|
default: [],
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -42,10 +42,10 @@ export default {
|
||||||
pointResult: {
|
pointResult: {
|
||||||
lng: 119.275254,
|
lng: 119.275254,
|
||||||
lat: 26.028928,
|
lat: 26.028928,
|
||||||
address: ""
|
address: "",
|
||||||
},
|
},
|
||||||
theme: "",
|
theme: "",
|
||||||
infoWindow: null
|
infoWindow: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -53,7 +53,7 @@ export default {
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
projectList: {
|
projectList: {
|
||||||
handler: function(list, oldVal) {
|
handler: function (list, oldVal) {
|
||||||
// 创建设备定位的点
|
// 创建设备定位的点
|
||||||
if (this.aMap) {
|
if (this.aMap) {
|
||||||
this.aMap.clearMap();
|
this.aMap.clearMap();
|
||||||
|
@ -62,8 +62,8 @@ export default {
|
||||||
// console.log("map_projectList: ", list);
|
// console.log("map_projectList: ", list);
|
||||||
// this.textFu();
|
// this.textFu();
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
overview() {
|
overview() {
|
||||||
|
@ -78,7 +78,7 @@ export default {
|
||||||
center: [this.mapCenter.lng, this.mapCenter.lat],
|
center: [this.mapCenter.lng, this.mapCenter.lat],
|
||||||
resizeEnable: true,
|
resizeEnable: true,
|
||||||
// zoom: this.zoom,
|
// zoom: this.zoom,
|
||||||
mapStyle: "amap://styles/" + this.theme
|
mapStyle: "amap://styles/" + this.theme,
|
||||||
});
|
});
|
||||||
this.createMarker();
|
this.createMarker();
|
||||||
// this.textFu();
|
// this.textFu();
|
||||||
|
@ -89,7 +89,7 @@ export default {
|
||||||
this.infoWindow = new AMap.InfoWindow({
|
this.infoWindow = new AMap.InfoWindow({
|
||||||
isCustom: true, //使用自定义窗体
|
isCustom: true, //使用自定义窗体
|
||||||
content: "",
|
content: "",
|
||||||
offset: new AMap.Pixel(-3, -9)
|
offset: new AMap.Pixel(-3, -9),
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 地图标点 点击事件
|
// 地图标点 点击事件
|
||||||
|
@ -106,7 +106,7 @@ export default {
|
||||||
let marker = new AMap.Marker({
|
let marker = new AMap.Marker({
|
||||||
position: [116.4224009776628, 39.93482727239599],
|
position: [116.4224009776628, 39.93482727239599],
|
||||||
icon: markerIcon,
|
icon: markerIcon,
|
||||||
offset: new AMap.Pixel(-13, -30)
|
offset: new AMap.Pixel(-13, -30),
|
||||||
});
|
});
|
||||||
var content = [];
|
var content = [];
|
||||||
content.push(
|
content.push(
|
||||||
|
@ -146,19 +146,24 @@ export default {
|
||||||
createMarker() {
|
createMarker() {
|
||||||
var markerList = [];
|
var markerList = [];
|
||||||
var _this = this;
|
var _this = this;
|
||||||
|
var projectUrl = this.$store.getters.tenantId === 0 ? '/project/project' : '/project_tenant/project_tenant'
|
||||||
for (var i = 0; i < this.projectList.length; i++) {
|
for (var i = 0; i < this.projectList.length; i++) {
|
||||||
if (this.projectList[i].projectLat && this.projectList[i].projectLng) {
|
if (this.projectList[i].projectLat && this.projectList[i].projectLng) {
|
||||||
let marker = new AMap.Marker({
|
let marker = new AMap.Marker({
|
||||||
position: [
|
position: [
|
||||||
this.projectList[i].projectLng,
|
this.projectList[i].projectLng,
|
||||||
this.projectList[i].projectLat
|
this.projectList[i].projectLat,
|
||||||
],
|
],
|
||||||
// map: this.aMap,
|
// map: this.aMap,
|
||||||
icon: this.projectList[i].tenantIndexVo['unProcessed'] > 0 ? markerAlarmIcon : markerIcon,
|
icon:
|
||||||
offset: new AMap.Pixel(-13, -30)
|
this.projectList[i].tenantIndexVo["unProcessed"] > 0
|
||||||
|
? markerAlarmIcon
|
||||||
|
: markerIcon,
|
||||||
|
offset: new AMap.Pixel(-13, -30),
|
||||||
});
|
});
|
||||||
var content = [];
|
var content = [];
|
||||||
window['amapObj'] = this.aMap;
|
window["amapObj"] = this.aMap;
|
||||||
|
window['_this'] = this;
|
||||||
content.push(
|
content.push(
|
||||||
`<div class="info-block">
|
`<div class="info-block">
|
||||||
<span class="info-title">报警提醒</span>
|
<span class="info-title">报警提醒</span>
|
||||||
|
@ -166,19 +171,31 @@ export default {
|
||||||
<img class="info-top" src="${infoTopIcon}" />
|
<img class="info-top" src="${infoTopIcon}" />
|
||||||
<div class="info-wrap">
|
<div class="info-wrap">
|
||||||
<div class="info-item"><span class="info-lable">项目:</span>
|
<div class="info-item"><span class="info-lable">项目:</span>
|
||||||
<span class="info-value">${this.projectList[i].projectName}</span></div>
|
<span class="info-value info-a"
|
||||||
|
onclick="window['_this'].$router.push({ path:'${projectUrl}', query: { 'projectId': '${
|
||||||
|
this.projectList[i].projectId
|
||||||
|
}', 'tempType': 'details' } })"
|
||||||
|
>${
|
||||||
|
this.projectList[i].projectName
|
||||||
|
}</span></div>
|
||||||
<div class="info-item"><span class="info-lable">地址:</span>
|
<div class="info-item"><span class="info-lable">地址:</span>
|
||||||
<marquee style="margin: 0; width:calc(100% - 80px);" behavior="alternate" scrollamount="1" width="calc(100% - 40px)">
|
<marquee style="margin: 0; width:calc(100% - 80px);" behavior="alternate" scrollamount="1" width="calc(100% - 40px)">
|
||||||
<span class="info-value">${this.projectList[i].projectAddress}</span>
|
<span class="info-value">${
|
||||||
|
this.projectList[i].projectAddress
|
||||||
|
}</span>
|
||||||
</marquee>
|
</marquee>
|
||||||
</div>
|
</div>
|
||||||
<div class="info-item"><span class="info-lable">报警总数:</span>
|
<div class="info-item"><span class="info-lable">报警总数:</span>
|
||||||
<span class="info-value" style="color: #ff3739;font-size: 24px;font-weight: 500;">${this.projectList[i].tenantIndexVo?.unProcessed}</span></div>
|
<span class="info-value" style="color: #ff3739;font-size: 24px;font-weight: 500;">${
|
||||||
|
this.projectList[i].tenantIndexVo?.unProcessed
|
||||||
|
}</span></div>
|
||||||
<div class="alarm-icon-block">
|
<div class="alarm-icon-block">
|
||||||
<img class="alarm-icon" src="${infoAlarmIcon}"/>
|
<img class="alarm-icon" src="${infoAlarmIcon}"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="list-device">
|
<div class="list-device">
|
||||||
${this.resultDeviceListStr(this.projectList[i].deviceAlarmSimpleVoList || [])}
|
${this.resultDeviceListStr(
|
||||||
|
this.projectList[i].deviceAlarmSimpleVoList || []
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<img class="info-bottom" src="${infoBotIcon}">
|
<img class="info-bottom" src="${infoBotIcon}">
|
||||||
|
@ -192,21 +209,36 @@ export default {
|
||||||
this.aMap.add(markerList);
|
this.aMap.add(markerList);
|
||||||
this.aMap.setFitView();
|
this.aMap.setFitView();
|
||||||
},
|
},
|
||||||
|
handlerMapDevice(e) {
|
||||||
|
console.log("handler-map-device-click", e);
|
||||||
|
this.$router.push({
|
||||||
|
name: "Device",
|
||||||
|
params: { deviceId: e.deviceId, tempType: "details" },
|
||||||
|
});
|
||||||
|
},
|
||||||
resultDeviceListStr(list) {
|
resultDeviceListStr(list) {
|
||||||
var resultStr = '';
|
var resultStr = "";
|
||||||
var _this = this;
|
var _this = this;
|
||||||
window['_this'] = this;
|
window["_this"] = this;
|
||||||
|
var deviceUrl = this.$store.getters.tenantId === 0 ? '/device/device' : '/device_tenant/device_tenant'
|
||||||
if (list && list.length > 0) {
|
if (list && list.length > 0) {
|
||||||
list.forEach(v => {
|
list.forEach((v) => {
|
||||||
// if (v.unProcessAlarmTotal > 0) {
|
// if (v.unProcessAlarmTotal > 0) {
|
||||||
resultStr = resultStr + `
|
resultStr =
|
||||||
<div class="item-device">
|
resultStr +
|
||||||
|
`
|
||||||
|
<div class="item-device"
|
||||||
|
onclick="window['_this'].$router.push({ path:'${deviceUrl}', query: { 'deviceId': '${
|
||||||
|
v.deviceId
|
||||||
|
}', 'tempType': 'details' } })"
|
||||||
|
>
|
||||||
<img class="d-img" src="${infoDeviceIcon}" />
|
<img class="d-img" src="${infoDeviceIcon}" />
|
||||||
<span class="device-info" name="${v.deviceId}"
|
<span class="device-info" name="${v.deviceId}"
|
||||||
onclick="window['_this'].$router.push({ name:'systemDevice', params: { 'deviceId': ${v.deviceId}, 'tempType': 'details' } })"
|
style="${v.unProcessAlarmTotal > 0 ? "color: #ff3739;" : ""}">${
|
||||||
style="${v.unProcessAlarmTotal > 0 ? 'color: #ff3739;':''}">${v.deviceName}</span>
|
v.deviceName
|
||||||
|
}</span>
|
||||||
</div>
|
</div>
|
||||||
`
|
`;
|
||||||
// }
|
// }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -234,10 +266,10 @@ export default {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
// console.log("经度:"+lng+"纬度"+lat);
|
// console.log("经度:"+lng+"纬度"+lat);
|
||||||
var lnglatXY = [lng, lat]; // 地图上所标点的坐标
|
var lnglatXY = [lng, lat]; // 地图上所标点的坐标
|
||||||
AMap.service("AMap.Geocoder", function() {
|
AMap.service("AMap.Geocoder", function () {
|
||||||
// 回调函数
|
// 回调函数
|
||||||
var geocoder = new AMap.Geocoder({});
|
var geocoder = new AMap.Geocoder({});
|
||||||
geocoder.getAddress(lnglatXY, function(status, result) {
|
geocoder.getAddress(lnglatXY, function (status, result) {
|
||||||
if (status === "complete" && result.info === "OK") {
|
if (status === "complete" && result.info === "OK") {
|
||||||
// console.log(result.regeocode.formattedAddress);
|
// console.log(result.regeocode.formattedAddress);
|
||||||
var address = result.regeocode.formattedAddress;
|
var address = result.regeocode.formattedAddress;
|
||||||
|
@ -258,8 +290,8 @@ export default {
|
||||||
showInfoM(e) {
|
showInfoM(e) {
|
||||||
this.pointResult["lat"] = e.lnglat.lat;
|
this.pointResult["lat"] = e.lnglat.lat;
|
||||||
this.pointResult["lng"] = e.lnglat.lng;
|
this.pointResult["lng"] = e.lnglat.lng;
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
@ -359,6 +391,9 @@ export default {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
line-height: 28px;
|
line-height: 28px;
|
||||||
}
|
}
|
||||||
|
span.info-a:hover {
|
||||||
|
color: #07beff;
|
||||||
|
}
|
||||||
div.alarm-icon-block {
|
div.alarm-icon-block {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
|
|
|
@ -28,6 +28,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
close() {
|
close() {
|
||||||
|
console.log('close0--')
|
||||||
this.$emit('close')
|
this.$emit('close')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<div class="icon-list">
|
<div class="icon-list">
|
||||||
<div v-for="(item, index) in iconList" :key="index" @click="selectedIcon(item)">
|
<div v-for="(item, index) in iconList" :key="index" @click="selectedIcon(item)">
|
||||||
<svg-icon :icon-class="item" style="height: 30px;width: 16px;" />
|
<svg-icon :icon-class="item" style="height: 30px;width: 16px;" />
|
||||||
<span>{{ item }}</span>
|
<span :title="item">{{ item }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -58,10 +58,20 @@ export default {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
span {
|
span {
|
||||||
display: inline-block;
|
// display: inline-block;
|
||||||
|
// vertical-align: -0.15em;
|
||||||
|
// fill: currentColor;
|
||||||
|
// overflow: hidden;
|
||||||
|
|
||||||
|
// new --- 2022-04-06
|
||||||
vertical-align: -0.15em;
|
vertical-align: -0.15em;
|
||||||
fill: currentColor;
|
fill: currentColor;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
width: calc(100% - 18px);
|
||||||
|
white-space: nowrap;
|
||||||
|
display: inline-block;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
padding-left: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -240,6 +240,7 @@ export default {
|
||||||
this.getList(this.queryOption.page, this.queryOption.params);
|
this.getList(this.queryOption.page, this.queryOption.params);
|
||||||
},
|
},
|
||||||
handleQuery2() {
|
handleQuery2() {
|
||||||
|
this.optionTrue = false
|
||||||
this.getList(this.queryOption.page, this.queryOption.params);
|
this.getList(this.queryOption.page, this.queryOption.params);
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
|
|
|
@ -71,6 +71,38 @@ export const constantRoutes = [
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/project',
|
||||||
|
component: Layout,
|
||||||
|
redirect: '/project/project',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '/project/project',
|
||||||
|
component: (resolve) => require(['@/views/iot/project/index'], resolve),
|
||||||
|
hidden: true,
|
||||||
|
name: 'Project',
|
||||||
|
meta: {
|
||||||
|
title: '项目管理', icon: 'component', noCache: false, affix: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/project_tenant',
|
||||||
|
component: Layout,
|
||||||
|
redirect: '/project_tenant/project_tenant',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '/project_tenant/project_tenant',
|
||||||
|
component: (resolve) => require(['@/views/tenant/project/index'], resolve),
|
||||||
|
hidden: true,
|
||||||
|
name: 'Project_tenant',
|
||||||
|
meta: {
|
||||||
|
title: '我的项目', icon: 'dashboard', noCache: false, affix: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/device',
|
path: '/device',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
|
@ -87,6 +119,22 @@ export const constantRoutes = [
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/device_tenant',
|
||||||
|
component: Layout,
|
||||||
|
redirect: '/device_tenant/device_tenant',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '/device_tenant/device_tenant',
|
||||||
|
component: (resolve) => require(['@/views/tenant/device/index'], resolve),
|
||||||
|
hidden: true,
|
||||||
|
name: 'Device_tenant',
|
||||||
|
meta: {
|
||||||
|
title: '我的设备', icon: 'dashboard', noCache: false, affix: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/device_oneself',
|
path: '/device_oneself',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
|
|
|
@ -104,6 +104,7 @@ service.interceptors.response.use(res => {
|
||||||
type: 'error',
|
type: 'error',
|
||||||
duration: 5 * 1000
|
duration: 5 * 1000
|
||||||
})
|
})
|
||||||
|
// this.$router.push('/404')
|
||||||
return Promise.reject(error)
|
return Promise.reject(error)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -94,7 +94,7 @@ export default {
|
||||||
.count-info {
|
.count-info {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 240px;
|
height: 240px;
|
||||||
background-image: url("../../../../assets/images/big/boxleft-center.png");
|
// background-image: url("../../../../assets/images/big/boxleft-center.png");
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
<div class="bottom-block-1">
|
<div class="bottom-block-1">
|
||||||
<alarm-table-list-wrap
|
<alarm-table-list-wrap
|
||||||
:result="alarmInfoResult"
|
:result="alarmInfoResult"
|
||||||
style="margin-top: -5px;"
|
style="margin-top: -5px"
|
||||||
:projectId="projectId"
|
:projectId="projectId"
|
||||||
></alarm-table-list-wrap>
|
></alarm-table-list-wrap>
|
||||||
</div>
|
</div>
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
<wraring-info-wrap :result="alarmInfoResult"></wraring-info-wrap>
|
<wraring-info-wrap :result="alarmInfoResult"></wraring-info-wrap>
|
||||||
<trend-wrap :result="resultInfo.alarmChartDataVo || []"></trend-wrap>
|
<trend-wrap :result="resultInfo.alarmChartDataVo || []"></trend-wrap>
|
||||||
<type-distribution-wrap
|
<type-distribution-wrap
|
||||||
style="margin-top: -5px;"
|
style="margin-top: -5px"
|
||||||
:result="resultInfo.alarmCategoriesList || []"
|
:result="resultInfo.alarmCategoriesList || []"
|
||||||
></type-distribution-wrap>
|
></type-distribution-wrap>
|
||||||
</div>
|
</div>
|
||||||
|
@ -111,7 +111,7 @@ export default {
|
||||||
userLoginType: "",
|
userLoginType: "",
|
||||||
stompClient: null,
|
stompClient: null,
|
||||||
socket_flag: true,
|
socket_flag: true,
|
||||||
setIntervalGetCountOpt: null
|
setIntervalGetCountOpt: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -194,10 +194,16 @@ export default {
|
||||||
},
|
},
|
||||||
resize_window() {
|
resize_window() {
|
||||||
if (this.fullscreen) {
|
if (this.fullscreen) {
|
||||||
this.scalseNum = Math.min( Number(document.documentElement.clientHeight / 1080), Number(document.documentElement.clientWidth / 1920 )
|
this.scalseNum = Math.min(
|
||||||
|
Number(document.documentElement.clientHeight / 1080),
|
||||||
|
Number(document.documentElement.clientWidth / 1920)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
this.scalseNum = Math.min( Number(document.documentElement.clientHeight / 1080), Number(document.documentElement.clientWidth / 1920 ))
|
this.scalseNum = Math.min(
|
||||||
|
Number(document.documentElement.clientHeight / 1080),
|
||||||
|
Number(document.documentElement.clientWidth / 1920) - Number(200 / 1920)
|
||||||
|
);
|
||||||
|
console.log('get', document.getElementById('big-v3-wrap-id').clientWidth, document.documentElement.clientWidth)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 查询项目列表
|
// 查询项目列表
|
||||||
|
@ -216,7 +222,10 @@ export default {
|
||||||
clearInterval(this.setIntervalGetCountOpt);
|
clearInterval(this.setIntervalGetCountOpt);
|
||||||
}
|
}
|
||||||
this.setIntervalGetCount();
|
this.setIntervalGetCount();
|
||||||
this.setIntervalGetCountOpt = setInterval(this.setIntervalGetCount, 1000 * 60 * 30)
|
this.setIntervalGetCountOpt = setInterval(
|
||||||
|
this.setIntervalGetCount,
|
||||||
|
1000 * 60 * 30
|
||||||
|
);
|
||||||
},
|
},
|
||||||
// 定时执行 请求
|
// 定时执行 请求
|
||||||
setIntervalGetCount() {
|
setIntervalGetCount() {
|
||||||
|
|
|
@ -171,7 +171,7 @@
|
||||||
|
|
||||||
<!-- 添加或修改硬件数据库对话框 -->
|
<!-- 添加或修改硬件数据库对话框 -->
|
||||||
<div>
|
<div>
|
||||||
<dialog-template :title="title" :visible="open">
|
<dialog-template :title="title" :visible="open" @close="open = false" >
|
||||||
<el-form
|
<el-form
|
||||||
ref="form"
|
ref="form"
|
||||||
:model="form"
|
:model="form"
|
||||||
|
@ -482,6 +482,7 @@ export default {
|
||||||
this.form.prodKey = data.value.prodId;
|
this.form.prodKey = data.value.prodId;
|
||||||
this.form.prodSecret = data.value.prodSecret;
|
this.form.prodSecret = data.value.prodSecret;
|
||||||
}
|
}
|
||||||
|
this.$refs.form.validateField('vendorId');
|
||||||
this.selectTableShow = false;
|
this.selectTableShow = false;
|
||||||
} else if (data.type === "click") {
|
} else if (data.type === "click") {
|
||||||
if (data.otherOption.tableType === "vendor") {
|
if (data.otherOption.tableType === "vendor") {
|
||||||
|
@ -503,6 +504,7 @@ export default {
|
||||||
this.form.prodKey = this.selectResult.prodKey;
|
this.form.prodKey = this.selectResult.prodKey;
|
||||||
this.form.prodSecret = this.selectResult.prodSecret;
|
this.form.prodSecret = this.selectResult.prodSecret;
|
||||||
}
|
}
|
||||||
|
this.$refs.form.validateField('vendorId');
|
||||||
this.selectTableShow = false;
|
this.selectTableShow = false;
|
||||||
},
|
},
|
||||||
/** 查询设备批次号列表 */
|
/** 查询设备批次号列表 */
|
||||||
|
|
|
@ -377,11 +377,19 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getDeviceTypeList();
|
console.log(this.$route)
|
||||||
this.initGetModelList();
|
this.init()
|
||||||
this.getList();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
init() {
|
||||||
|
if (this.$route.query['deviceId']) {
|
||||||
|
this.handleDetails(this.$route.query)
|
||||||
|
}
|
||||||
|
this.getDeviceTypeList();
|
||||||
|
this.initGetModelList();
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
sortChange(column) {
|
sortChange(column) {
|
||||||
const sort = {
|
const sort = {
|
||||||
isAsc: column.order === "descending" ? "desc" : "asc",
|
isAsc: column.order === "descending" ? "desc" : "asc",
|
||||||
|
@ -401,6 +409,9 @@ export default {
|
||||||
},
|
},
|
||||||
// 跳转详情页
|
// 跳转详情页
|
||||||
toTableClick() {
|
toTableClick() {
|
||||||
|
if (this.$route.query['deviceId']) {
|
||||||
|
this.$router.push('/device/device')
|
||||||
|
}
|
||||||
this.componectVal = "";
|
this.componectVal = "";
|
||||||
},
|
},
|
||||||
// 打开厂商选择窗口 ——表格
|
// 打开厂商选择窗口 ——表格
|
||||||
|
|
|
@ -183,7 +183,7 @@
|
||||||
|
|
||||||
<!-- 添加或修改硬件数据库对话框 -->
|
<!-- 添加或修改硬件数据库对话框 -->
|
||||||
<div>
|
<div>
|
||||||
<dialog-template :title="title" :visible="open">
|
<dialog-template :title="title" :visible="open" @close="open = false" >
|
||||||
<el-form
|
<el-form
|
||||||
ref="form"
|
ref="form"
|
||||||
:model="form"
|
:model="form"
|
||||||
|
|
|
@ -454,10 +454,10 @@ export default {
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
vendorId: [
|
vendorId: [
|
||||||
{ required: true, message: "厂商不能为空", trigger: "blur" },
|
{ required: true, message: "厂商不能为空", trigger: "change" },
|
||||||
],
|
],
|
||||||
prodKey: [
|
prodKey: [
|
||||||
{ required: true, message: "产品PK不能为空", trigger: "blur" },
|
{ required: true, message: "产品PK不能为空", trigger: "change" },
|
||||||
],
|
],
|
||||||
modelName: [
|
modelName: [
|
||||||
{ required: true, message: "型号名称不能为空", trigger: "blur" },
|
{ required: true, message: "型号名称不能为空", trigger: "blur" },
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
|
@ -100,7 +99,7 @@
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span
|
<span
|
||||||
style="
|
style="
|
||||||
width: calc(100% - 60px);
|
max-width: calc(100% - 60px);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -108,9 +107,10 @@
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
"
|
"
|
||||||
>{{ scope.row.otaUrl }}</span
|
>{{ scope.row.otaUrl || '--'}}</span
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
|
v-if="scope.row.otaUrl"
|
||||||
style="
|
style="
|
||||||
cursor: default;
|
cursor: default;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -126,7 +126,7 @@
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span
|
<span
|
||||||
style="
|
style="
|
||||||
width: calc(100% - 60px);
|
max-width: calc(100% - 60px);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -134,9 +134,10 @@
|
||||||
height: 20px;
|
height: 20px;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
"
|
"
|
||||||
>{{ scope.row.txtUrl }}</span
|
>{{ scope.row.txtUrl || '--'}}</span
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
|
v-if="scope.row.txtUrl"
|
||||||
style="
|
style="
|
||||||
cursor: default;
|
cursor: default;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -152,7 +153,13 @@
|
||||||
label="升级信息"
|
label="升级信息"
|
||||||
align="left"
|
align="left"
|
||||||
prop="otaInfo"
|
prop="otaInfo"
|
||||||
></el-table-column>
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span class="lay-table-textarea" :title="scope.row.otaInfo">
|
||||||
|
{{ scope.row.otaInfo }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label=" 创建时间"
|
label=" 创建时间"
|
||||||
align="center"
|
align="center"
|
||||||
|
@ -197,7 +204,7 @@
|
||||||
|
|
||||||
<!-- 添加或修改固件版本对话框 -->
|
<!-- 添加或修改固件版本对话框 -->
|
||||||
<div>
|
<div>
|
||||||
<dialog-template :title="title" :visible="open" width="500px">
|
<dialog-template @close="open = false" :title="title" :visible="open" width="500px">
|
||||||
<el-form
|
<el-form
|
||||||
ref="form"
|
ref="form"
|
||||||
:model="form"
|
:model="form"
|
||||||
|
@ -259,6 +266,7 @@
|
||||||
v-model="form.otaInfo"
|
v-model="form.otaInfo"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
:rows="4"
|
:rows="4"
|
||||||
|
maxlength="99"
|
||||||
placeholder="请输入固件升级信息"
|
placeholder="请输入固件升级信息"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -373,7 +381,7 @@ export default {
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
validator: this.chenking_modelName,
|
validator: this.chenking_modelName,
|
||||||
trigger: "blur",
|
trigger: "change",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
otaVersion: [
|
otaVersion: [
|
||||||
|
@ -597,6 +605,7 @@ export default {
|
||||||
if (data.type === "dblclick") {
|
if (data.type === "dblclick") {
|
||||||
this.form.modelId = data.value.modelId;
|
this.form.modelId = data.value.modelId;
|
||||||
this.form.modelName = data.value.modelName;
|
this.form.modelName = data.value.modelName;
|
||||||
|
this.$refs.form.validateField("modelId");
|
||||||
this.selectTableShow = false;
|
this.selectTableShow = false;
|
||||||
} else if (data.type === "click") {
|
} else if (data.type === "click") {
|
||||||
this.selectResult = {};
|
this.selectResult = {};
|
||||||
|
@ -608,6 +617,7 @@ export default {
|
||||||
resuleClick() {
|
resuleClick() {
|
||||||
this.form.modelId = this.selectResult.modelId;
|
this.form.modelId = this.selectResult.modelId;
|
||||||
this.form.modelName = this.selectResult.modelName;
|
this.form.modelName = this.selectResult.modelName;
|
||||||
|
this.$refs.form.validateField("modelId");
|
||||||
this.selectTableShow = false;
|
this.selectTableShow = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,13 @@
|
||||||
prop="industry"
|
prop="industry"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="行政区划" align="left" width="250" prop="regionalismFullName" />
|
<el-table-column label="行政区划" align="left" width="250" prop="regionalismFullName" />
|
||||||
<el-table-column label="项目地址" align="left" prop="projectAddress" />
|
<el-table-column label="项目地址" align="left" prop="projectAddress" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span class="lay-table-textarea" :title="scope.row.projectAddress">
|
||||||
|
{{ scope.row.projectAddress }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
|
@ -374,6 +380,9 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
if (this.$route.query['projectId']) {
|
||||||
|
this.handleDetails(this.$route.query)
|
||||||
|
}
|
||||||
this.getDicts("project_industry").then(response => {
|
this.getDicts("project_industry").then(response => {
|
||||||
this.projectTypeOptions = response.data;
|
this.projectTypeOptions = response.data;
|
||||||
});
|
});
|
||||||
|
@ -509,6 +518,9 @@ export default {
|
||||||
},
|
},
|
||||||
// 跳转详情页
|
// 跳转详情页
|
||||||
toTableClick() {
|
toTableClick() {
|
||||||
|
if (this.$route.query['projectId']) {
|
||||||
|
this.$router.push('/project/project')
|
||||||
|
}
|
||||||
this.componectVal = "";
|
this.componectVal = "";
|
||||||
},
|
},
|
||||||
// 菜单状态字典翻译
|
// 菜单状态字典翻译
|
||||||
|
|
|
@ -92,8 +92,21 @@
|
||||||
width="250"
|
width="250"
|
||||||
prop="vendorContact"
|
prop="vendorContact"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="厂商地址" align="left" prop="vendorAddress" />
|
<el-table-column label="厂商地址" align="left" prop="vendorAddress">
|
||||||
<el-table-column label="备注" align="left" prop="remark" />
|
<template slot-scope="scope">
|
||||||
|
<span class="lay-table-textarea" :title="scope.row.vendorAddress">
|
||||||
|
{{ scope.row.vendorAddress }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" align="left" prop="remark">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span class="lay-table-textarea" :title="scope.row.remark">
|
||||||
|
{{ scope.row.remark }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
align="center"
|
align="center"
|
||||||
|
@ -136,7 +149,7 @@
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
<div>
|
<div>
|
||||||
<dialog-template :title="title" :visible="open">
|
<dialog-template :title="title" :visible="open" @close="open = false">
|
||||||
<el-form
|
<el-form
|
||||||
ref="form"
|
ref="form"
|
||||||
slot="dialog-center"
|
slot="dialog-center"
|
||||||
|
@ -154,10 +167,15 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="厂商编码:" prop="vendorCode">
|
<el-form-item label="厂商编码:" prop="vendorCode">
|
||||||
<el-input v-model="form.vendorCode" :disabled="form.vendorId !== null && form.vendorId !== undefault" placeholder="请输入厂商编码" />
|
<el-input
|
||||||
|
v-model="form.vendorCode"
|
||||||
|
:disabled="form.vendorId !== null && form.vendorId !== undefault"
|
||||||
|
placeholder="请输入厂商编码"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="厂商地址:" prop="vendorAddress">
|
<el-form-item label="厂商地址:" prop="vendorAddress">
|
||||||
<el-input
|
<el-input
|
||||||
|
maxlength="120"
|
||||||
v-model="form.vendorAddress"
|
v-model="form.vendorAddress"
|
||||||
placeholder="请输入厂商地址"
|
placeholder="请输入厂商地址"
|
||||||
/>
|
/>
|
||||||
|
@ -167,7 +185,8 @@
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.remark"
|
v-model="form.remark"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
:rows="2"
|
:rows="4"
|
||||||
|
maxlength="200"
|
||||||
placeholder="请输入备注"
|
placeholder="请输入备注"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
v-hasPermi="['system:tenant:remove']"
|
v-hasPermi="['system:tenant:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['system:tenant:export']"
|
v-hasPermi="['system:tenant:export']"
|
||||||
>导出</el-button>
|
>导出</el-button>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
|
@ -326,8 +326,6 @@ export default {
|
||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
// 用户类型
|
|
||||||
tenantTypeOptions: [],
|
|
||||||
// 类型
|
// 类型
|
||||||
tenantTypeOptions: [],
|
tenantTypeOptions: [],
|
||||||
// 租户状态
|
// 租户状态
|
||||||
|
|
|
@ -185,7 +185,7 @@
|
||||||
<el-input v-model="form.roleName" placeholder="请输入角色名称" />
|
<el-input v-model="form.roleName" placeholder="请输入角色名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="权限字符" prop="roleKey">
|
<el-form-item label="权限字符" prop="roleKey">
|
||||||
<el-input v-model="form.roleKey" :disabled="form.roleId !== undefined || form.roleId !== null" placeholder="请输入权限字符" />
|
<el-input v-model="form.roleKey" :disabled="form.roleId !== undefined && form.roleId !== null" placeholder="请输入权限字符" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="角色顺序" prop="roleSort">
|
<el-form-item label="角色顺序" prop="roleSort">
|
||||||
<el-input-number v-model="form.roleSort" controls-position="right" :min="0" />
|
<el-input-number v-model="form.roleSort" controls-position="right" :min="0" />
|
||||||
|
|
|
@ -358,6 +358,7 @@ export default {
|
||||||
/** 查询注册用户列表 */
|
/** 查询注册用户列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
this.queryParams.status = this.queryParams.status === '' ? undefined : this.queryParams.status
|
||||||
listRegistered(this.queryParams).then(response => {
|
listRegistered(this.queryParams).then(response => {
|
||||||
this.registeredList = response.rows;
|
this.registeredList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
:props="defaultProps"
|
:props="defaultProps"
|
||||||
:expand-on-click-node="false"
|
:expand-on-click-node="false"
|
||||||
:filter-node-method="filterNode"
|
:filter-node-method="filterNode"
|
||||||
|
v-model="queryParams.deptId"
|
||||||
ref="tree"
|
ref="tree"
|
||||||
default-expand-all
|
default-expand-all
|
||||||
@node-click="handleNodeClick"
|
@node-click="handleNodeClick"
|
||||||
|
@ -83,8 +84,16 @@
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="handleQuery"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
|
@ -97,7 +106,8 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['system:user:add']"
|
v-hasPermi="['system:user:add']"
|
||||||
>新增</el-button>
|
>新增</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -130,7 +140,8 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleImport"
|
@click="handleImport"
|
||||||
v-hasPermi="['system:user:import']"
|
v-hasPermi="['system:user:import']"
|
||||||
>导入</el-button>
|
>导入</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -140,19 +151,30 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['system:user:export']"
|
v-hasPermi="['system:user:export']"
|
||||||
>导出</el-button>
|
>导出</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
<right-toolbar
|
||||||
|
:showSearch.sync="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
:columns="columns"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="userList"
|
:data="userList"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
:default-sort="{prop: 'createTime', order: 'descending'}"
|
:default-sort="{ prop: 'createTime', order: 'descending' }"
|
||||||
@sort-change="sortChange"
|
@sort-change="sortChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" label="序号" align="center" :index="indexFormatter" width="80px"></el-table-column>
|
<el-table-column
|
||||||
|
type="index"
|
||||||
|
label="序号"
|
||||||
|
align="center"
|
||||||
|
:index="indexFormatter"
|
||||||
|
width="80px"
|
||||||
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="用户名称"
|
label="用户名称"
|
||||||
align="center"
|
align="center"
|
||||||
|
@ -185,7 +207,12 @@
|
||||||
v-if="columns[4].visible"
|
v-if="columns[4].visible"
|
||||||
width="120"
|
width="120"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="状态" align="center" key="status" v-if="columns[5].visible">
|
<el-table-column
|
||||||
|
label="状态"
|
||||||
|
align="center"
|
||||||
|
key="status"
|
||||||
|
v-if="columns[5].visible"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="scope.row.status"
|
v-model="scope.row.status"
|
||||||
|
@ -220,7 +247,8 @@
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['system:user:edit']"
|
v-hasPermi="['system:user:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button
|
||||||
|
>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.userId !== 1"
|
v-if="scope.row.userId !== 1"
|
||||||
size="mini"
|
size="mini"
|
||||||
|
@ -228,14 +256,16 @@
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['system:user:remove']"
|
v-hasPermi="['system:user:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button
|
||||||
|
>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-key"
|
icon="el-icon-key"
|
||||||
@click="handleResetPwd(scope.row)"
|
@click="handleResetPwd(scope.row)"
|
||||||
v-hasPermi="['system:user:resetPwd']"
|
v-hasPermi="['system:user:resetPwd']"
|
||||||
>重置密码</el-button>
|
>重置密码</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -251,7 +281,13 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- 添加或修改参数配置对话框 -->
|
<!-- 添加或修改参数配置对话框 -->
|
||||||
<el-dialog class="eldialog-wrap" :close-on-click-modal="false" :title="title" :visible.sync="open" width="600px" >
|
<el-dialog
|
||||||
|
class="eldialog-wrap"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="open"
|
||||||
|
width="750px"
|
||||||
|
>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
@ -273,31 +309,61 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="手机号码:" prop="phonenumber">
|
<el-form-item label="手机号码:" prop="phonenumber">
|
||||||
<el-input v-model="form.phonenumber" placeholder="请输入手机号码" maxlength="11" />
|
<el-input
|
||||||
|
v-model="form.phonenumber"
|
||||||
|
placeholder="请输入手机号码"
|
||||||
|
maxlength="11"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="邮箱:" prop="email">
|
<el-form-item label="邮箱:" prop="email">
|
||||||
<el-input v-model="form.email" placeholder="请输入邮箱" maxlength="50" />
|
<el-input
|
||||||
|
v-model="form.email"
|
||||||
|
placeholder="请输入邮箱"
|
||||||
|
maxlength="50"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item v-if="form.userId == undefined" label="用户名称:" prop="userName">
|
<el-form-item
|
||||||
<el-input v-model="form.userName" placeholder="请输入用户名称" />
|
v-if="form.userId == undefined"
|
||||||
|
label="用户名称:"
|
||||||
|
prop="userName"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="form.userName"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入用户名称"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item v-if="form.userId == undefined" label="用户密码:" prop="password">
|
<el-form-item
|
||||||
<el-input v-model="form.password" placeholder="请输入用户密码" type="password" />
|
v-if="form.userId == undefined"
|
||||||
|
label="用户密码:"
|
||||||
|
prop="password"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="form.passWord"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入用户密码"
|
||||||
|
type="password"
|
||||||
|
autocomplete="new-password"
|
||||||
|
style="background-color: #ffffff !important"
|
||||||
|
readonly
|
||||||
|
onfocus="this.removeAttribute('readonly');"
|
||||||
|
onblur="this.setAttribute('readonly',true);"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="用户性别:">
|
<el-form-item label="用户性别:">
|
||||||
<el-select v-model="form.sex" placeholder="请选择">
|
<el-select v-model="form.sex" style="width: 100%" placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in sexOptions"
|
v-for="dict in sexOptions"
|
||||||
:key="dict.dictValue"
|
:key="dict.dictValue"
|
||||||
|
@ -314,7 +380,8 @@
|
||||||
v-for="dict in statusOptions"
|
v-for="dict in statusOptions"
|
||||||
:key="dict.dictValue"
|
:key="dict.dictValue"
|
||||||
:label="dict.dictValue"
|
:label="dict.dictValue"
|
||||||
>{{ dict.dictLabel }}</el-radio>
|
>{{ dict.dictLabel }}</el-radio
|
||||||
|
>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -322,7 +389,7 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="岗位:">
|
<el-form-item label="岗位:">
|
||||||
<el-select v-model="form.postIds" multiple placeholder="请选择">
|
<el-select v-model="form.postIds" style="width: 100%" multiple placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in postOptions"
|
v-for="item in postOptions"
|
||||||
:key="item.postId"
|
:key="item.postId"
|
||||||
|
@ -335,7 +402,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="角色:">
|
<el-form-item label="角色:">
|
||||||
<el-select v-model="form.roleIds" multiple placeholder="请选择">
|
<el-select v-model="form.roleIds" style="width: 100%" multiple placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in roleOptions"
|
v-for="item in roleOptions"
|
||||||
:key="item.roleId"
|
:key="item.roleId"
|
||||||
|
@ -350,19 +417,32 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="备注:">
|
<el-form-item label="备注:">
|
||||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
|
<el-input
|
||||||
|
v-model="form.remark"
|
||||||
|
maxlength="150"
|
||||||
|
type="textarea"
|
||||||
|
:autosize="{ minRows: 3, maxRows: 5 }"
|
||||||
|
placeholder="请输入内容"
|
||||||
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button size="mini" type="primary" @click="submitForm">确 定</el-button>
|
<el-button size="mini" type="primary" @click="submitForm"
|
||||||
|
>确 定</el-button
|
||||||
|
>
|
||||||
<el-button size="mini" @click="cancel">取 消</el-button>
|
<el-button size="mini" @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 用户导入对话框 -->
|
<!-- 用户导入对话框 -->
|
||||||
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
<el-dialog
|
||||||
|
:title="upload.title"
|
||||||
|
:visible.sync="upload.open"
|
||||||
|
width="400px"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="upload"
|
ref="upload"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
|
@ -381,10 +461,16 @@
|
||||||
<em>点击上传</em>
|
<em>点击上传</em>
|
||||||
</div>
|
</div>
|
||||||
<div class="el-upload__tip" slot="tip">
|
<div class="el-upload__tip" slot="tip">
|
||||||
<el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
|
<el-checkbox
|
||||||
<el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
|
v-model="upload.updateSupport"
|
||||||
|
/>是否更新已经存在的用户数据
|
||||||
|
<el-link type="info" style="font-size: 12px" @click="importTemplate"
|
||||||
|
>下载模板</el-link
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="el-upload__tip" style="color: red" slot="tip">
|
||||||
|
提示:仅允许导入“xls”或“xlsx”格式文件!
|
||||||
</div>
|
</div>
|
||||||
<div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
|
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||||
|
@ -406,7 +492,7 @@ import {
|
||||||
changeUserStatus,
|
changeUserStatus,
|
||||||
importTemplate,
|
importTemplate,
|
||||||
optionselectList,
|
optionselectList,
|
||||||
roleOptionselectList
|
roleOptionselectList,
|
||||||
} from "@/api/system/user";
|
} from "@/api/system/user";
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
import { treeselect } from "@/api/system/dept";
|
import { treeselect } from "@/api/system/dept";
|
||||||
|
@ -456,7 +542,7 @@ export default {
|
||||||
form: {},
|
form: {},
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
children: "children",
|
children: "children",
|
||||||
label: "label"
|
label: "label",
|
||||||
},
|
},
|
||||||
// 用户导入参数
|
// 用户导入参数
|
||||||
upload: {
|
upload: {
|
||||||
|
@ -471,7 +557,7 @@ export default {
|
||||||
// 设置上传的请求头部
|
// 设置上传的请求头部
|
||||||
headers: { Authorization: "Bearer " + getToken() },
|
headers: { Authorization: "Bearer " + getToken() },
|
||||||
// 上传的地址
|
// 上传的地址
|
||||||
url: process.env.VUE_APP_BASE_API + "/system/user/importData"
|
url: process.env.VUE_APP_BASE_API + "/system/user/importData",
|
||||||
},
|
},
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
|
@ -482,7 +568,7 @@ export default {
|
||||||
status: undefined,
|
status: undefined,
|
||||||
deptId: undefined,
|
deptId: undefined,
|
||||||
orderByColumn: "createTime",
|
orderByColumn: "createTime",
|
||||||
isAsc: "desc"
|
isAsc: "desc",
|
||||||
},
|
},
|
||||||
// 列信息
|
// 列信息
|
||||||
columns: [
|
columns: [
|
||||||
|
@ -492,52 +578,52 @@ export default {
|
||||||
{ key: 3, label: `部门`, visible: true },
|
{ key: 3, label: `部门`, visible: true },
|
||||||
{ key: 4, label: `手机号码`, visible: true },
|
{ key: 4, label: `手机号码`, visible: true },
|
||||||
{ key: 5, label: `状态`, visible: true },
|
{ key: 5, label: `状态`, visible: true },
|
||||||
{ key: 6, label: `创建时间`, visible: true }
|
{ key: 6, label: `创建时间`, visible: true },
|
||||||
],
|
],
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
userName: [
|
userName: [
|
||||||
{ required: true, message: "用户名称不能为空", trigger: "blur" }
|
{ required: true, message: "用户名称不能为空", trigger: "blur" },
|
||||||
],
|
],
|
||||||
nickName: [
|
nickName: [
|
||||||
{ required: true, message: "用户昵称不能为空", trigger: "blur" }
|
{ required: true, message: "用户昵称不能为空", trigger: "blur" },
|
||||||
],
|
],
|
||||||
password: [
|
password: [
|
||||||
{ required: true, message: "用户密码不能为空", trigger: "blur" }
|
{ required: true, message: "用户密码不能为空", trigger: "blur" },
|
||||||
],
|
],
|
||||||
email: [
|
email: [
|
||||||
{
|
{
|
||||||
type: "email",
|
type: "email",
|
||||||
message: "'请输入正确的邮箱地址",
|
message: "'请输入正确的邮箱地址",
|
||||||
trigger: ["blur", "change"]
|
trigger: ["blur", "change"],
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
phonenumber: [
|
phonenumber: [
|
||||||
{
|
{
|
||||||
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
||||||
message: "请输入正确的手机号码",
|
message: "请输入正确的手机号码",
|
||||||
trigger: "blur"
|
trigger: "blur",
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// 根据名称筛选部门树
|
// 根据名称筛选部门树
|
||||||
deptName(val) {
|
deptName(val) {
|
||||||
this.$refs.tree.filter(val);
|
this.$refs.tree.filter(val);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getTreeselect();
|
this.getTreeselect();
|
||||||
this.getDicts("sys_normal_disable").then(response => {
|
this.getDicts("sys_normal_disable").then((response) => {
|
||||||
this.statusOptions = response.data;
|
this.statusOptions = response.data;
|
||||||
});
|
});
|
||||||
this.getDicts("sys_user_sex").then(response => {
|
this.getDicts("sys_user_sex").then((response) => {
|
||||||
this.sexOptions = response.data;
|
this.sexOptions = response.data;
|
||||||
});
|
});
|
||||||
this.getConfigKey("sys.user.initPassword").then(response => {
|
this.getConfigKey("sys.user.initPassword").then((response) => {
|
||||||
this.initPassword = response.msg;
|
this.initPassword = response.msg;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -550,7 +636,7 @@ export default {
|
||||||
sortChange(column) {
|
sortChange(column) {
|
||||||
const sort = {
|
const sort = {
|
||||||
isAsc: column.order === "descending" ? "desc" : "asc",
|
isAsc: column.order === "descending" ? "desc" : "asc",
|
||||||
orderByColumn: column.prop
|
orderByColumn: column.prop,
|
||||||
};
|
};
|
||||||
this.queryParams = Object.assign(this.queryParams, sort);
|
this.queryParams = Object.assign(this.queryParams, sort);
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
|
@ -559,7 +645,7 @@ export default {
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listUser(this.addDateRange(this.queryParams, this.dateRange)).then(
|
listUser(this.addDateRange(this.queryParams, this.dateRange)).then(
|
||||||
response => {
|
(response) => {
|
||||||
this.userList = response.rows;
|
this.userList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
@ -568,7 +654,7 @@ export default {
|
||||||
},
|
},
|
||||||
/** 查询部门下拉树结构 */
|
/** 查询部门下拉树结构 */
|
||||||
getTreeselect() {
|
getTreeselect() {
|
||||||
treeselect().then(response => {
|
treeselect().then((response) => {
|
||||||
this.deptOptions = response.data;
|
this.deptOptions = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -591,16 +677,16 @@ export default {
|
||||||
{
|
{
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then(function() {
|
.then(function () {
|
||||||
return changeUserStatus(row.userId, row.status);
|
return changeUserStatus(row.userId, row.status);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.msgSuccess(text + "成功");
|
this.msgSuccess(text + "成功");
|
||||||
})
|
})
|
||||||
.catch(function() {
|
.catch(function () {
|
||||||
row.status = row.status === "0" ? "1" : "0";
|
row.status = row.status === "0" ? "1" : "0";
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -616,14 +702,14 @@ export default {
|
||||||
deptId: undefined,
|
deptId: undefined,
|
||||||
userName: undefined,
|
userName: undefined,
|
||||||
nickName: undefined,
|
nickName: undefined,
|
||||||
password: undefined,
|
password: '',
|
||||||
phonenumber: undefined,
|
phonenumber: undefined,
|
||||||
email: undefined,
|
email: undefined,
|
||||||
sex: undefined,
|
sex: undefined,
|
||||||
status: "0",
|
status: "0",
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
postIds: [],
|
postIds: [],
|
||||||
roleIds: []
|
roleIds: [],
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
@ -635,12 +721,13 @@ export default {
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.dateRange = [];
|
this.dateRange = [];
|
||||||
|
this.queryParams.deptId = undefined;
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.userId);
|
this.ids = selection.map((item) => item.userId);
|
||||||
this.single = selection.length != 1;
|
this.single = selection.length != 1;
|
||||||
this.multiple = !selection.length;
|
this.multiple = !selection.length;
|
||||||
},
|
},
|
||||||
|
@ -651,20 +738,21 @@ export default {
|
||||||
const tenantId = this.$store.getters.tenantId;
|
const tenantId = this.$store.getters.tenantId;
|
||||||
this.getPostList(tenantId);
|
this.getPostList(tenantId);
|
||||||
this.getRoleList(tenantId);
|
this.getRoleList(tenantId);
|
||||||
|
this.form.deptId = this.queryParams.deptId;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加用户";
|
this.title = "添加用户";
|
||||||
this.form.password = this.initPassword;
|
this.form.password = this.initPassword;
|
||||||
},
|
},
|
||||||
// 获取岗位列表
|
// 获取岗位列表
|
||||||
getPostList(tenantId) {
|
getPostList(tenantId) {
|
||||||
optionselectList(tenantId).then(res => {
|
optionselectList(tenantId).then((res) => {
|
||||||
this.postOptions = res.data;
|
this.postOptions = res.data;
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 获取岗位列表
|
// 获取岗位列表
|
||||||
getRoleList(tenantId) {
|
getRoleList(tenantId) {
|
||||||
roleOptionselectList(tenantId).then(res => {
|
roleOptionselectList(tenantId).then((res) => {
|
||||||
this.roleOptions = res.data;
|
this.roleOptions = res.data;
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
});
|
});
|
||||||
|
@ -674,7 +762,7 @@ export default {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.getTreeselect();
|
this.getTreeselect();
|
||||||
const userId = row.userId || this.ids;
|
const userId = row.userId || this.ids;
|
||||||
getUser(userId).then(response => {
|
getUser(userId).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.postOptions = response.posts;
|
this.postOptions = response.posts;
|
||||||
this.roleOptions = response.roles;
|
this.roleOptions = response.roles;
|
||||||
|
@ -682,36 +770,37 @@ export default {
|
||||||
this.form.roleIds = response.roleIds;
|
this.form.roleIds = response.roleIds;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改用户";
|
this.title = "修改用户";
|
||||||
this.form.password = "";
|
this.form.passWord = "";
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 重置密码按钮操作 */
|
/** 重置密码按钮操作 */
|
||||||
handleResetPwd(row) {
|
handleResetPwd(row) {
|
||||||
this.$prompt('请输入"' + row.userName + '"的新密码', "提示", {
|
this.$prompt('请输入"' + row.userName + '"的新密码', "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消"
|
cancelButtonText: "取消",
|
||||||
})
|
})
|
||||||
.then(({ value }) => {
|
.then(({ value }) => {
|
||||||
resetUserPwd(row.userId, value).then(response => {
|
resetUserPwd(row.userId, value).then((response) => {
|
||||||
this.msgSuccess("修改成功,新密码是:" + value);
|
this.msgSuccess("修改成功,新密码是:" + value);
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm: function() {
|
submitForm: function () {
|
||||||
this.$refs["form"].validate(valid => {
|
this.form.password = this.form.passWord
|
||||||
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
// this.form.userType = "SYSTEM"
|
// this.form.userType = "SYSTEM"
|
||||||
this.form.userType = this.$store.getters.userType
|
this.form.userType = this.$store.getters.userType;
|
||||||
if (this.form.userId != undefined) {
|
if (this.form.userId != undefined) {
|
||||||
updateUser(this.form).then(response => {
|
updateUser(this.form).then((response) => {
|
||||||
this.msgSuccess("修改成功");
|
this.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addUser(this.form).then(response => {
|
addUser(this.form).then((response) => {
|
||||||
this.msgSuccess("新增成功");
|
this.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
@ -726,9 +815,9 @@ export default {
|
||||||
this.$confirm("是否删除该选项?", "警告", {
|
this.$confirm("是否删除该选项?", "警告", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning",
|
||||||
})
|
})
|
||||||
.then(function() {
|
.then(function () {
|
||||||
return delUser(userIds, null);
|
return delUser(userIds, null);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
@ -742,12 +831,12 @@ export default {
|
||||||
this.$confirm("是否确认导出所有用户数据项?", "警告", {
|
this.$confirm("是否确认导出所有用户数据项?", "警告", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning",
|
||||||
})
|
})
|
||||||
.then(function() {
|
.then(function () {
|
||||||
return exportUser(queryParams);
|
return exportUser(queryParams);
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then((response) => {
|
||||||
this.download(response.msg);
|
this.download(response.msg);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -758,7 +847,7 @@ export default {
|
||||||
},
|
},
|
||||||
/** 下载模板操作 */
|
/** 下载模板操作 */
|
||||||
importTemplate() {
|
importTemplate() {
|
||||||
importTemplate().then(response => {
|
importTemplate().then((response) => {
|
||||||
this.download(response.msg);
|
this.download(response.msg);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -777,7 +866,7 @@ export default {
|
||||||
// 提交上传文件
|
// 提交上传文件
|
||||||
submitFileForm() {
|
submitFileForm() {
|
||||||
this.$refs.upload.submit();
|
this.$refs.upload.submit();
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -181,6 +181,9 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
if (this.$route.query['deviceId']) {
|
||||||
|
this.handleDetails(this.$route.query)
|
||||||
|
}
|
||||||
this.getDeviceTypeList();
|
this.getDeviceTypeList();
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
|
@ -204,6 +207,9 @@ export default {
|
||||||
},
|
},
|
||||||
// 跳转详情页
|
// 跳转详情页
|
||||||
toTableClick() {
|
toTableClick() {
|
||||||
|
if (this.$route.query['deviceId']) {
|
||||||
|
this.$router.push('/device_tenant/device_tenant')
|
||||||
|
}
|
||||||
this.componectVal = "";
|
this.componectVal = "";
|
||||||
},
|
},
|
||||||
deviceTypeChange(val) {
|
deviceTypeChange(val) {
|
||||||
|
|
|
@ -153,6 +153,9 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
if (this.$route.query['projectId']) {
|
||||||
|
this.handleDetails(this.$route.query)
|
||||||
|
}
|
||||||
this.getDicts("project_industry").then(response => {
|
this.getDicts("project_industry").then(response => {
|
||||||
this.projectTypeOptions = response.data;
|
this.projectTypeOptions = response.data;
|
||||||
});
|
});
|
||||||
|
@ -178,6 +181,9 @@ export default {
|
||||||
},
|
},
|
||||||
// 跳转详情页
|
// 跳转详情页
|
||||||
toTableClick() {
|
toTableClick() {
|
||||||
|
if (this.$route.query['projectId']) {
|
||||||
|
this.$router.push('/project_tenant/project_tenant')
|
||||||
|
}
|
||||||
this.componectVal = "";
|
this.componectVal = "";
|
||||||
},
|
},
|
||||||
// 菜单状态字典翻译
|
// 菜单状态字典翻译
|
||||||
|
|
Loading…
Reference in New Issue