路由更改(面包屑未完善)
This commit is contained in:
parent
a0991d6d3c
commit
f124eeb48d
2
auto-imports.d.ts
vendored
2
auto-imports.d.ts
vendored
@ -2,6 +2,4 @@
|
|||||||
export {}
|
export {}
|
||||||
declare global {
|
declare global {
|
||||||
const ElMessage: typeof import('element-plus/es')['ElMessage']
|
const ElMessage: typeof import('element-plus/es')['ElMessage']
|
||||||
const ElMessageBox: typeof import('element-plus/es')['ElMessageBox']
|
|
||||||
const ElNotification: typeof import('element-plus/es')['ElNotification']
|
|
||||||
}
|
}
|
||||||
|
12
components.d.ts
vendored
12
components.d.ts
vendored
@ -13,12 +13,14 @@ declare module '@vue/runtime-core' {
|
|||||||
DropdownMenu: typeof import('./src/components/Share/DropdownMenu.vue')['default']
|
DropdownMenu: typeof import('./src/components/Share/DropdownMenu.vue')['default']
|
||||||
Dropzone: typeof import('./src/components/Dropzone/index.vue')['default']
|
Dropzone: typeof import('./src/components/Dropzone/index.vue')['default']
|
||||||
EditorImage: typeof import('./src/components/Tinymce/components/EditorImage.vue')['default']
|
EditorImage: typeof import('./src/components/Tinymce/components/EditorImage.vue')['default']
|
||||||
|
ElAlert: typeof import('element-plus/es')['ElAlert']
|
||||||
ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete']
|
ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete']
|
||||||
ElBadge: typeof import('element-plus/es')['ElBadge']
|
ElBadge: typeof import('element-plus/es')['ElBadge']
|
||||||
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
|
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
|
||||||
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
|
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
|
||||||
ElButton: typeof import('element-plus/es')['ElButton']
|
ElButton: typeof import('element-plus/es')['ElButton']
|
||||||
ElCard: typeof import('element-plus/es')['ElCard']
|
ElCard: typeof import('element-plus/es')['ElCard']
|
||||||
|
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||||
ElCol: typeof import('element-plus/es')['ElCol']
|
ElCol: typeof import('element-plus/es')['ElCol']
|
||||||
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
||||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||||
@ -31,14 +33,15 @@ declare module '@vue/runtime-core' {
|
|||||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||||
ElInput: typeof import('element-plus/es')['ElInput']
|
ElInput: typeof import('element-plus/es')['ElInput']
|
||||||
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
|
||||||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
||||||
ElOption: typeof import('element-plus/es')['ElOption']
|
ElOption: typeof import('element-plus/es')['ElOption']
|
||||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||||
ElProgress: typeof import('element-plus/es')['ElProgress']
|
ElProgress: typeof import('element-plus/es')['ElProgress']
|
||||||
ElRadio: typeof import('element-plus/es')['ElRadio']
|
ElRadio: typeof import('element-plus/es')['ElRadio']
|
||||||
|
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
|
||||||
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
||||||
|
ElRate: typeof import('element-plus/es')['ElRate']
|
||||||
ElRow: typeof import('element-plus/es')['ElRow']
|
ElRow: typeof import('element-plus/es')['ElRow']
|
||||||
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
||||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||||
@ -47,8 +50,12 @@ declare module '@vue/runtime-core' {
|
|||||||
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
||||||
ElTable: typeof import('element-plus/es')['ElTable']
|
ElTable: typeof import('element-plus/es')['ElTable']
|
||||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||||
|
ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
||||||
|
ElTabs: typeof import('element-plus/es')['ElTabs']
|
||||||
ElTag: typeof import('element-plus/es')['ElTag']
|
ElTag: typeof import('element-plus/es')['ElTag']
|
||||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||||
|
ElTree: typeof import('element-plus/es')['ElTree']
|
||||||
|
ElUpload: typeof import('element-plus/es')['ElUpload']
|
||||||
ErrorLog: typeof import('./src/components/ErrorLog/index.vue')['default']
|
ErrorLog: typeof import('./src/components/ErrorLog/index.vue')['default']
|
||||||
GithubCorner: typeof import('./src/components/GithubCorner/index.vue')['default']
|
GithubCorner: typeof import('./src/components/GithubCorner/index.vue')['default']
|
||||||
Hamburger: typeof import('./src/components/Hamburger/index.vue')['default']
|
Hamburger: typeof import('./src/components/Hamburger/index.vue')['default']
|
||||||
@ -75,4 +82,7 @@ declare module '@vue/runtime-core' {
|
|||||||
UploadExcel: typeof import('./src/components/UploadExcel/index.vue')['default']
|
UploadExcel: typeof import('./src/components/UploadExcel/index.vue')['default']
|
||||||
VueCountTo: typeof import('./src/components/vue-count-to/vue-countTo.vue')['default']
|
VueCountTo: typeof import('./src/components/vue-count-to/vue-countTo.vue')['default']
|
||||||
}
|
}
|
||||||
|
export interface ComponentCustomProperties {
|
||||||
|
vLoading: typeof import('element-plus/es')['ElLoadingDirective']
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
71
src/api/manage.js
Normal file
71
src/api/manage.js
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
import axios from "axios";
|
||||||
|
|
||||||
|
function getCurrentTimestamp() {
|
||||||
|
return new Date().getTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
const api = 'http://nbxt.oa.x-lf.cn'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据项目id获取项目信息
|
||||||
|
* @param id 项目id
|
||||||
|
* @param token 访问令牌
|
||||||
|
* @returns {Promise<AxiosResponse<any>> | *}
|
||||||
|
*/
|
||||||
|
const projectGetById = (id, token) => {
|
||||||
|
return axios({
|
||||||
|
url: api + "/project/get/id?id=" + id,
|
||||||
|
method: "get",
|
||||||
|
headers: {
|
||||||
|
'Authorization': 'Bearer ' + token,
|
||||||
|
'Timestamp': getCurrentTimestamp()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取项目信息
|
||||||
|
* @param projectId 项目id
|
||||||
|
* @param token 访问令牌
|
||||||
|
* @returns {Promise<AxiosResponse<any>> | *}
|
||||||
|
*/
|
||||||
|
|
||||||
|
export const getproject = (projectId, token) => {
|
||||||
|
return axios({
|
||||||
|
url: api +"/project/get?projectId=" + projectId,
|
||||||
|
method: "get",
|
||||||
|
headers: {
|
||||||
|
'Authorization': 'Bearer ' + token,
|
||||||
|
'Timestamp': getCurrentTimestamp()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取项目信息
|
||||||
|
* @param projectId 项目id
|
||||||
|
* @param token 访问令牌
|
||||||
|
* @returns {Promise<AxiosResponse<any>> | *}
|
||||||
|
*/
|
||||||
|
export const searchModel = (projectId ,token) => {
|
||||||
|
return axios({
|
||||||
|
url: api +"/module/get?projectId=" + projectId ,
|
||||||
|
method: "get",
|
||||||
|
headers: {
|
||||||
|
'Authorization': 'Bearer ' + token,
|
||||||
|
|
||||||
|
'Timestamp': getCurrentTimestamp()
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -3,8 +3,8 @@
|
|||||||
<transition-group name="breadcrumb">
|
<transition-group name="breadcrumb">
|
||||||
<el-breadcrumb-item v-for="(item, index) in levelList" :key="item.path">
|
<el-breadcrumb-item v-for="(item, index) in levelList" :key="item.path">
|
||||||
<span v-if="item.redirect === 'noRedirect' || index == levelList.length - 1" class="no-redirect">{{
|
<span v-if="item.redirect === 'noRedirect' || index == levelList.length - 1" class="no-redirect">{{
|
||||||
item.meta.title
|
item.meta.title
|
||||||
}}</span>
|
}}</span>
|
||||||
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
|
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
|
||||||
</el-breadcrumb-item>
|
</el-breadcrumb-item>
|
||||||
</transition-group>
|
</transition-group>
|
||||||
@ -41,8 +41,9 @@ export default defineComponent({
|
|||||||
const first = matched[0];
|
const first = matched[0];
|
||||||
|
|
||||||
if (!this.isDashboard(first)) {
|
if (!this.isDashboard(first)) {
|
||||||
matched = [{ path: '/dashboard', meta: { title: 'Dashboard' }}].concat(matched);
|
matched = [{ path: '/dashboard', meta: { title: 'Dashboard' } }].concat(matched);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false);
|
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false);
|
||||||
},
|
},
|
||||||
|
@ -31,6 +31,7 @@ export const constantRoutes:RouteRecordRaw[] = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
path: '/login',
|
path: '/login',
|
||||||
component: () => import('@/views/login/index.vue'),
|
component: () => import('@/views/login/index.vue'),
|
||||||
@ -158,41 +159,64 @@ export const asyncRoutes:RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: '/myself',
|
path: '/myself',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/myself',
|
redirect: 'noRedirect',
|
||||||
meta: {
|
meta: {
|
||||||
alwaysShow: true, // will always show the root menu
|
alwaysShow: false, // 始终显示根菜单
|
||||||
title: '个人项目',
|
title: '个人项目',
|
||||||
icon: 'nested',
|
icon: 'nested',
|
||||||
roles: ['admin', 'teacher_user']
|
roles: ['admin', 'teacher_user']
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
// 我负责的
|
path: 'participate',
|
||||||
path: 'charge',
|
component: () => import('@/views/personal/project/participate.vue'),
|
||||||
component: () => import('@/views/personal/project/charge.vue'),
|
name: 'participate',
|
||||||
name: 'Charge',
|
|
||||||
meta: { title: '我负责的', icon: 'user', affix: true }
|
meta: { title: '我负责的', icon: 'user', affix: true }
|
||||||
},
|
},
|
||||||
|
//我管理的以及子页面
|
||||||
{
|
{
|
||||||
// 我管理的
|
|
||||||
path: 'manage',
|
path: 'manage',
|
||||||
component: () => import('@/views/personal/project/manage.vue'),
|
component: () => import('@/views/personal/project/manage.vue'),
|
||||||
name: 'Manage',
|
name: 'Manage',
|
||||||
meta: { title: '我管理的', icon: 'user', affix: true }
|
meta: { title: '我管理的', icon: 'user', affix: true, },
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// 我参与的
|
path: 'childSysManage',
|
||||||
path: 'participate',
|
component: () => import('@/views/personal/project/childSystem/manage.vue'),
|
||||||
component: () => import('@/views/personal/project/participate.vue'),
|
name: 'ChildSysManage',
|
||||||
name: 'Participate',
|
meta: { title: '子系统', breadcrumb: true , hidden: true },
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'childModManage',
|
||||||
|
component: () => import('@/views/personal/project/childModel/manage.vue'),
|
||||||
|
name: 'ChildModManage',
|
||||||
|
meta: { title: '子模块', breadcrumb: true , hidden: true }
|
||||||
|
},
|
||||||
|
//我参与的以及子界面
|
||||||
|
{
|
||||||
|
path: 'charge',
|
||||||
|
component: () => import('@/views/personal/project/charge.vue'),
|
||||||
|
name: 'Charge',
|
||||||
meta: { title: '我参与的', icon: 'user', affix: true }
|
meta: { title: '我参与的', icon: 'user', affix: true }
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'childSysCharge',
|
||||||
|
component: () => import('@/views/personal/project/childSystem/manage.vue'),
|
||||||
|
name: 'ChildSysCharge',
|
||||||
|
meta: { title: '子系统', breadcrumb: true , hidden: true },
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'childModCharge',
|
||||||
|
component: () => import('@/views/personal/project/childModel/manage.vue'),
|
||||||
|
name: 'ChildModCharge',
|
||||||
|
meta: { title: '子模块', breadcrumb: true , hidden: true }
|
||||||
|
},
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
|
,
|
||||||
|
|
||||||
|
|
||||||
// {
|
// {
|
||||||
|
@ -1,3 +1,136 @@
|
|||||||
<template>
|
<template>
|
||||||
hello
|
<div style=" width:100%">
|
||||||
</template>
|
<el-card style="max-width: 100vw;margin: 1.5vw;">
|
||||||
|
<template #header><strong >我参与的</strong></template>
|
||||||
|
<div style="display:flex;flex-direction:row;justify-content: space-around ">
|
||||||
|
<div>
|
||||||
|
名称
|
||||||
|
<el-input v-model="input" style="width: 240px;margin-left:0.5vw" placeholder="请输入" />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
状态
|
||||||
|
<el-input v-model="input" style="width: 240px;margin-left:0.5vw" placeholder="请输入" />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" style="width:80px">查询</el-button>
|
||||||
|
<el-button style="width:80px">重置</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<el-card style="max-width: 100vw;height:60vh;margin:1.3vw">
|
||||||
|
<div style="display:flex;flex-direction: row;justify-content: space-between">
|
||||||
|
<el-button
|
||||||
|
text
|
||||||
|
type=''
|
||||||
|
>项目列表</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
ref="multipleTableRef"
|
||||||
|
:data="tableData"
|
||||||
|
style="max-width: 100vw;"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<!-- <el-table-column type="selection" width="55" />-->
|
||||||
|
<el-table-column label="序号" width="120">
|
||||||
|
<template #default="scope">{{ scope.row.date }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column property="name" label="项目名称" width="120" />
|
||||||
|
<el-table-column property="address" label="工作量" show-overflow-tooltip />
|
||||||
|
<el-table-column property="address" label="周期" />
|
||||||
|
<el-table-column property="address" label="负责人" />
|
||||||
|
<el-table-column property="address" label="状态" />
|
||||||
|
<el-table-column property="address" label="子系统简介" />
|
||||||
|
<el-table-column property="address" label="截止时间" />
|
||||||
|
<el-table-column property="address" label="操作" >
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
style="color:deepskyblue"
|
||||||
|
@click="toChildSystem"
|
||||||
|
>查看详情</el-button
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-pagination
|
||||||
|
larger
|
||||||
|
background
|
||||||
|
layout="prev, pager, next"
|
||||||
|
:total="50"
|
||||||
|
class="mt-4"
|
||||||
|
style="display: flex;flex-direction: row;justify-content: center;margin-top:5vh"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref } from 'vue';
|
||||||
|
import { ElTable } from 'element-plus';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
// 路由跳转
|
||||||
|
const toChildSystem = () => {
|
||||||
|
router.push({ name: 'ChildSysManage' }); // 跳转到子系统详情页面
|
||||||
|
};
|
||||||
|
|
||||||
|
const input = ref('');
|
||||||
|
|
||||||
|
interface User {
|
||||||
|
date: string
|
||||||
|
name: string
|
||||||
|
address: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const multipleTableRef = ref<InstanceType<typeof ElTable>>();
|
||||||
|
const multipleSelection = ref<User[]>([]);
|
||||||
|
|
||||||
|
const handleSelectionChange = (val: User[]) => {
|
||||||
|
multipleSelection.value = val;
|
||||||
|
};
|
||||||
|
|
||||||
|
const tableData: User[] = [
|
||||||
|
{
|
||||||
|
date: '2016-05-03',
|
||||||
|
name: 'Tom',
|
||||||
|
address: 'No. 189, Grove St, Los Angeles'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
date: '2016-05-02',
|
||||||
|
name: 'Tom',
|
||||||
|
address: 'No. 189, Grove St, Los Angeles'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
date: '2016-05-04',
|
||||||
|
name: 'Tom',
|
||||||
|
address: 'No. 189, Grove St, Los Angeles'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
date: '2016-05-01',
|
||||||
|
name: 'Tom',
|
||||||
|
address: 'No. 189, Grove St, Los Angeles'
|
||||||
|
}
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.my-autocomplete li {
|
||||||
|
line-height: normal;
|
||||||
|
padding: 7px;
|
||||||
|
}
|
||||||
|
.my-autocomplete li .name {
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.my-autocomplete li .addr {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #b4b4b4;
|
||||||
|
}
|
||||||
|
.my-autocomplete li .highlighted .addr {
|
||||||
|
color: #ddd;
|
||||||
|
}
|
||||||
|
</style>
|
136
src/views/personal/project/childSystem/charge.vue
Normal file
136
src/views/personal/project/childSystem/charge.vue
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
<template>
|
||||||
|
<div style=" width:100%">
|
||||||
|
<el-card style="max-width: 100vw;margin: 1.5vw;">
|
||||||
|
<template #header><strong >项目1</strong></template>
|
||||||
|
<div style="display:flex;flex-direction:row;justify-content: space-around ">
|
||||||
|
<div>
|
||||||
|
名称
|
||||||
|
<el-input v-model="input" style="width: 240px;margin-left:0.5vw" placeholder="请输入" />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
状态
|
||||||
|
<el-input v-model="input" style="width: 240px;margin-left:0.5vw" placeholder="请输入" />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" style="width:80px">查询</el-button>
|
||||||
|
<el-button style="width:80px">重置</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<el-card style="max-width: 100vw;height:60vh;margin:1.3vw">
|
||||||
|
<div style="display:flex;flex-direction: row;justify-content: space-between">
|
||||||
|
<el-button
|
||||||
|
text
|
||||||
|
type=''
|
||||||
|
>子系统列表</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
ref="multipleTableRef"
|
||||||
|
:data="tableData"
|
||||||
|
style="max-width: 100vw;"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<!-- <el-table-column type="selection" width="55" />-->
|
||||||
|
<el-table-column label="序号" width="120">
|
||||||
|
<template #default="scope">{{ scope.row.date }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column property="name" label="子系统名称" width="120" />
|
||||||
|
<el-table-column property="address" label="工作量" show-overflow-tooltip />
|
||||||
|
<el-table-column property="address" label="周期" />
|
||||||
|
<el-table-column property="address" label="负责人" />
|
||||||
|
<el-table-column property="address" label="状态" />
|
||||||
|
<el-table-column property="address" label="子系统简介" />
|
||||||
|
<el-table-column property="address" label="截止时间" />
|
||||||
|
<el-table-column property="address" label="操作" >
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
style="color:deepskyblue"
|
||||||
|
@click="toChildModel"
|
||||||
|
>查看详情</el-button
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-pagination
|
||||||
|
larger
|
||||||
|
background
|
||||||
|
layout="prev, pager, next"
|
||||||
|
:total="50"
|
||||||
|
class="mt-4"
|
||||||
|
style="display: flex;flex-direction: row;justify-content: center;margin-top:5vh"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref } from 'vue';
|
||||||
|
import { ElTable } from 'element-plus';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
|
//跳转到子模块
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const toChildModel = () => {
|
||||||
|
router.push({name:'ChildModCharge'})
|
||||||
|
};
|
||||||
|
|
||||||
|
const input = ref('');
|
||||||
|
|
||||||
|
interface User {
|
||||||
|
date: string
|
||||||
|
name: string
|
||||||
|
address: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const multipleTableRef = ref<InstanceType<typeof ElTable>>();
|
||||||
|
const multipleSelection = ref<User[]>([]);
|
||||||
|
|
||||||
|
const handleSelectionChange = (val: User[]) => {
|
||||||
|
multipleSelection.value = val;
|
||||||
|
};
|
||||||
|
|
||||||
|
const tableData: User[] = [
|
||||||
|
{
|
||||||
|
date: '2016-05-03',
|
||||||
|
name: 'Tom',
|
||||||
|
address: 'No. 189, Grove St, Los Angeles'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
date: '2016-05-02',
|
||||||
|
name: 'Tom',
|
||||||
|
address: 'No. 189, Grove St, Los Angeles'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
date: '2016-05-04',
|
||||||
|
name: 'Tom',
|
||||||
|
address: 'No. 189, Grove St, Los Angeles'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
date: '2016-05-01',
|
||||||
|
name: 'Tom',
|
||||||
|
address: 'No. 189, Grove St, Los Angeles'
|
||||||
|
}
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.my-autocomplete li {
|
||||||
|
line-height: normal;
|
||||||
|
padding: 7px;
|
||||||
|
}
|
||||||
|
.my-autocomplete li .name {
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.my-autocomplete li .addr {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #b4b4b4;
|
||||||
|
}
|
||||||
|
.my-autocomplete li .highlighted .addr {
|
||||||
|
color: #ddd;
|
||||||
|
}
|
||||||
|
</style>
|
162
src/views/personal/project/childSystem/manage.vue
Normal file
162
src/views/personal/project/childSystem/manage.vue
Normal file
@ -0,0 +1,162 @@
|
|||||||
|
<template>
|
||||||
|
<div style=" width:100%">
|
||||||
|
<el-card style="max-width: 100vw;margin: 1.5vw;">
|
||||||
|
<template #header><strong>项目1</strong></template>
|
||||||
|
<div style="display:flex;flex-direction:row;justify-content: space-around ">
|
||||||
|
<div>
|
||||||
|
名称
|
||||||
|
<el-input v-model="input" style="width: 240px;margin-left:0.5vw" placeholder="请输入" />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
状态
|
||||||
|
<el-input v-model="input" style="width: 240px;margin-left:0.5vw" placeholder="请输入" />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" style="width:80px">查询</el-button>
|
||||||
|
<el-button style="width:80px">重置</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<el-card style="max-width: 100vw;height:60vh;margin:1.3vw">
|
||||||
|
<div style="display:flex;flex-direction: row;justify-content: space-between">
|
||||||
|
<el-button text type=''>子系统列表</el-button>
|
||||||
|
</div>
|
||||||
|
<el-table ref="multipleTableRef" :data="tableData" style="max-width: 100vw;"
|
||||||
|
@selection-change="handleSelectionChange">
|
||||||
|
<!-- <el-table-column type="selection" width="55" />-->
|
||||||
|
<el-table-column label="序号" width="120">
|
||||||
|
<template #default="scope">{{ scope.row.date }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column property="name" label="子系统名称" width="120" />
|
||||||
|
<el-table-column property="cycle" label="工作量" show-overflow-tooltip />
|
||||||
|
<el-table-column property="address" label="周期" />
|
||||||
|
<el-table-column property="address" label="负责人" />
|
||||||
|
<el-table-column property="isFinish" label="状态" />
|
||||||
|
<el-table-column property="description" label="子系统简介" />
|
||||||
|
<el-table-column property="address" label="截止时间" />
|
||||||
|
<el-table-column property="address" label="操作">
|
||||||
|
<el-button link style="color:deepskyblue" @click="toChildModel">查看详情</el-button>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-pagination larger background layout="prev, pager, next" :total="50" class="mt-4"
|
||||||
|
style="display: flex;flex-direction: row;justify-content: center;margin-top:5vh" />
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref } from 'vue';
|
||||||
|
import { ElTable } from 'element-plus';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
import { searchModel } from '@/api/manage.js';
|
||||||
|
import { getToken } from '@/utils/auth';
|
||||||
|
|
||||||
|
//跳转到子模块
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const toChildModel = () => {
|
||||||
|
router.push({ name: 'ChildModManage' })
|
||||||
|
};
|
||||||
|
|
||||||
|
const input = ref('');
|
||||||
|
|
||||||
|
interface User {
|
||||||
|
cycle:number
|
||||||
|
description:string
|
||||||
|
isDelete:number
|
||||||
|
isFinish:number
|
||||||
|
name:string
|
||||||
|
principalId:number
|
||||||
|
projectId:number
|
||||||
|
status:boolean
|
||||||
|
type:number
|
||||||
|
workLoad:number
|
||||||
|
id:number
|
||||||
|
}
|
||||||
|
|
||||||
|
const multipleTableRef = ref<InstanceType<typeof ElTable>>();
|
||||||
|
const multipleSelection = ref<User[]>([]);
|
||||||
|
|
||||||
|
const handleSelectionChange = (val: User[]) => {
|
||||||
|
multipleSelection.value = val;
|
||||||
|
};
|
||||||
|
|
||||||
|
//搜索子系统
|
||||||
|
//获取数据
|
||||||
|
const searchSys = searchModel(1, getToken());
|
||||||
|
|
||||||
|
|
||||||
|
console.log(searchSys);
|
||||||
|
|
||||||
|
const tableData = ref<User[]>([]);
|
||||||
|
//处理数据
|
||||||
|
searchSys.then(res => {
|
||||||
|
const data = res.data.data;
|
||||||
|
console.log(data);
|
||||||
|
|
||||||
|
if (data) {
|
||||||
|
tableData.value = data.map(item =>{
|
||||||
|
const addproject: User = {
|
||||||
|
id: item.id,
|
||||||
|
cycle: item.cycle,
|
||||||
|
description: item.description,
|
||||||
|
isDelete: item.isDelete,
|
||||||
|
isFinish: item.isFinish,
|
||||||
|
name: item.name,
|
||||||
|
principalId: item.principalId,
|
||||||
|
projectId: item.projectId,
|
||||||
|
status: item.status,
|
||||||
|
type: item.type,
|
||||||
|
workLoad: item.workLoad
|
||||||
|
};
|
||||||
|
|
||||||
|
tableData.value.push(addproject);
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}else{
|
||||||
|
console.log("没有数据");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(tableData.value);
|
||||||
|
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.my-autocomplete li {
|
||||||
|
line-height: normal;
|
||||||
|
padding: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.my-autocomplete li .name {
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.my-autocomplete li .addr {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #b4b4b4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.my-autocomplete li .highlighted .addr {
|
||||||
|
color: #ddd;
|
||||||
|
}
|
||||||
|
</style>
|
0
src/views/personal/project/childmodel/charge.vue
Normal file
0
src/views/personal/project/childmodel/charge.vue
Normal file
135
src/views/personal/project/childmodel/manage.vue
Normal file
135
src/views/personal/project/childmodel/manage.vue
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
<template>
|
||||||
|
<div style=" width:100%">
|
||||||
|
<el-card style="max-width: 100vw;margin: 1.5vw;">
|
||||||
|
<template #header><strong >子系统1</strong></template>
|
||||||
|
<div style="display:flex;flex-direction:row;justify-content: space-around ">
|
||||||
|
<div>
|
||||||
|
名称
|
||||||
|
<el-input v-model="input" style="width: 240px;margin-left:0.5vw" placeholder="请输入" />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
状态
|
||||||
|
<el-input v-model="input" style="width: 240px;margin-left:0.5vw" placeholder="请输入" />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" style="width:80px">查询</el-button>
|
||||||
|
<el-button style="width:80px">重置</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<el-card style="max-width: 100vw;height:60vh;margin:1.3vw">
|
||||||
|
<div style="display:flex;flex-direction: row;justify-content: space-between">
|
||||||
|
<el-button
|
||||||
|
text
|
||||||
|
type=''
|
||||||
|
|
||||||
|
>子模块列表</el-button
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" style="width:80px">新增</el-button>
|
||||||
|
<el-button style="width:80px ;background-color: #bd3124;color: azure;">删除</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
ref="multipleTableRef"
|
||||||
|
:data="tableData"
|
||||||
|
style="max-width: 100vw;"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<!-- <el-table-column type="selection" width="55" />-->
|
||||||
|
<el-table-column label="序号" width="120">
|
||||||
|
<template #default="scope">{{ scope.row.date }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column property="name" label="子模块名称" width="120" />
|
||||||
|
<el-table-column property="address" label="工作量" show-overflow-tooltip />
|
||||||
|
<el-table-column property="address" label="周期" />
|
||||||
|
<el-table-column property="address" label="负责人" />
|
||||||
|
<el-table-column property="address" label="状态" />
|
||||||
|
<el-table-column property="address" label="子系统简介" />
|
||||||
|
<el-table-column property="address" label="截止时间" />
|
||||||
|
<el-table-column property="address" label="操作" >
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
style="color:deepskyblue"
|
||||||
|
@click=""
|
||||||
|
>查看详情</el-button
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-pagination
|
||||||
|
larger
|
||||||
|
background
|
||||||
|
layout="prev, pager, next"
|
||||||
|
:total="50"
|
||||||
|
class="mt-4"
|
||||||
|
style="display: flex;flex-direction: row;justify-content: center;margin-top:5vh"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref } from 'vue';
|
||||||
|
import { ElTable } from 'element-plus';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
interface User {
|
||||||
|
date: string
|
||||||
|
name: string
|
||||||
|
address: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const multipleTableRef = ref<InstanceType<typeof ElTable>>();
|
||||||
|
const multipleSelection = ref<User[]>([]);
|
||||||
|
|
||||||
|
const handleSelectionChange = (val: User[]) => {
|
||||||
|
multipleSelection.value = val;
|
||||||
|
};
|
||||||
|
|
||||||
|
const input = ref('');
|
||||||
|
|
||||||
|
const tableData: User[] = [
|
||||||
|
{
|
||||||
|
date: '2016-05-03',
|
||||||
|
name: 'Tom',
|
||||||
|
address: 'No. 189, Grove St, Los Angeles'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
date: '2016-05-02',
|
||||||
|
name: 'Tom',
|
||||||
|
address: 'No. 189, Grove St, Los Angeles'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
date: '2016-05-04',
|
||||||
|
name: 'Tom',
|
||||||
|
address: 'No. 189, Grove St, Los Angeles'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
date: '2016-05-01',
|
||||||
|
name: 'Tom',
|
||||||
|
address: 'No. 189, Grove St, Los Angeles'
|
||||||
|
}
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.my-autocomplete li {
|
||||||
|
line-height: normal;
|
||||||
|
padding: 7px;
|
||||||
|
}
|
||||||
|
.my-autocomplete li .name {
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.my-autocomplete li .addr {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #b4b4b4;
|
||||||
|
}
|
||||||
|
.my-autocomplete li .highlighted .addr {
|
||||||
|
color: #ddd;
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,124 +1,200 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style=" width:100%">
|
<div style=" width:100%">
|
||||||
<el-card style="max-width: 100vw;margin: 1.5vw;">
|
<el-card style="max-width: 100vw;margin: 1.5vw;">
|
||||||
<template #header><strong >项目1</strong></template>
|
<template #header><strong>我管理的</strong></template>
|
||||||
<div style="display:flex;flex-direction:row;justify-content: space-around ">
|
<div style="display:flex;flex-direction:row;justify-content: space-around ">
|
||||||
<div>
|
<div>
|
||||||
名称
|
名称
|
||||||
<el-input v-model="input" style="width: 240px;margin-left:0.5vw" placeholder="请输入" />
|
<el-input v-model="input" style="width: 240px;margin-left:0.5vw" placeholder="请输入" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
状态
|
状态
|
||||||
<el-input v-model="input" style="width: 240px;margin-left:0.5vw" placeholder="请输入" />
|
<el-input v-model="input" style="width: 240px;margin-left:0.5vw" placeholder="请输入" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" style="width:80px">查询</el-button>
|
<el-button type="primary" style="width:80px">查询</el-button>
|
||||||
<el-button style="width:80px">重置</el-button>
|
<el-button style="width:80px">重置</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
<el-card style="max-width: 100vw;height:60vh;margin:1.3vw">
|
|
||||||
<div style="display:flex;flex-direction: row;justify-content: space-between">
|
|
||||||
<el-button
|
|
||||||
text
|
|
||||||
type=''
|
|
||||||
>子系统列表</el-button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<el-table
|
|
||||||
ref="multipleTableRef"
|
|
||||||
:data="tableData"
|
|
||||||
style="max-width: 100vw;"
|
|
||||||
@selection-change="handleSelectionChange"
|
|
||||||
>
|
|
||||||
<!-- <el-table-column type="selection" width="55" />-->
|
|
||||||
<el-table-column label="序号" width="120">
|
|
||||||
<template #default="scope">{{ scope.row.date }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column property="name" label="子系统名称" width="120" />
|
|
||||||
<el-table-column property="address" label="工作量" show-overflow-tooltip />
|
|
||||||
<el-table-column property="address" label="周期" />
|
|
||||||
<el-table-column property="address" label="负责人" />
|
|
||||||
<el-table-column property="address" label="状态" />
|
|
||||||
<el-table-column property="address" label="子系统简介" />
|
|
||||||
<el-table-column property="address" label="截止时间" />
|
|
||||||
<el-table-column property="address" label="操作" >
|
|
||||||
<el-button
|
|
||||||
link
|
|
||||||
style="color:deepskyblue"
|
|
||||||
>查看详情</el-button
|
|
||||||
>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<el-pagination
|
|
||||||
larger
|
|
||||||
background
|
|
||||||
layout="prev, pager, next"
|
|
||||||
:total="50"
|
|
||||||
class="mt-4"
|
|
||||||
style="display: flex;flex-direction: row;justify-content: center;margin-top:5vh"
|
|
||||||
/>
|
|
||||||
</el-card>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</el-card>
|
||||||
|
<el-card style="max-width: 100vw;height:60vh;margin:1.3vw">
|
||||||
<script lang="ts" setup>
|
<div style="display:flex;flex-direction: row;justify-content: space-between">
|
||||||
import { ref } from 'vue';
|
<el-button text type=''>项目列表</el-button>
|
||||||
import { ElTable } from 'element-plus';
|
</div>
|
||||||
interface User {
|
<el-table ref="multipleTableRef" :data="tableData" style="max-width: 100vw;"
|
||||||
date: string
|
@selection-change="handleSelectionChange">
|
||||||
name: string
|
<!-- <el-table-column type="selection" width="55" />-->
|
||||||
address: string
|
<el-table-column label="序号" width="120">
|
||||||
|
<template v-slot="{$index}">{{ $index+1 }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column property="name" label="项目名称" width="120" />
|
||||||
|
<el-table-column property="workLoad" label="工作量" show-overflow-tooltip />
|
||||||
|
<el-table-column property="cycle" label="周期" />
|
||||||
|
<el-table-column property="principalUser" label="负责人" />
|
||||||
|
<el-table-column property="isFinish" label="状态" />
|
||||||
|
<el-table-column property="description" label="子系统简介" />
|
||||||
|
<el-table-column property="id" label="截止时间" />
|
||||||
|
<el-table-column property="name" label="操作">
|
||||||
|
<el-button link style="color:deepskyblue" @click="toChildSystem">查看详情</el-button>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-pagination larger background layout="prev, pager, next" :total="50" class="mt-4"
|
||||||
|
style="display: flex;flex-direction: row;justify-content: center;margin-top:5vh" />
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref } from 'vue';
|
||||||
|
import { ElTable } from 'element-plus';
|
||||||
|
import { getproject } from '@/api/manage.js';
|
||||||
|
import { getToken } from '@/utils/auth';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
// 路由跳转
|
||||||
|
const toChildSystem = () => {
|
||||||
|
router.push({ name: 'ChildSysManage' ,params:{ token : getToken()}}); // 跳转到子系统详情页面
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
interface User {
|
||||||
|
id: number
|
||||||
|
cycle: number
|
||||||
|
name: string
|
||||||
|
description: string
|
||||||
|
workLoad: number
|
||||||
|
isFinish: number
|
||||||
|
principalUser: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const multipleTableRef = ref<InstanceType<typeof ElTable>>();
|
||||||
|
const multipleSelection = ref<User[]>([]);
|
||||||
|
|
||||||
|
const handleSelectionChange = (val: User[]) => {
|
||||||
|
multipleSelection.value = val;
|
||||||
|
};
|
||||||
|
|
||||||
|
// const tableData: User[] = [
|
||||||
|
// {
|
||||||
|
// date: '2016-05-03',
|
||||||
|
// name: 'Tom',
|
||||||
|
// address: 'No. 189, Grove St, Los Angeles'
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// date: '2016-05-02',
|
||||||
|
// name: 'Tom',
|
||||||
|
// address: 'No. 189, Grove St, Los Angeles'
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// date: '2016-05-04',
|
||||||
|
// name: 'Tom',
|
||||||
|
// address: 'No. 189, Grove St, Los Angeles'
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// date: '2016-05-01',
|
||||||
|
// name: 'Tom',
|
||||||
|
// address: 'No. 189, Grove St, Los Angeles'
|
||||||
|
// }
|
||||||
|
|
||||||
|
// ];
|
||||||
|
//获取数据
|
||||||
|
const project = getproject(2, getToken());
|
||||||
|
|
||||||
|
//响应式
|
||||||
|
const tableData = ref<User[]>([
|
||||||
|
//测试用例
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
cycle: 2,
|
||||||
|
name: "shij",
|
||||||
|
description: "null",
|
||||||
|
workLoad: 1,
|
||||||
|
isFinish: 2,
|
||||||
|
principalUser: "teacher_user",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
cycle: 2,
|
||||||
|
name: "shij",
|
||||||
|
description: "null",
|
||||||
|
workLoad: 1,
|
||||||
|
isFinish: 2,
|
||||||
|
principalUser: "teacher_user",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
cycle: 2,
|
||||||
|
name: "shij",
|
||||||
|
description: "null",
|
||||||
|
workLoad: 1,
|
||||||
|
isFinish: 2,
|
||||||
|
principalUser: "teacher_user",
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
// 处理接口数据
|
||||||
|
project.then(res => {
|
||||||
|
|
||||||
|
const data = res.data.data[0];
|
||||||
|
if (data) {
|
||||||
|
const dataProject: User = {
|
||||||
|
id: data.id,
|
||||||
|
cycle: data.cycle,
|
||||||
|
name: data.name,
|
||||||
|
description: data.description,
|
||||||
|
workLoad: data.workLoad,
|
||||||
|
isFinish: data.isFinish,
|
||||||
|
principalUser: data.principalUser
|
||||||
|
};
|
||||||
|
// 使用 tableData.value 进行访问
|
||||||
|
tableData.value.push(dataProject);
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
console.log("没有数据");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const multipleTableRef = ref<InstanceType<typeof ElTable>>();
|
|
||||||
const multipleSelection = ref<User[]>([]);
|
|
||||||
|
|
||||||
const handleSelectionChange = (val: User[]) => {
|
})
|
||||||
multipleSelection.value = val;
|
.catch(err => {
|
||||||
};
|
console.log(err);
|
||||||
|
});
|
||||||
const tableData: User[] = [
|
|
||||||
{
|
|
||||||
date: '2016-05-03',
|
|
||||||
name: 'Tom',
|
const input = ref('');
|
||||||
address: 'No. 189, Grove St, Los Angeles'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
date: '2016-05-02',
|
|
||||||
name: 'Tom',
|
|
||||||
address: 'No. 189, Grove St, Los Angeles'
|
|
||||||
},
|
</script>
|
||||||
{
|
<style>
|
||||||
date: '2016-05-04',
|
.my-autocomplete li {
|
||||||
name: 'Tom',
|
line-height: normal;
|
||||||
address: 'No. 189, Grove St, Los Angeles'
|
padding: 7px;
|
||||||
},
|
}
|
||||||
{
|
|
||||||
date: '2016-05-01',
|
.my-autocomplete li .name {
|
||||||
name: 'Tom',
|
text-overflow: ellipsis;
|
||||||
address: 'No. 189, Grove St, Los Angeles'
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
];
|
.my-autocomplete li .addr {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #b4b4b4;
|
||||||
</script>
|
}
|
||||||
<style>
|
|
||||||
.my-autocomplete li {
|
.my-autocomplete li .highlighted .addr {
|
||||||
line-height: normal;
|
color: #ddd;
|
||||||
padding: 7px;
|
}
|
||||||
}
|
</style>
|
||||||
.my-autocomplete li .name {
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.my-autocomplete li .addr {
|
|
||||||
font-size: 12px;
|
|
||||||
color: #b4b4b4;
|
|
||||||
}
|
|
||||||
.my-autocomplete li .highlighted .addr {
|
|
||||||
color: #ddd;
|
|
||||||
}
|
|
||||||
</style>
|
|
Loading…
x
Reference in New Issue
Block a user