我负责的项目页面完善对话框
This commit is contained in:
parent
35354344e4
commit
4d2c6c65e8
6
components.d.ts
vendored
6
components.d.ts
vendored
@ -20,6 +20,8 @@ declare module '@vue/runtime-core' {
|
||||
ElButton: typeof import('element-plus/es')['ElButton']
|
||||
ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
|
||||
ElCard: typeof import('element-plus/es')['ElCard']
|
||||
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
|
||||
ElCol: typeof import('element-plus/es')['ElCol']
|
||||
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||
@ -37,6 +39,8 @@ declare module '@vue/runtime-core' {
|
||||
ElOption: typeof import('element-plus/es')['ElOption']
|
||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||
ElProgress: typeof import('element-plus/es')['ElProgress']
|
||||
ElRadio: typeof import('element-plus/es')['ElRadio']
|
||||
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
||||
ElRow: typeof import('element-plus/es')['ElRow']
|
||||
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||
@ -45,7 +49,9 @@ declare module '@vue/runtime-core' {
|
||||
ElTable: typeof import('element-plus/es')['ElTable']
|
||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||
ElTag: typeof import('element-plus/es')['ElTag']
|
||||
ElTimePicker: typeof import('element-plus/es')['ElTimePicker']
|
||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||
ElUpload: typeof import('element-plus/es')['ElUpload']
|
||||
ErrorLog: typeof import('./src/components/ErrorLog/index.vue')['default']
|
||||
GithubCorner: typeof import('./src/components/GithubCorner/index.vue')['default']
|
||||
Hamburger: typeof import('./src/components/Hamburger/index.vue')['default']
|
||||
|
@ -15,7 +15,7 @@ export function isExternal(path) {
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
export function validUsername(str) {
|
||||
const valid_map = ['admin', 'editor', 'teacher_user', 'teacher_demo', 'demo', 'xiao_lfeng', 'yangna'];
|
||||
const valid_map = ['console_user', 'developer_user', 'principal_user'];
|
||||
return valid_map.indexOf(str.trim()) >= 0;
|
||||
}
|
||||
|
||||
|
@ -113,8 +113,8 @@ export default defineComponent({
|
||||
};
|
||||
return {
|
||||
loginForm: {
|
||||
username: 'teacher_user',
|
||||
password: '123456'
|
||||
username: 'principal_user',
|
||||
password: 'jsl_nbxt'
|
||||
},
|
||||
loginRules: {
|
||||
username: [{ required: true, trigger: 'blur', validator: validateUsername }],
|
||||
|
@ -37,16 +37,21 @@
|
||||
<template #header>
|
||||
<div class="card-header" style="display: flex; justify-content: space-between; align-items: center;">
|
||||
<span>项目列表</span>
|
||||
<div>
|
||||
<el-button type="success">
|
||||
<el-icon><UploadFilled /></el-icon>
|
||||
上传文档
|
||||
</el-button>
|
||||
<el-button type="primary">
|
||||
<div style="display: flex;">
|
||||
<el-upload
|
||||
multiple
|
||||
style=" margin-right: 13px;"
|
||||
>
|
||||
<el-button type="success">
|
||||
<el-icon><UploadFilled /></el-icon>
|
||||
上传文档
|
||||
</el-button>
|
||||
</el-upload>
|
||||
<el-button type="primary" @click="toggleAddDialog()">
|
||||
<el-icon><Plus /></el-icon>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button type="danger">
|
||||
<el-button type="danger" @click="toggleDeleteDialog()">
|
||||
<el-icon><DeleteFilled /></el-icon>
|
||||
删除
|
||||
</el-button>
|
||||
@ -105,6 +110,103 @@
|
||||
<el-pagination background layout="prev, pager, next" :total="1000" />
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
|
||||
<!--新增项目对话框-->
|
||||
<el-dialog v-model="AddDialogVisible" title="新增项目" width="500">
|
||||
<el-form label-width="auto" style="max-width: 600px">
|
||||
<el-form-item
|
||||
label="项目名称"
|
||||
:rules="{
|
||||
required: true,
|
||||
message: 'domain can not be null',
|
||||
trigger: 'blur',
|
||||
}"
|
||||
>
|
||||
<el-input />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="周期"
|
||||
:rules="{
|
||||
required: true,
|
||||
message: 'domain can not be null',
|
||||
trigger: 'blur',
|
||||
}"
|
||||
>
|
||||
<el-input />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="工作量"
|
||||
:rules="{
|
||||
required: true,
|
||||
message: 'domain can not be null',
|
||||
trigger: 'blur',
|
||||
}"
|
||||
>
|
||||
<el-input />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="项目描述"
|
||||
:rules="{
|
||||
required: true,
|
||||
message: 'domain can not be null',
|
||||
trigger: 'blur',
|
||||
}"
|
||||
>
|
||||
<el-input type="textarea" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="20">
|
||||
<el-form-item
|
||||
label="状态"
|
||||
:rules="{
|
||||
required: true,
|
||||
message: 'Please select a status',
|
||||
trigger: 'blur',
|
||||
}"
|
||||
>
|
||||
<el-select placeholder="Please select a zone">
|
||||
<el-option label="Zone No.1" value="shanghai" />
|
||||
<el-option label="Zone No.2" value="beijing" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item>
|
||||
<el-button type="success">
|
||||
<el-icon><UploadFilled /></el-icon>
|
||||
上传文档
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="CancelAdd()">取消</el-button>
|
||||
<el-button type="primary">
|
||||
确认
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!--删除项目对话框-->
|
||||
<el-dialog
|
||||
title="删除项目"
|
||||
width="450"
|
||||
align-center
|
||||
v-model="DeleteDialogVisible"
|
||||
>
|
||||
<span>确认删除该项目吗?</span>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="danger">删除</el-button>
|
||||
<el-button @click="CancelDelete()">取消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { Plus, UploadFilled, Delete, DeleteFilled, RefreshRight, Search } from '@element-plus/icons-vue';
|
||||
@ -120,6 +222,8 @@ export default defineComponent({
|
||||
components: { RefreshRight, DeleteFilled, Delete, UploadFilled, Plus, Search },
|
||||
data() {
|
||||
return {
|
||||
AddDialogVisible:false,
|
||||
DeleteDialogVisible:false,
|
||||
tableData:[],
|
||||
listLoading: false,
|
||||
token: getToken(),
|
||||
@ -146,6 +250,18 @@ export default defineComponent({
|
||||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
toggleAddDialog() {
|
||||
this.AddDialogVisible = !this.AddDialogVisible;
|
||||
},
|
||||
CancelAdd() {
|
||||
this.AddDialogVisible = false;
|
||||
},
|
||||
toggleDeleteDialog() {
|
||||
this.DeleteDialogVisible = !this.DeleteDialogVisible;
|
||||
},
|
||||
CancelDelete() {
|
||||
this.DeleteDialogVisible = false;
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user