项目管理新增页面保存

This commit is contained in:
Yuanjianghong 2021-08-25 18:13:09 +08:00
parent 0303c91ca3
commit 39d96927b2
2 changed files with 467 additions and 30 deletions

View File

@ -0,0 +1,359 @@
<template>
<page-header-wrapper title="项目基础信息">
<template v-slot:content>
<a-descriptions size="small" :column="isMobile ? 1 : 2">
<a-descriptions-item label="项目名称">曲丽丽</a-descriptions-item>
<a-descriptions-item label="培训类型">2017-07-07</a-descriptions-item>
<a-descriptions-item label="培训种类"><a href="">12421</a></a-descriptions-item>
<a-descriptions-item label="培训方式">2017-07-07</a-descriptions-item>
<a-descriptions-item label="培训时间">XX 服务</a-descriptions-item>
<a-descriptions-item label="练习类型">2017-07-07</a-descriptions-item>
<a-descriptions-item label="考试时间">2017-07-07</a-descriptions-item>
<a-descriptions-item label="补考">
<a-radio :default-checked="false" :disabled="disabled"> Disabled </a-radio>
<a-radio default-checked :disabled="disabled"> Disabled </a-radio>
</a-descriptions-item>
<a-descriptions-item label="备注">请于两个工作日内确认</a-descriptions-item>
</a-descriptions>
</template>
<template v-slot:extraContent>
<a-row class="status-list">
<a-col :xs="12" :sm="12">
<div class="text">状态</div>
<div class="heading">待审批</div>
</a-col>
</a-row>
</template>
<a-card :bordered="false" title="流程进度">
<a-steps :direction="(isMobile && 'vertical') || 'horizontal'" :current="1" progressDot>
<a-step>
<template v-slot:title>
<span>创建项目</span>
</template>
<template v-slot:description>
<div class="antd-pro-pages-profile-advanced-style-stepDescription">
曲丽丽<a-icon type="dingding" style="margin-left: 8px" />
<div>2016-12-12 12:32</div>
</div>
</template>
</a-step>
<a-step>
<template v-slot:title>
<span>部门初审</span>
</template>
<template v-slot:description>
<div class="antd-pro-pages-profile-advanced-style-stepDescription">
周毛毛<a-icon type="dingding" style="color: rgb(0, 160, 233); margin-left: 8px" />
<div><a>催一下</a></div>
</div>
</template>
</a-step>
<a-step title="财务复核" />
<a-step title="完成" />
</a-steps>
</a-card>
<a-card style="margin-top: 24px" :bordered="false" title="用户信息">
<a-descriptions>
<a-descriptions-item label="用户姓名">付晓晓</a-descriptions-item>
<a-descriptions-item label="会员卡号">32943898021309809423</a-descriptions-item>
<a-descriptions-item label="身份证">3321944288191034921</a-descriptions-item>
<a-descriptions-item label="联系方式">18112345678</a-descriptions-item>
<a-descriptions-item label="联系地址">浙江省杭州市西湖区黄姑山路工专路交叉路口</a-descriptions-item>
</a-descriptions>
<a-descriptions title="信息组">
<a-descriptions-item label="某某数据">725</a-descriptions-item>
<a-descriptions-item label="该数据更新时间">2018-08-08</a-descriptions-item>
<a-descriptions-item></a-descriptions-item>
<a-descriptions-item label="某某数据">725</a-descriptions-item>
<a-descriptions-item label="该数据更新时间">2018-08-08</a-descriptions-item>
<a-descriptions-item></a-descriptions-item>
</a-descriptions>
<a-card type="inner" title="多层信息组">
<a-descriptions title="组名称" size="small">
<a-descriptions-item label="负责人">林东东</a-descriptions-item>
<a-descriptions-item label="角色码">1234567</a-descriptions-item>
<a-descriptions-item label="所属部门">XX公司-YY部</a-descriptions-item>
<a-descriptions-item label="过期时间">2018-08-08</a-descriptions-item>
<a-descriptions-item label="描述"
>这段描述很长很长很长很长很长很长很长很长很长很长很长很长很长很长...</a-descriptions-item
>
</a-descriptions>
<a-divider style="margin: 16px 0" />
<a-descriptions title="组名称" size="small" :col="1">
<a-descriptions-item label="学名">
Citrullus lanatus (Thunb.) Matsum. et
Nakai一年生蔓生藤本枝粗壮具明显的棱卷须较粗..</a-descriptions-item
>
</a-descriptions>
<a-divider style="margin: 16px 0" />
<a-descriptions title="组名称" size="small" :col="2">
<a-descriptions-item label="负责人">付小小</a-descriptions-item>
<a-descriptions-item label="角色码">1234567</a-descriptions-item>
</a-descriptions>
</a-card>
</a-card>
<a-card style="margin-top: 24px" :bordered="false" title="用户近半年来电记录">
<div class="no-data"><a-icon type="frown-o" />暂无数据</div>
</a-card>
<!-- 操作 -->
<a-card
style="margin-top: 24px"
:bordered="false"
:tabList="operationTabList"
:activeTabKey="operationActiveTabKey"
@tabChange="
(key) => {
this.operationActiveTabKey = key
}
"
>
<a-table
v-if="operationActiveTabKey === '1'"
:columns="operationColumns"
:dataSource="operation1"
:pagination="false"
>
<template slot="status" slot-scope="status">
<a-badge :status="status | statusTypeFilter" :text="status | statusFilter" />
</template>
</a-table>
<a-table
v-if="operationActiveTabKey === '2'"
:columns="operationColumns"
:dataSource="operation2"
:pagination="false"
>
<template slot="status" slot-scope="status">
<a-badge :status="status | statusTypeFilter" :text="status | statusFilter" />
</template>
</a-table>
<a-table
v-if="operationActiveTabKey === '3'"
:columns="operationColumns"
:dataSource="operation3"
:pagination="false"
>
<template slot="status" slot-scope="status">
<a-badge :status="status | statusTypeFilter" :text="status | statusFilter" />
</template>
</a-table>
</a-card>
</page-header-wrapper>
</template>
<script>
import { baseMixin } from '@/store/app-mixin'
export default {
name: 'Advanced',
mixins: [baseMixin],
data() {
return {
tabList: [
{ key: 'detail', tab: '详情' },
{ key: 'rule', tab: '规则' },
],
tabActiveKey: 'detail',
operationTabList: [
{
key: '1',
tab: '操作日志一',
},
{
key: '2',
tab: '操作日志二',
},
{
key: '3',
tab: '操作日志三',
},
],
operationActiveTabKey: '1',
operationColumns: [
{
title: '操作类型',
dataIndex: 'type',
key: 'type',
},
{
title: '操作人',
dataIndex: 'name',
key: 'name',
},
{
title: '执行结果',
dataIndex: 'status',
key: 'status',
scopedSlots: { customRender: 'status' },
},
{
title: '操作时间',
dataIndex: 'updatedAt',
key: 'updatedAt',
},
{
title: '备注',
dataIndex: 'remark',
key: 'remark',
},
],
operation1: [
{
key: 'op1',
type: '订购关系生效',
name: '曲丽丽',
status: 'agree',
updatedAt: '2017-10-03 19:23:12',
remark: '-',
},
{
key: 'op2',
type: '财务复审',
name: '付小小',
status: 'reject',
updatedAt: '2017-10-03 19:23:12',
remark: '不通过原因',
},
{
key: 'op3',
type: '部门初审',
name: '周毛毛',
status: 'agree',
updatedAt: '2017-10-03 19:23:12',
remark: '-',
},
{
key: 'op4',
type: '提交订单',
name: '林东东',
status: 'agree',
updatedAt: '2017-10-03 19:23:12',
remark: '很棒',
},
{
key: 'op5',
type: '创建订单',
name: '汗牙牙',
status: 'agree',
updatedAt: '2017-10-03 19:23:12',
remark: '-',
},
],
operation2: [
{
key: 'op2',
type: '财务复审',
name: '付小小',
status: 'reject',
updatedAt: '2017-10-03 19:23:12',
remark: '不通过原因',
},
{
key: 'op3',
type: '部门初审',
name: '周毛毛',
status: 'agree',
updatedAt: '2017-10-03 19:23:12',
remark: '-',
},
{
key: 'op4',
type: '提交订单',
name: '林东东',
status: 'agree',
updatedAt: '2017-10-03 19:23:12',
remark: '很棒',
},
],
operation3: [
{
key: 'op2',
type: '财务复审',
name: '付小小',
status: 'reject',
updatedAt: '2017-10-03 19:23:12',
remark: '不通过原因',
},
{
key: 'op3',
type: '部门初审',
name: '周毛毛',
status: 'agree',
updatedAt: '2017-10-03 19:23:12',
remark: '-',
},
],
}
},
filters: {
statusFilter(status) {
const statusMap = {
agree: '成功',
reject: '驳回',
}
return statusMap[status]
},
statusTypeFilter(type) {
const statusTypeMap = {
agree: 'success',
reject: 'error',
}
return statusTypeMap[type]
},
},
methods: {
handleTabChange(key) {
console.log('')
this.tabActiveKey = key
},
},
}
</script>
<style lang="less" scoped>
.detail-layout {
margin-left: 44px;
}
.text {
color: rgba(0, 0, 0, 0.45);
}
.heading {
color: rgba(0, 0, 0, 0.85);
font-size: 20px;
}
.no-data {
color: rgba(0, 0, 0, 0.25);
text-align: center;
line-height: 64px;
font-size: 16px;
i {
font-size: 24px;
margin-right: 16px;
position: relative;
top: 3px;
}
}
.mobile {
.detail-layout {
margin-left: unset;
}
.text {
}
.status-list {
text-align: left;
}
}
</style>

View File

@ -1,38 +1,116 @@
<template> <template>
<div> <page-header-wrapper :title="新增项目">
<h1>hello word</h1> <a-form-model :model="form" :label-col="labelCol" :wrapper-col="wrapperCol" :layout="vertical">
</div> <a-form-model-item label="项目名称">
<a-input v-model="form.projectName" />
</a-form-model-item>
<a-form-model-item label="培训种类">
<a-select v-model="form.trainClass" placeholder="please select your zone">
<a-select-option value="shanghai"> Zone one </a-select-option>
<a-select-option value="beijing"> Zone two </a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item label="培训类型">
<a-select v-model="form.trainType" placeholder="--请选择--">
<a-select-option value="1"> 必修课 </a-select-option>
<a-select-option value="2"> 选修课 </a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item label="培训方式">
<a-select v-model="form.trainWay" placeholder="--请选择--">
<a-select-option value="1"> 培训 </a-select-option>
<a-select-option value="2"> 考试 </a-select-option>
<a-select-option value="3"> 培训-练习 </a-select-option>
<a-select-option value="4"> 培训-练习-考试 </a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item label="人员类型">
<a-select v-model="form.personType" placeholder="--请选择--">
<a-select-option value="shanghai"> Zone one </a-select-option>
<a-select-option value="beijing"> Zone two </a-select-option>
</a-select>
</a-form-model-item>
<!-- 时间选择器呢 -->
<a-form-item label="培训时间" style="margin-bottom: 0">
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
<a-date-picker v-model="form.trainSdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss"/>
</a-form-item>
<span :style="{ display: 'inline-block', width: '24px', textAlign: 'center' }"> - </span>
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
<a-date-picker v-model="form.trainEdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss"/>
</a-form-item>
</a-form-item>
<!-- 时间选择器 -->
<a-form-item v-if="form.trainWay !== '1'" label="练习时间" style="margin-bottom: 0">
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
<a-date-picker v-model="form.practiceSdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss"/>
</a-form-item>
<span :style="{ display: 'inline-block', width: '24px', textAlign: 'center' }"> - </span>
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
<a-date-picker v-model="form.practiceEdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss"/>
</a-form-item>
</a-form-item>
<!-- 时间选择器 -->
<a-form-item v-if="form.trainWay !== '1'" label="考试时间" style="margin-bottom: 0">
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
<a-date-picker v-model="form.examSdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss"/>
</a-form-item>
<span :style="{ display: 'inline-block', width: '24px', textAlign: 'center' }"> - </span>
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
<a-date-picker v-model="form.examEdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss"/>
</a-form-item>
</a-form-item>
<a-form-model-item label="时间">
<a-date-picker v-model="form.date1" show-time type="date" placeholder="Pick a date" style="width: 100%" />
</a-form-model-item>
<a-form-model-item label="开关">
<a-switch v-model="form.delivery" />
</a-form-model-item>
<a-form-model-item label="多选">
<a-checkbox-group v-model="form.type">
<a-checkbox value="1" name="type"> Online </a-checkbox>
<a-checkbox value="2" name="type"> Promotion </a-checkbox>
<a-checkbox value="3" name="type"> Offline </a-checkbox>
</a-checkbox-group>
</a-form-model-item>
<a-form-model-item label="单选">
<a-radio-group v-model="form.resource">
<a-radio value="1"> Sponsor </a-radio>
<a-radio value="2"> Venue </a-radio>
</a-radio-group>
</a-form-model-item>
<a-form-model-item label="输入框">
<a-input v-model="form.desc" type="textarea" />
</a-form-model-item>
<a-form-model-item :wrapper-col="{ span: 14, offset: 4 }">
<a-button type="primary" @click="onSubmit"> 提交 </a-button>
<a-button style="margin-left: 10px"> 取消 </a-button>
</a-form-model-item>
</a-form-model>
</page-header-wrapper>
</template> </template>
<script> <script>
//jsjsjson
//import from ''
export default { export default {
//import使
name: 'projectForm',
components: {},
props: {},
data() { data() {
// return {
return {} labelCol: { span: 4 },
wrapperCol: { span: 14 },
form: {
// name: '',
// region: undefined,
// date1: undefined,
// delivery: false,
// type: [],
// resource: '',
// desc: '',
},
}
},
methods: {
onSubmit() {
console.log('submit!', this.form)
},
}, },
// data
computed: {},
//data
watch: {},
//
methods: {},
created() {}, // - 访this
mounted() {}, // - 访DOM
beforeCreate() {}, // -
beforeMount() {}, // -
beforeUpdate() {}, // -
updated() {}, // -
beforeDestroy() {}, // -
destroyed() {}, // -
activated() {}, //keep-alive
} }
</script> </script>
<style scoped>
</style>