Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #364

Merged
merged 1 commit into from
Aug 15, 2023
Merged

fix #364

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<html lang="zh">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Expand Down
32 changes: 5 additions & 27 deletions src/views/deploy/Deploy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -155,24 +155,6 @@
></el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item :label="$t('views.deploy.department')">
<el-select
v-model="agentForm.department"
class="addUserInput"
clearable
size="small"
style="width: 180px"
>
<el-option
v-for="(item, index) in departmentList"
:key="index"
:label="item.name"
:value="item.token"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
Expand Down Expand Up @@ -807,23 +789,19 @@ export default class Deploy extends VueBase {
}
}

private async getListDepartment() {
// 部门list
const res = await this.services.deploy.getDepartment({})
private async getUserToken() {
const res = await this.services.user.userToken()
if (res.status === 201) {
this.departmentList = res.data
this.token = res.data[res.data.length - 1]?.token || ''
this.agentForm.department = this.token
return
this.token = res.data.token
}
this.$message.error(res.msg)
}

private async created() {
await this.getListDepartment()
this.agentForm.entryName = 'Demo Project'
this.agentForm.version = 'V1.0'
await this.getMd()
await this.getDoc()
this.getUserToken()
}
}
</script>
Expand Down
Loading