|
@@ -52,6 +52,9 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="Fullname" align="center" label="组织名称" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="Fullname" align="center" label="组织名称" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column prop="Parentname" align="center" label="上级组织" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="Parentname" align="center" label="上级组织" show-overflow-tooltip></el-table-column>
|
|
|
|
|
+ <el-table-column prop="Contacts" align="center" label="联系人" show-overflow-tooltip></el-table-column>
|
|
|
|
|
+ <el-table-column prop="Phone" align="center" label="联系电话" show-overflow-tooltip></el-table-column>
|
|
|
|
|
+ <el-table-column prop="Address" align="center" label="地址" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column prop="Description" align="center" label="备注" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="Description" align="center" label="备注" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column label="操作时间" align="center" prop="Modifiedon">
|
|
<el-table-column label="操作时间" align="center" prop="Modifiedon">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -76,6 +79,15 @@
|
|
|
<el-form-item label="组织名称" prop="fullname" label-width="120px">
|
|
<el-form-item label="组织名称" prop="fullname" label-width="120px">
|
|
|
<el-input v-model="organizeform.fullname" auto-complete="off"></el-input>
|
|
<el-input v-model="organizeform.fullname" auto-complete="off"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
+ <el-form-item label="联系人" label-width="120px">
|
|
|
|
|
+ <el-input v-model="organizeform.Contacts" auto-complete="off"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="电话" label-width="120px">
|
|
|
|
|
+ <el-input v-model="organizeform.Phone" auto-complete="off"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="地址" label-width="120px">
|
|
|
|
|
+ <el-input v-model="organizeform.Address" auto-complete="off"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="描述" label-width="120px">
|
|
<el-form-item label="描述" label-width="120px">
|
|
|
<el-input type="textarea" v-model="organizeform.description" auto-complete="off"></el-input>
|
|
<el-input type="textarea" v-model="organizeform.description" auto-complete="off"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -114,7 +126,7 @@
|
|
|
export default {
|
|
export default {
|
|
|
name: 'organize',
|
|
name: 'organize',
|
|
|
|
|
|
|
|
- data() {
|
|
|
|
|
|
|
+ data () {
|
|
|
return {
|
|
return {
|
|
|
loading: false,
|
|
loading: false,
|
|
|
loadingTmp: false,
|
|
loadingTmp: false,
|
|
@@ -134,6 +146,9 @@
|
|
|
parentid: 0,
|
|
parentid: 0,
|
|
|
fullname: '',
|
|
fullname: '',
|
|
|
description: '',
|
|
description: '',
|
|
|
|
|
+ Contacts: '',
|
|
|
|
|
+ Phone: '',
|
|
|
|
|
+ Address: '',
|
|
|
id: 0
|
|
id: 0
|
|
|
},
|
|
},
|
|
|
rulesorganize: {
|
|
rulesorganize: {
|
|
@@ -172,20 +187,20 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- created() {
|
|
|
|
|
|
|
+ created () {
|
|
|
// initial data
|
|
// initial data
|
|
|
this.initData()
|
|
this.initData()
|
|
|
this.getorgtreelist()
|
|
this.getorgtreelist()
|
|
|
this.userdepartment.push(parseInt(this.authUser.Profile.DepartmentId))
|
|
this.userdepartment.push(parseInt(this.authUser.Profile.DepartmentId))
|
|
|
this.selectedorg = [parseInt(this.authUser.Profile.DepartmentId)]
|
|
this.selectedorg = [parseInt(this.authUser.Profile.DepartmentId)]
|
|
|
},
|
|
},
|
|
|
- updated() {},
|
|
|
|
|
|
|
+ updated () {},
|
|
|
watch: {},
|
|
watch: {},
|
|
|
computed: mapGetters({
|
|
computed: mapGetters({
|
|
|
authUser: 'authUser'
|
|
authUser: 'authUser'
|
|
|
}),
|
|
}),
|
|
|
methods: {
|
|
methods: {
|
|
|
- initData() {
|
|
|
|
|
|
|
+ initData () {
|
|
|
let _this = this
|
|
let _this = this
|
|
|
// paginate
|
|
// paginate
|
|
|
let params = {
|
|
let params = {
|
|
@@ -197,8 +212,8 @@
|
|
|
}
|
|
}
|
|
|
// request
|
|
// request
|
|
|
this.$axios.get('organizes/listbandparentname', {
|
|
this.$axios.get('organizes/listbandparentname', {
|
|
|
- params
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ params
|
|
|
|
|
+ })
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
// response
|
|
// response
|
|
|
_this.tablelist = res.data.items
|
|
_this.tablelist = res.data.items
|
|
@@ -218,15 +233,15 @@
|
|
|
// })
|
|
// })
|
|
|
// }).catch(() => {})
|
|
// }).catch(() => {})
|
|
|
},
|
|
},
|
|
|
- getorgtreelist() {
|
|
|
|
|
|
|
+ getorgtreelist () {
|
|
|
let _this = this
|
|
let _this = this
|
|
|
// request
|
|
// request
|
|
|
let params = {
|
|
let params = {
|
|
|
IsInnerOrganize: this.organizeform.IsInnerOrganize
|
|
IsInnerOrganize: this.organizeform.IsInnerOrganize
|
|
|
}
|
|
}
|
|
|
_this.$axios.get('organizes/list', {
|
|
_this.$axios.get('organizes/list', {
|
|
|
- params
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ params
|
|
|
|
|
+ })
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
_this.orgtreelist = window.toolfun_gettreejson(res.data.items, 'Id', 'Parentid', 'Id,Fullname')
|
|
_this.orgtreelist = window.toolfun_gettreejson(res.data.items, 'Id', 'Parentid', 'Id,Fullname')
|
|
|
})
|
|
})
|
|
@@ -235,16 +250,16 @@
|
|
|
console.error(err)
|
|
console.error(err)
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- orgtreeNodeClick(data) {
|
|
|
|
|
|
|
+ orgtreeNodeClick (data) {
|
|
|
this.parentid = data.id + ''
|
|
this.parentid = data.id + ''
|
|
|
this.currentPage = 1
|
|
this.currentPage = 1
|
|
|
this.initData()
|
|
this.initData()
|
|
|
},
|
|
},
|
|
|
- seachdata() {
|
|
|
|
|
|
|
+ seachdata () {
|
|
|
this.currentPage = 1
|
|
this.currentPage = 1
|
|
|
this.initData()
|
|
this.initData()
|
|
|
},
|
|
},
|
|
|
- permission(v) {
|
|
|
|
|
|
|
+ permission (v) {
|
|
|
this.binddevices = []
|
|
this.binddevices = []
|
|
|
this.permissiondialogtitle = '权限设置'
|
|
this.permissiondialogtitle = '权限设置'
|
|
|
this.permissiondatadialogVisible = true
|
|
this.permissiondatadialogVisible = true
|
|
@@ -262,12 +277,12 @@
|
|
|
console.error(err)
|
|
console.error(err)
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- savepermission() {
|
|
|
|
|
|
|
+ savepermission () {
|
|
|
let _this = this
|
|
let _this = this
|
|
|
_this.$axios.put('/equipment/permission/' + this.currId, {
|
|
_this.$axios.put('/equipment/permission/' + this.currId, {
|
|
|
- EquipmentIds: this.binddevices + '',
|
|
|
|
|
- OrganizeName: this.currOrganName
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ EquipmentIds: this.binddevices + '',
|
|
|
|
|
+ OrganizeName: this.currOrganName
|
|
|
|
|
+ })
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
// response
|
|
// response
|
|
|
if (res.data.code === 0) {
|
|
if (res.data.code === 0) {
|
|
@@ -285,12 +300,12 @@
|
|
|
})
|
|
})
|
|
|
.catch(() => {})
|
|
.catch(() => {})
|
|
|
},
|
|
},
|
|
|
- handleSizeChange(value) {
|
|
|
|
|
|
|
+ handleSizeChange (value) {
|
|
|
this.size = value
|
|
this.size = value
|
|
|
this.currentPage = 1
|
|
this.currentPage = 1
|
|
|
this.initData()
|
|
this.initData()
|
|
|
},
|
|
},
|
|
|
- handleCurrentChange(value) {
|
|
|
|
|
|
|
+ handleCurrentChange (value) {
|
|
|
this.currentPage = value
|
|
this.currentPage = value
|
|
|
this.initData()
|
|
this.initData()
|
|
|
},
|
|
},
|
|
@@ -312,7 +327,7 @@
|
|
|
_this.syncOrgLoading = true
|
|
_this.syncOrgLoading = true
|
|
|
rtxApi.syncOrganize(this.$axios).then(res => {
|
|
rtxApi.syncOrganize(this.$axios).then(res => {
|
|
|
_this.syncOrgLoading = false
|
|
_this.syncOrgLoading = false
|
|
|
- //response
|
|
|
|
|
|
|
+ // response
|
|
|
if (res.data.items) {
|
|
if (res.data.items) {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
type: 'success',
|
|
type: 'success',
|
|
@@ -339,7 +354,7 @@
|
|
|
val = val.replace('T', ' ')
|
|
val = val.replace('T', ' ')
|
|
|
return val.substring(0, 19)
|
|
return val.substring(0, 19)
|
|
|
},
|
|
},
|
|
|
- opendatadialog(item, v, index) {
|
|
|
|
|
|
|
+ opendatadialog (item, v, index) {
|
|
|
this.operatingitem = item
|
|
this.operatingitem = item
|
|
|
this.datadialogVisible = true
|
|
this.datadialogVisible = true
|
|
|
this.clearorganizeform()
|
|
this.clearorganizeform()
|
|
@@ -378,6 +393,9 @@
|
|
|
_this.dialogtitle = `编辑组织信息(${v.Fullname})`
|
|
_this.dialogtitle = `编辑组织信息(${v.Fullname})`
|
|
|
_this.organizeform.parentid = v.Parentid
|
|
_this.organizeform.parentid = v.Parentid
|
|
|
_this.organizeform.fullname = v.Fullname
|
|
_this.organizeform.fullname = v.Fullname
|
|
|
|
|
+ _this.organizeform.Contacts = v.Contacts
|
|
|
|
|
+ _this.organizeform.Phone = v.Phone
|
|
|
|
|
+ _this.organizeform.Address = v.Address
|
|
|
_this.organizeform.description = v.Description
|
|
_this.organizeform.description = v.Description
|
|
|
_this.organizeform.id = v.Id
|
|
_this.organizeform.id = v.Id
|
|
|
// 选中状态
|
|
// 选中状态
|
|
@@ -402,7 +420,7 @@
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- savedata(formName) {
|
|
|
|
|
|
|
+ savedata (formName) {
|
|
|
let _this = this
|
|
let _this = this
|
|
|
this.$refs[formName].validate((valid) => {
|
|
this.$refs[formName].validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
@@ -475,7 +493,7 @@
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- deletedata(val) {
|
|
|
|
|
|
|
+ deletedata (val) {
|
|
|
let _this = this
|
|
let _this = this
|
|
|
_this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
|
_this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
@@ -514,29 +532,31 @@
|
|
|
// .catch(() => {})
|
|
// .catch(() => {})
|
|
|
}).catch(() => {})
|
|
}).catch(() => {})
|
|
|
},
|
|
},
|
|
|
- resetForm(formName) {
|
|
|
|
|
- //this.$refs[formName].resetFields()
|
|
|
|
|
|
|
+ resetForm (formName) {
|
|
|
|
|
+ // this.$refs[formName].resetFields()
|
|
|
},
|
|
},
|
|
|
- clearorganizeform() {
|
|
|
|
|
|
|
+ clearorganizeform () {
|
|
|
this.organizeform = {
|
|
this.organizeform = {
|
|
|
parentid: 0,
|
|
parentid: 0,
|
|
|
fullname: '',
|
|
fullname: '',
|
|
|
|
|
+ Contacts: '',
|
|
|
|
|
+ Phone: '',
|
|
|
|
|
+ Address: '',
|
|
|
description: '',
|
|
description: '',
|
|
|
id: 0
|
|
id: 0
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- searchCommand(command) {
|
|
|
|
|
|
|
+ searchCommand (command) {
|
|
|
if (command == 'clear') {
|
|
if (command == 'clear') {
|
|
|
this.clearSearch()
|
|
this.clearSearch()
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- clearSearch() {
|
|
|
|
|
|
|
+ clearSearch () {
|
|
|
this.keyword = ''
|
|
this.keyword = ''
|
|
|
this.initData()
|
|
this.initData()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
<style lang="scss">
|