diff --git a/src/components/OrgTable.vue b/src/components/OrgTable.vue index 30784ee..e89fe64 100644 --- a/src/components/OrgTable.vue +++ b/src/components/OrgTable.vue @@ -22,7 +22,7 @@ - + @@ -31,7 +31,7 @@ - + @@ -71,7 +71,7 @@ @@ -85,18 +85,18 @@ {{ item.uname || item.USNAME || item.name || item.orgName}} + :key="item.usid || item.USID || item.id " + @close="handleRemove(item)">{{ item.uname || item.USNAME || item.name || item.longName}} { if (res.ok) { res.data.map(item => { - item.name = item.orgName + item.name = item.longName // item.icon = 'static/images/dept.png' }) this.orgZNodes = res.data @@ -744,7 +744,7 @@ export default { const selected = selection.length && selection.indexOf(row) !== -1 // 为true时选中,为 0 时(false)未选中 if (selected) { selection.map(selItem => { - const id = selItem.USID || selItem.orgCode + const id = selItem.USID || selItem.id if (!this.checkedIdList.includes(id)) { this.checkedIdList.push(id) this.checkedList.push(row) @@ -757,7 +757,7 @@ export default { selectionRowAll (selection) { if (selection.length > 0) { selection.map(selItem => { - const id = selItem.USID || selItem.orgCode + const id = selItem.USID || selItem.id if (!this.checkedIdList.includes(id)) { this.checkedIdList.push(id) this.checkedList.push(selItem) @@ -809,7 +809,7 @@ export default { handleOrgDel () { this.searchForm.orgId = '' - this.searchForm.orgName = '' + this.searchForm.longName = '' }, /** @@ -826,7 +826,7 @@ export default { if (this.tableData[i].USID == row.USID && !this.isOrg) { // console.log(this.tableData[i], '666') this.$refs.orgTable && this.$refs.orgTable.toggleRowSelection(this.tableData[i]) - }else if (this.tableData[i].orgCode == row.orgCode&& this.isOrg){ + }else if (this.tableData[i].id == row.id&& this.isOrg){ this.$refs.orgTable && this.$refs.orgTable.toggleRowSelection(this.tableData[i]) } @@ -865,7 +865,7 @@ export default { }, handleMouseEnter () { - if (this.searchForm.orgName !== '') { + if (this.searchForm.longName !== '') { this.visibleOrgClearBtn = true } }, @@ -945,8 +945,8 @@ export default { if(this.isOrg){ idList.map((id, index) => { checkedList.push({ - orgCode:id, - orgName:nameList[index] + id:id, + longName:nameList[index] }) }) }else{ @@ -968,10 +968,10 @@ export default { } if (this.searchVal && this.searchVal.type == 'qcrbm') { this.searchForm.orgId = this.searchVal.OrgId - this.searchForm.orgName = this.searchVal.orgName + this.searchForm.longName = this.searchVal.longName } else { this.searchForm.orgId = '' - this.searchForm.orgName = '' + this.searchForm.longName = '' } this.getRoleAndUserByOrgIdPage() } @@ -996,8 +996,8 @@ export default { if (this.config.value !== '') { if(this.isOrg){ this.checkedList = [{ - orgCode: this.config.value, - orgName: this.config.valueName + id: this.config.value, + longName: this.config.valueName }] }else{ this.checkedList = [{ @@ -1017,8 +1017,8 @@ export default { if(this.isOrg){ idList.map((id, index) => { checkedList.push({ - orgCode: id, - orgName: nameList[index] + id: id, + longName: nameList[index] }) }) }else { diff --git a/src/views/System/Org.vue b/src/views/System/Org.vue index 4a8b2fb..5597077 100644 --- a/src/views/System/Org.vue +++ b/src/views/System/Org.vue @@ -8,7 +8,7 @@
- + @@ -50,10 +50,10 @@ {{ rowIndex + (q.pageNo - 1) * q.pageSize + 1 }} - - - - + + + + @@ -86,19 +86,19 @@
- + - + - + - + - + @@ -113,7 +113,7 @@ - + @@ -148,7 +148,7 @@ export default { data () { return { q: { - orgName: '', // 用户名 + longName: '', // 用户名 // roleName: '', // 角色名称 pageNo: 1, pageSize: 10 @@ -158,11 +158,11 @@ export default { mode: '', dialogUser: false, form: { - orgName: '', // 部门名称 - orgCode: '', // 部门编码 - orgLevel: '', // 部门级别 - supOrgCode: '', // 父部门编码 - orgShortName: '', // 部门简称 + longName: '', // 部门名称 + departmentCode: '', // 部门编码 + leveL: '', // 部门级别 + parentID: '', // 父部门编码 + shortName: '', // 部门简称 attribution: '', //归属地 bmdm14: '', // 部门14位码 // roleIdList: [''] // 角色 @@ -201,7 +201,7 @@ export default { // 重置 reset () { this.q = { - orgName: '', // 部门名称 + longName: '', // 部门名称 // roleName: '', // 角色名称 pageNo: 1, pageSize: 10 @@ -225,11 +225,11 @@ export default { add () { this.mode = 'add' this.form = { - orgName: '', // 部门名称 - orgCode: '', // 部门编码 - orgLevel: '', // 部门级别 - supOrgCode: '', // 父部门编码 - orgShortName: '', // 部门简称 + longName: '', // 部门名称 + departmentCode: '', // 部门编码 + leveL: '', // 部门级别 + parentID: '', // 父部门编码 + shortName: '', // 部门简称 attribution: '', //归属地 bmdm14: '', // 部门14位码 // roleIdList: [''] // 角色 @@ -258,13 +258,13 @@ export default { }, // 验证 checkUserForm () { - if (!this.form.orgName) { + if (!this.form.longName) { return this.$message.warning('请检查部门名称') && false } - if (!this.form.orgCode) { + if (!this.form.departmentCode) { return this.$message.warning('请检查部门编码') && false } - if (!this.form.orgLevel || !(/^[a-zA-Z0-9]*$/.test(this.form.orgLevel))) { + if (!this.form.leveL || !(/^[a-zA-Z0-9]*$/.test(this.form.leveL))) { return this.$message.warning('部门级别只能为纯数字') && false } return true @@ -272,6 +272,7 @@ export default { // 新增用户 sysOrgAddOrg () { if (!this.checkUserForm()) return + let form={} const data = JSON.parse(JSON.stringify(this.form)) this.$api.org.sysOrgAddUser(data).then(_ => { @@ -284,11 +285,11 @@ export default { openRowData (mode, row) { this.mode = mode this.form = { - orgName: row.orgName, // 部门名称 - orgLevel: row.orgLevel, // 部门级别 - orgCode: row.orgCode, // 部门级别 - supOrgCode: row.supOrgCode, // 父部门编码 - orgShortName: row.orgShortName, // 部门简称 + longName: row.longName, // 部门名称 + leveL: row.leveL, // 部门级别 + departmentCode: row.departmentCode, // 部门级别 + parentID: row.parentID, // 父部门编码 + shortName: row.shortName, // 部门简称 id: row.id, // ID attribution: row.attribution, // 归属地 bmdm14: row.bmdm14 // 部门14位码 diff --git a/src/views/System/User.vue b/src/views/System/User.vue index 01f2b00..90c7b1f 100644 --- a/src/views/System/User.vue +++ b/src/views/System/User.vue @@ -168,8 +168,8 @@ export default { const parts = [] const partsName = [] checkedList.map((item, index) => { - parts.push(item.orgCode) - partsName.push(item.orgName) + parts.push(item.id) + partsName.push(item.longName) }) this.form.orgId = parts.toString() this.form.orgName = partsName.toString() diff --git a/src/views/reportProcess/components/reportForm.vue b/src/views/reportProcess/components/reportForm.vue index f3f65e8..f3ca439 100644 --- a/src/views/reportProcess/components/reportForm.vue +++ b/src/views/reportProcess/components/reportForm.vue @@ -310,8 +310,8 @@ export default { const parts = [] const partsName = [] checkedList.map((item, index) => { - parts.push(item.orgCode) - partsName.push(item.orgName) + parts.push(item.id) + partsName.push(item.longName) }) this.qcrList = checkedList diff --git a/src/views/reportProcess/launch.vue b/src/views/reportProcess/launch.vue index 79a1a06..c0f0987 100644 --- a/src/views/reportProcess/launch.vue +++ b/src/views/reportProcess/launch.vue @@ -198,8 +198,8 @@ export default { // 需要给部门带出来 if(this.$store.getters.userInfo.orgEOList.length>0){ let temp=this.$store.getters.userInfo.orgEOList - this.$set(this.processForm,'departmentName',temp[0].orgName) - this.$set(this.processForm,'department',temp[0].orgCode) + this.$set(this.processForm,'departmentName',temp[0].longName) + this.$set(this.processForm,'department',temp[0].id) console.log(this.processForm,"wowowwoo") } }