|
|
@@ -87,7 +87,7 @@ Page({
|
|
|
* @author : 周兴
|
|
|
*/
|
|
|
deactivateEnable(e) {
|
|
|
- if(e.detail == 'right'){
|
|
|
+ if (e.detail == 'right') {
|
|
|
let item = e.currentTarget.dataset.item
|
|
|
//执行接口
|
|
|
this.handleMoreDataIsValid(this.data.service, item, 'orgId')
|
|
|
@@ -150,7 +150,11 @@ Page({
|
|
|
form.parentId = topOrg.orgId
|
|
|
form.parentName = topOrg.orgName
|
|
|
}
|
|
|
+ let popContent = this.data.popContent
|
|
|
+ // 新建时过滤掉部门
|
|
|
+ popContent = popContent.filter(it => it.code != 'orgCode')
|
|
|
this.setData({
|
|
|
+ popContent: popContent,
|
|
|
showPop: true,
|
|
|
editFlag: false,
|
|
|
popTitle: this.$t('newDepartment'),
|
|
|
@@ -462,7 +466,22 @@ Page({
|
|
|
}
|
|
|
let form_ = { ...form }
|
|
|
form_.editFlag = false
|
|
|
+ let popContent = this.data.popContent
|
|
|
+ let filters = popContent.filter(it => it.code == 'orgCode');
|
|
|
+ // 说明部门编码被过滤掉了,需要加回来
|
|
|
+ if (!filters || filters.length == 0) {
|
|
|
+ popContent.unshift(
|
|
|
+ {
|
|
|
+ code: 'orgCode',
|
|
|
+ type: 'str',
|
|
|
+ name: 'orgCode',
|
|
|
+ required: false,
|
|
|
+ readonly: true
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
this.setData({
|
|
|
+ popContent:popContent,
|
|
|
form: JSON.stringify(form_),
|
|
|
popTitle: this.$t('org'),
|
|
|
showPop: true,
|