|
@@ -7,10 +7,10 @@
|
|
|
<a-row style="margin-left: 14px">
|
|
|
<a-button @click="handleAdd(1)" type="primary">添加部门</a-button>
|
|
|
<a-button @click="handleAdd(2)" type="primary">添加下级</a-button>
|
|
|
- <a-button type="primary" icon="download" @click="handleExportXls('部门信息')">导出</a-button>
|
|
|
+ <!-- <a-button type="primary" icon="download" @click="handleExportXls('部门信息')">导出</a-button>
|
|
|
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
|
|
<a-button type="primary" icon="import">导入</a-button>
|
|
|
- </a-upload>
|
|
|
+ </a-upload> -->
|
|
|
<a-button title="删除多条数据" @click="batchDel" type="default">批量删除</a-button>
|
|
|
<!--<a-button @click="refresh" type="default" icon="reload" :loading="loading">刷新</a-button>-->
|
|
|
</a-row>
|
|
@@ -97,11 +97,11 @@
|
|
|
:filterOption="filterOption"
|
|
|
style="width: 100%"
|
|
|
placeholder="请选择部门领导"
|
|
|
- v-decorator="['leader', { rules: [{ required: true, message: '部门领导必选' }] }]"
|
|
|
+ v-decorator="['leader', { rules: [{ required: true, message: '部门领导必选' }] }]"
|
|
|
labelInValue
|
|
|
>
|
|
|
<a-select-option v-for="(people, peopleindex) in peopleList" :key="peopleindex" :value="people.key">
|
|
|
- {{ people.label }}
|
|
|
+ {{people.label}}
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
@@ -137,7 +137,7 @@
|
|
|
:labelCol="labelCol"
|
|
|
:wrapperCol="wrapperCol"
|
|
|
label="排序">
|
|
|
- <a-input-number v-decorator="[ 'departOrder',{'initialValue':0}]"/>
|
|
|
+ <a-input-number :min="0" v-decorator="[ 'departOrder',{'initialValue':0}]"/>
|
|
|
</a-form-item>
|
|
|
<a-form-item
|
|
|
:labelCol="labelCol"
|
|
@@ -294,6 +294,9 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ getData(className) {
|
|
|
+ return this.form.getFieldValue(className)
|
|
|
+ },
|
|
|
filterOption(input, option) {
|
|
|
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
},
|
|
@@ -303,6 +306,7 @@
|
|
|
this.peopleList = res.result.map((item) => {
|
|
|
return { key: item.userId, label: item.realName }
|
|
|
})
|
|
|
+ console.log(res,this.peopleList)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -495,10 +499,10 @@
|
|
|
this.$message.warning('请点击选择要修改部门!')
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
+ console.log(values)
|
|
|
let formData = Object.assign(this.currSelected, values)
|
|
|
formData.leaderId = values.leader.key
|
|
|
- formData.leaderName = values.leader.label
|
|
|
+ formData.leaderName = values.leader.label.replace(/\/n+$/g,'');
|
|
|
console.log('Received values of form: ', formData)
|
|
|
httpAction(this.url.edit, formData, 'put').then((res) => {
|
|
|
if (res.success) {
|