update 树节点修改,标准分解单样式调整
This commit is contained in:
@@ -0,0 +1,241 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:title="$t('docTool.split.splitText')"
|
||||
placement="right"
|
||||
:visible="visible"
|
||||
@close="onClose"
|
||||
width="1100"
|
||||
class="custom-drawer-style">
|
||||
<div class="custom-drawer-style-scroll">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<!--来源-->
|
||||
<a-col :md="8" :sm="12">
|
||||
<a-form-item :label="$t('standardSelect.source')">
|
||||
<j-dict-select-tag
|
||||
class="box-input"
|
||||
v-model="queryParam.projectHealth"
|
||||
:placeholder="$t('pleaseSelect') + $t('standardSelect.source')"
|
||||
:type="'select'"
|
||||
:triggerChange="false"
|
||||
:dictCode="'project_health'" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--标准号-->
|
||||
<a-col :md="8" :sm="12">
|
||||
<a-form-item :label="$t('standardSelect.standardNumber')">
|
||||
<j-input :placeholder="$t('pleaseEnter') + $t('standardSelect.standardNumber')" v-model="queryParam.projectName"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--标准名称-->
|
||||
<a-col :md="8" :sm="12">
|
||||
<a-form-item :label="$t('standardSelect.standardName')">
|
||||
<j-input :placeholder="$t('pleaseEnter') + $t('standardSelect.standardName')" v-model="queryParam.projectName"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--文本状态-->
|
||||
<a-col :md="8" :sm="12">
|
||||
<a-form-item :label="$t('docTool.comparison.textStatus')">
|
||||
<j-dict-select-tag
|
||||
class="box-input"
|
||||
v-model="queryParam.projectHealth"
|
||||
:placeholder="$t('pleaseSelect') + $t('docTool.comparison.textStatus')"
|
||||
:type="'select'"
|
||||
:triggerChange="false"
|
||||
:dictCode="'project_health'" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
<div class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchReset" icon="reload" ghost>{{ $t('reset') }}</a-button>
|
||||
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 8px">
|
||||
{{ $t('query') }}
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
<j-table
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:can-drag="true"
|
||||
rowKey="id"
|
||||
:loading="loading"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio' }"
|
||||
:pagination="ipagination"
|
||||
@change="handleTableChange">
|
||||
</j-table>
|
||||
</div>
|
||||
<div class="custom-drawer-style-bottom-btn">
|
||||
<a-button @click="cancelSplit" style='margin-right: 15px'>{{ $t('cancel') }}</a-button>
|
||||
<a-button type="primary" :loading="loading" @click="submitSplit">{{ $t('docTool.split.split') }}</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JTable from '../../../../components/jero/JTable.vue'
|
||||
import { postAction, httpAction } from '../../../../api/manage.js'
|
||||
import { JeroListMixin } from '../../../../mixins/JeroListMixin.js'
|
||||
import { addDocSplit } from '../../../../api/documentToolApi.js'
|
||||
|
||||
export default {
|
||||
name: 'SplitText',
|
||||
components: { JTable },
|
||||
mixins: [JeroListMixin],
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
loading: false,
|
||||
fileGroup: '',
|
||||
selectedRowKeys: [],
|
||||
selectedRows: [],
|
||||
queryParam: {},
|
||||
labelCol: {
|
||||
span: 6
|
||||
},
|
||||
wrapperCol: {
|
||||
span: 14
|
||||
},
|
||||
columns: [
|
||||
// 资料类型
|
||||
{
|
||||
dataIndex: '1',
|
||||
title: this.$t('docTool.split.dataType'),
|
||||
width: 150
|
||||
},
|
||||
// 标准号
|
||||
{
|
||||
dataIndex: 'serial_number',
|
||||
title: this.$t('standardSelect.standardNumber'),
|
||||
width: 150
|
||||
},
|
||||
// 标准名称
|
||||
{
|
||||
dataIndex: 'title',
|
||||
title: this.$t('standardSelect.standardName'),
|
||||
width: 150
|
||||
},
|
||||
// 文件状态
|
||||
{
|
||||
dataIndex: 'text_info',
|
||||
title: this.$t('docTool.split.fileStatus'),
|
||||
width: 150
|
||||
},
|
||||
// 附件
|
||||
{
|
||||
dataIndex: 'file_name',
|
||||
title: this.$t('businessSupport.questionAnswer.attach'),
|
||||
width: 150
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: '/split/sarFileSplitInfo/splitFilePageInfo', // 表格数据
|
||||
addSplit: '/split/sarFileSplitInfo/add'
|
||||
},
|
||||
type: 'pdfdoc',
|
||||
operationList: [],
|
||||
showAction: false,
|
||||
flag: 'header',
|
||||
disableMixinCreated: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open () {
|
||||
this.visible = true
|
||||
this.loadData()
|
||||
},
|
||||
// 抽屉关闭
|
||||
onClose () {
|
||||
this.visible = false
|
||||
this.$emit('visible', false)
|
||||
},
|
||||
loadData (arg) {
|
||||
if (!this.url.list) {
|
||||
this.$message.error('请设置url.list属性!')
|
||||
return
|
||||
}
|
||||
// 加载数据 若传入参数1则加载第一页的内容
|
||||
if (arg === 1) {
|
||||
this.ipagination.current = 1
|
||||
}
|
||||
const params = this.getQueryParams()// 查询条件
|
||||
this.loading = true
|
||||
postAction(this.url.list, params).then((res) => {
|
||||
if (res.success) {
|
||||
// update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||
this.dataSource = res.result.records || res.result
|
||||
if (res.result.total) {
|
||||
this.ipagination.total = res.result.total
|
||||
} else {
|
||||
this.ipagination.total = 0
|
||||
}
|
||||
// update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 取消
|
||||
cancelSplit () {
|
||||
this.visible = false
|
||||
this.$emit('visible', false)
|
||||
},
|
||||
// 拆分
|
||||
submitSplit () {
|
||||
if (this.loading) {
|
||||
return
|
||||
}
|
||||
if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) {
|
||||
this.$message.warning(this.$t('selectOne'))
|
||||
return
|
||||
}
|
||||
const file = this.selectedRows[0]
|
||||
if (file.file_name) {
|
||||
const name = file.file_name.split('.')
|
||||
const nameSuffix = name[name.length - 1]
|
||||
if (nameSuffix.toLowerCase() === 'doc' || nameSuffix.toLowerCase() === 'docx') {
|
||||
const params = {
|
||||
attId: file.id,
|
||||
title: file.title,
|
||||
titleEn: file.title_en,
|
||||
fileName: file.file_name,
|
||||
serialNumber: file.serial_number,
|
||||
connectId: file.connect_id,
|
||||
fileGroup: this.fileGroup,
|
||||
fileType: file.text_info_id
|
||||
}
|
||||
this.loading = true
|
||||
addDocSplit(params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.visible = false
|
||||
this.$emit('visible', false, 1)
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(this.$t('docTool.split.onlyWord'))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~../../../../assets/less/common.less';
|
||||
|
||||
.table-page-search-wrapper {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.table-page-search-submitButtons {
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user