[update] 添加企标制修订流程
This commit is contained in:
@@ -0,0 +1,129 @@
|
||||
<template>
|
||||
<div>
|
||||
<base-info-form ref="baseInfoForm" :flowInitType="flowInitType"></base-info-form>
|
||||
<!-- 标准文本 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.standardText')">
|
||||
{{ $t('workCenter.enStandardRevision.standardText') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<div class="online-edit-wrapper">
|
||||
<!-- todo: 还不确定这里展示的是什么 -->
|
||||
<p>企业标准</p>
|
||||
<a-button type="primary">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button>
|
||||
</div>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 其他起草人 -->
|
||||
<!-- 添加其他起草人 -->
|
||||
<p>{{ $t('workCenter.enStandardRevision.addOtherDrafter') }}</p>
|
||||
<!-- 操作区域 -->
|
||||
<div v-if="!disabled" class="table-operator">
|
||||
<!-- 新增 -->
|
||||
<a-button icon="plus" type="primary" @click="handleAdd" :disabled="disabled">
|
||||
{{ $t('newlyAdded') }}
|
||||
</a-button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<j-table
|
||||
:can-drag="true"
|
||||
:scroll="{x: '100%'}"
|
||||
ref="table"
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="false"
|
||||
:loading="loading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}">
|
||||
|
||||
<!-- 操作栏 -->
|
||||
<div slot="action" slot-scope="{record, index}" class="action-span-cell">
|
||||
<a @click="handleEdit(record, index)" class="table-ope-btn" :disabled="disabled">{{ $t('edit') }}</a>
|
||||
<a-divider type="vertical" />
|
||||
<a @click="handleDelete(record.id, index)" class="table-ope-btn" :disabled="disabled">{{ $t('delete') }}</a>
|
||||
</div>
|
||||
|
||||
</j-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JTable from '@/components/jero/JTable'
|
||||
import BaseInfoForm from './BaseInfoForm'
|
||||
|
||||
export default {
|
||||
name: 'MainDrafterSentBaseInfo',
|
||||
components: { BaseInfoForm, JTable },
|
||||
props: {
|
||||
// 流程发起类型,是自动发起(auto)的还是从新建流程发起的(newProcess)
|
||||
flowInitType: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
disabled: false,
|
||||
data: {}, // 初始化获取的数据
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
this.data = data
|
||||
// 给表格赋值,在线编辑不知道要怎么赋值?
|
||||
// this.dataSource =
|
||||
// 给表单赋值
|
||||
this.$nextTick(() => {
|
||||
// this.$refs.baseInfoForm.formInline =
|
||||
})
|
||||
},
|
||||
// 外层要获取数据
|
||||
getData () {
|
||||
// 把数据抛出,在线编辑不知道要不要抛
|
||||
const data = {}
|
||||
data.dataSource = this.dataSource
|
||||
data.formInline = this.$refs.baseInfoForm.formInline
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
getDataValidate () {
|
||||
if (this.dataSource && this.dataSource.length > 0) {
|
||||
// 有数据可以抛出
|
||||
const data = {}
|
||||
data.dataSource = this.dataSource
|
||||
data.formInline = this.$refs.baseInfoForm.formInline
|
||||
return data
|
||||
} else {
|
||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||
return false
|
||||
}
|
||||
},
|
||||
handleAdd () {}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
.collapsible-content-no-head {
|
||||
border-top: 1px solid #E5E6EB;
|
||||
border-radius: 8px 8px 8px 8px;
|
||||
}
|
||||
|
||||
.online-edit-wrapper {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
p {
|
||||
margin-bottom: 0;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user