|
|
|
@ -319,14 +319,24 @@
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="企业信息" prop="enterpriseId">
|
|
|
|
|
<el-select v-model="form.enterpriseId" placeholder="请选择企业信息" clearable style="width: 100%">
|
|
|
|
|
<!-- <el-select v-model="form.enterpriseId" placeholder="请选择企业信息" clearable style="width: 100%">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in enterpriseList"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:label="item.enterpriseName"
|
|
|
|
|
:label="item.qymc"
|
|
|
|
|
:value="item.id"
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-select> -->
|
|
|
|
|
<el-autocomplete
|
|
|
|
|
style="width: 100%;"
|
|
|
|
|
placeholder="请输入企业名称"
|
|
|
|
|
v-model="form.enterpriseId"
|
|
|
|
|
:fetch-suggestions="querySearch"
|
|
|
|
|
:trigger-on-focus="false"
|
|
|
|
|
@select="handleSelect"
|
|
|
|
|
>
|
|
|
|
|
<!-- -->
|
|
|
|
|
</el-autocomplete>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
@ -497,6 +507,7 @@ export default {
|
|
|
|
|
// 企业数组
|
|
|
|
|
enterpriseList: [],
|
|
|
|
|
tabHeader: undefined,
|
|
|
|
|
enterpriseId:null,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
@ -518,11 +529,24 @@ export default {
|
|
|
|
|
this.getConfigKey("sys.user.initPassword").then(response => {
|
|
|
|
|
this.initPassword = response.msg;
|
|
|
|
|
});
|
|
|
|
|
listEnterpriseBasicInfo({}).then((response) => {
|
|
|
|
|
this.enterpriseList = response.rows
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
handleSelect(item) {
|
|
|
|
|
this.enterpriseId = item.id;
|
|
|
|
|
},
|
|
|
|
|
querySearch(queryString, cb) {
|
|
|
|
|
let results = []
|
|
|
|
|
listEnterpriseBasicInfo({qymc:queryString}).then((response) => {
|
|
|
|
|
response.data.records.map((item)=>{
|
|
|
|
|
results.push({
|
|
|
|
|
id: item.id,
|
|
|
|
|
value: item.qymc,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
cb(results);
|
|
|
|
|
},
|
|
|
|
|
// 屏幕尺寸变化
|
|
|
|
|
cancalDebounce(){
|
|
|
|
|
const element = document.getElementById('app-container'); // 通过元素的 ID 获取元素
|
|
|
|
@ -679,6 +703,7 @@ export default {
|
|
|
|
|
submitForm: function() {
|
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
this.form.enterpriseId = this.enterpriseId
|
|
|
|
|
if (this.form.userId != undefined) {
|
|
|
|
|
updateUser(this.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
|