|
|
@ -189,15 +189,13 @@ |
|
|
<script> |
|
|
<script> |
|
|
import AddOrUpdate from './user-add-or-update' |
|
|
import AddOrUpdate from './user-add-or-update' |
|
|
|
|
|
|
|
|
import {debounce, throttle} from "../../../utils/common"; |
|
|
|
|
|
|
|
|
import {debounce, throttle} from '../../../utils/common' |
|
|
import { |
|
|
import { |
|
|
getUnSelectedSiteData, |
|
|
getUnSelectedSiteData, |
|
|
getAccessSiteData, |
|
|
getAccessSiteData, |
|
|
addAccessSite, |
|
|
addAccessSite, |
|
|
deleteAccessSite, |
|
|
|
|
|
} from "@/api/base/site.js" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
deleteAccessSite |
|
|
|
|
|
} from '@/api/base/site.js' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
data () { |
|
|
data () { |
|
|
@ -212,64 +210,64 @@ |
|
|
// 设置 |
|
|
// 设置 |
|
|
setUp: { |
|
|
setUp: { |
|
|
reviewFlag: false, |
|
|
reviewFlag: false, |
|
|
saveButton: false, |
|
|
|
|
|
|
|
|
saveButton: false |
|
|
}, |
|
|
}, |
|
|
dataForm: { |
|
|
dataForm: { |
|
|
userName: '', |
|
|
userName: '', |
|
|
userDisplay: '', |
|
|
|
|
|
|
|
|
userDisplay: '' |
|
|
}, |
|
|
}, |
|
|
columnList: [ |
|
|
columnList: [ |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
serialNumber: 'security' + this.$route.meta.menuId + 'securitydesc', |
|
|
serialNumber: 'security' + this.$route.meta.menuId + 'securitydesc', |
|
|
tableId: this.$route.meta.menuId + 'security', |
|
|
tableId: this.$route.meta.menuId + 'security', |
|
|
tableName: "securityTable", |
|
|
|
|
|
columnProp: "securitydesc", |
|
|
|
|
|
headerAlign: "center", |
|
|
|
|
|
align: "left", |
|
|
|
|
|
columnLabel: "参数描述", |
|
|
|
|
|
|
|
|
tableName: 'securityTable', |
|
|
|
|
|
columnProp: 'securitydesc', |
|
|
|
|
|
headerAlign: 'center', |
|
|
|
|
|
align: 'left', |
|
|
|
|
|
columnLabel: '参数描述', |
|
|
columnHidden: false, |
|
|
columnHidden: false, |
|
|
columnImage: false, |
|
|
columnImage: false, |
|
|
columnWidth: 70, |
|
|
columnWidth: 70, |
|
|
columnSortable: false, |
|
|
columnSortable: false, |
|
|
sortLv: 0, |
|
|
sortLv: 0, |
|
|
status: true, |
|
|
status: true, |
|
|
fixed: '', |
|
|
|
|
|
|
|
|
fixed: '' |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
serialNumber: 'security' + this.$route.meta.menuId + 'securitydesc', |
|
|
serialNumber: 'security' + this.$route.meta.menuId + 'securitydesc', |
|
|
tableId: this.$route.meta.menuId + 'security', |
|
|
tableId: this.$route.meta.menuId + 'security', |
|
|
tableName: "securityTable", |
|
|
|
|
|
columnProp: "module", |
|
|
|
|
|
headerAlign: "center", |
|
|
|
|
|
align: "left", |
|
|
|
|
|
columnLabel: "模块", |
|
|
|
|
|
|
|
|
tableName: 'securityTable', |
|
|
|
|
|
columnProp: 'module', |
|
|
|
|
|
headerAlign: 'center', |
|
|
|
|
|
align: 'left', |
|
|
|
|
|
columnLabel: '模块', |
|
|
columnHidden: false, |
|
|
columnHidden: false, |
|
|
columnImage: false, |
|
|
columnImage: false, |
|
|
columnSortable: false, |
|
|
columnSortable: false, |
|
|
columnWidth: 20, |
|
|
columnWidth: 20, |
|
|
sortLv: 0, |
|
|
sortLv: 0, |
|
|
status: true, |
|
|
status: true, |
|
|
fixed: '', |
|
|
|
|
|
|
|
|
fixed: '' |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
serialNumber: 'security' + this.$route.meta.menuId + 'securitydesc', |
|
|
serialNumber: 'security' + this.$route.meta.menuId + 'securitydesc', |
|
|
tableId: this.$route.meta.menuId + 'security', |
|
|
tableId: this.$route.meta.menuId + 'security', |
|
|
tableName: "securityTable", |
|
|
|
|
|
columnProp: "itemvalue", |
|
|
|
|
|
headerAlign: "center", |
|
|
|
|
|
align: "center", |
|
|
|
|
|
columnLabel: "参数值", |
|
|
|
|
|
|
|
|
tableName: 'securityTable', |
|
|
|
|
|
columnProp: 'itemvalue', |
|
|
|
|
|
headerAlign: 'center', |
|
|
|
|
|
align: 'center', |
|
|
|
|
|
columnLabel: '参数值', |
|
|
columnHidden: true, |
|
|
columnHidden: true, |
|
|
columnImage: false, |
|
|
columnImage: false, |
|
|
columnSortable: false, |
|
|
columnSortable: false, |
|
|
columnWidth: 10, |
|
|
columnWidth: 10, |
|
|
sortLv: 0, |
|
|
sortLv: 0, |
|
|
status: true, |
|
|
status: true, |
|
|
fixed: '', |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
fixed: '' |
|
|
|
|
|
} |
|
|
], |
|
|
], |
|
|
dataList: [], |
|
|
dataList: [], |
|
|
workCenterVisible: false, |
|
|
workCenterVisible: false, |
|
|
@ -289,8 +287,8 @@ |
|
|
SiteRow2: null, |
|
|
SiteRow2: null, |
|
|
userData: { |
|
|
userData: { |
|
|
username: '', |
|
|
username: '', |
|
|
userDisplay:'', |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
userDisplay: '' |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
components: { |
|
|
components: { |
|
|
@ -301,7 +299,7 @@ |
|
|
}, |
|
|
}, |
|
|
mounted () { |
|
|
mounted () { |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
this.height = window.innerHeight - 220; |
|
|
|
|
|
|
|
|
this.height = window.innerHeight - 220 |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
@ -310,68 +308,67 @@ |
|
|
username: row.username |
|
|
username: row.username |
|
|
} |
|
|
} |
|
|
getUnSelectedSiteData(inData).then(({data}) => { |
|
|
getUnSelectedSiteData(inData).then(({data}) => { |
|
|
this.SiteList1 = data.rows; |
|
|
|
|
|
|
|
|
this.SiteList1 = data.rows |
|
|
}) |
|
|
}) |
|
|
getAccessSiteData(inData).then(({data}) => { |
|
|
getAccessSiteData(inData).then(({data}) => { |
|
|
this.SiteList2 = data.rows; |
|
|
|
|
|
|
|
|
this.SiteList2 = data.rows |
|
|
}) |
|
|
}) |
|
|
this.userData.username=row.username; |
|
|
|
|
|
this.userData.userDisplay=row.userDisplay; |
|
|
|
|
|
this.accessSiteFlag=true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.userData.username = row.username |
|
|
|
|
|
this.userData.userDisplay = row.userDisplay |
|
|
|
|
|
this.accessSiteFlag = true |
|
|
}, |
|
|
}, |
|
|
clickSite1 (row) { |
|
|
clickSite1 (row) { |
|
|
this.SiteRow1 = JSON.parse(JSON.stringify(row)); |
|
|
|
|
|
|
|
|
this.SiteRow1 = JSON.parse(JSON.stringify(row)) |
|
|
}, |
|
|
}, |
|
|
clickSite2 (row) { |
|
|
clickSite2 (row) { |
|
|
this.SiteRow2 = JSON.parse(JSON.stringify(row)); |
|
|
|
|
|
|
|
|
this.SiteRow2 = JSON.parse(JSON.stringify(row)) |
|
|
}, |
|
|
}, |
|
|
addSite () { |
|
|
addSite () { |
|
|
if (this.SiteRow1 == null) { |
|
|
if (this.SiteRow1 == null) { |
|
|
this.$alert("请选择可选工厂!", '错误', { |
|
|
|
|
|
|
|
|
this.$alert('请选择可选工厂!', '错误', { |
|
|
confirmButtonText: '确定' |
|
|
confirmButtonText: '确定' |
|
|
}) |
|
|
}) |
|
|
return false; |
|
|
|
|
|
|
|
|
return false |
|
|
} |
|
|
} |
|
|
let inSiteData = { |
|
|
let inSiteData = { |
|
|
site: this.SiteRow1.siteID, |
|
|
site: this.SiteRow1.siteID, |
|
|
userID:this.userData.username, |
|
|
|
|
|
|
|
|
userID: this.userData.username |
|
|
} |
|
|
} |
|
|
addAccessSite(inSiteData).then(({data}) => { |
|
|
addAccessSite(inSiteData).then(({data}) => { |
|
|
let inData = { |
|
|
let inData = { |
|
|
username: this.userData.username |
|
|
username: this.userData.username |
|
|
} |
|
|
} |
|
|
getUnSelectedSiteData(inData).then(({data}) => { |
|
|
getUnSelectedSiteData(inData).then(({data}) => { |
|
|
this.SiteList1 = data.rows; |
|
|
|
|
|
|
|
|
this.SiteList1 = data.rows |
|
|
}) |
|
|
}) |
|
|
getAccessSiteData(inData).then(({data}) => { |
|
|
getAccessSiteData(inData).then(({data}) => { |
|
|
this.SiteList2 = data.rows; |
|
|
|
|
|
|
|
|
this.SiteList2 = data.rows |
|
|
}) |
|
|
}) |
|
|
this.SiteRow1=null; |
|
|
|
|
|
|
|
|
this.SiteRow1 = null |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
deleteSite () { |
|
|
deleteSite () { |
|
|
if (this.SiteRow2 == null) { |
|
|
if (this.SiteRow2 == null) { |
|
|
this.$alert("请选择已选工厂!", '错误', { |
|
|
|
|
|
|
|
|
this.$alert('请选择已选工厂!', '错误', { |
|
|
confirmButtonText: '确定' |
|
|
confirmButtonText: '确定' |
|
|
}) |
|
|
}) |
|
|
return false; |
|
|
|
|
|
|
|
|
return false |
|
|
} |
|
|
} |
|
|
let inSiteData = { |
|
|
let inSiteData = { |
|
|
site: this.SiteRow2.siteID, |
|
|
site: this.SiteRow2.siteID, |
|
|
userID:this.userData.username, |
|
|
|
|
|
|
|
|
userID: this.userData.username |
|
|
} |
|
|
} |
|
|
deleteAccessSite(inSiteData).then(({data}) => { |
|
|
deleteAccessSite(inSiteData).then(({data}) => { |
|
|
let inData = { |
|
|
let inData = { |
|
|
username: this.userData.username |
|
|
username: this.userData.username |
|
|
} |
|
|
} |
|
|
getUnSelectedSiteData(inData).then(({data}) => { |
|
|
getUnSelectedSiteData(inData).then(({data}) => { |
|
|
this.SiteList1 = data.rows; |
|
|
|
|
|
|
|
|
this.SiteList1 = data.rows |
|
|
}) |
|
|
}) |
|
|
getAccessSiteData(inData).then(({data}) => { |
|
|
getAccessSiteData(inData).then(({data}) => { |
|
|
this.SiteList2 = data.rows; |
|
|
|
|
|
|
|
|
this.SiteList2 = data.rows |
|
|
}) |
|
|
}) |
|
|
this.SiteRow2=null; |
|
|
|
|
|
|
|
|
this.SiteRow2 = null |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 选中行 |
|
|
// 选中行 |
|
|
@ -399,7 +396,7 @@ |
|
|
'page': this.pageIndex, |
|
|
'page': this.pageIndex, |
|
|
'limit': this.pageSize, |
|
|
'limit': this.pageSize, |
|
|
'username': this.dataForm.userName, |
|
|
'username': this.dataForm.userName, |
|
|
'userDisplay': this.dataForm.userDisplay, |
|
|
|
|
|
|
|
|
'userDisplay': this.dataForm.userDisplay |
|
|
}) |
|
|
}) |
|
|
}).then(({data}) => { |
|
|
}).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
|