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