update 导入拆分结果,国内海外标准细节调整
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
<a-col :md="6" :sm="8">
|
||||
<span style="float: left;overflow: hidden;" 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">
|
||||
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 8px" v-has="'split:sarFileSplitInfo:search'">
|
||||
{{ $t('query') }}
|
||||
</a-button>
|
||||
</span>
|
||||
@@ -86,25 +86,23 @@
|
||||
</div>
|
||||
|
||||
<!--拆分已入库文本弹框-->
|
||||
<split-text ref="splitText" @visible="splitTextVisible"></split-text>
|
||||
<!--导入拆分结果弹框-->
|
||||
<import-result ref="importResult" @visible="importResultVisible"></import-result>
|
||||
<split-text ref="splitText" @ok="modalFormOk" />
|
||||
<!--导入拆分结果-->
|
||||
<import-split-result-modal ref="importResultModal" @ok="modalFormOk" />
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import '../../../assets/less/common.less'
|
||||
import JTable from '../../../components/jero/JTable.vue'
|
||||
// 拆分已入库文本弹框
|
||||
import SplitText from './modules/SplitText.vue'
|
||||
// 导入拆分结果弹框
|
||||
import ImportResult from '../modules/ImportResult.vue'
|
||||
import { JeroListMixin } from '../../../mixins/JeroListMixin.js'
|
||||
import { releaseSplitStandard } from '../../../api/documentToolApi.js'
|
||||
import ImportSplitResultModal from './modules/ImportSplitResultModal.vue'
|
||||
|
||||
export default {
|
||||
name: 'DocumentSplit',
|
||||
components: { JTable, SplitText, ImportResult },
|
||||
components: { JTable, SplitText, ImportSplitResultModal },
|
||||
mixins: [JeroListMixin],
|
||||
data () {
|
||||
return {
|
||||
@@ -113,25 +111,25 @@ export default {
|
||||
{
|
||||
text: this.$t('release'),
|
||||
clickEvent: 'handleRelease',
|
||||
has: ''
|
||||
has: 'split:sarFileSplitInfo:release'
|
||||
},
|
||||
// 查看
|
||||
{
|
||||
text: this.$t('view'),
|
||||
clickEvent: 'handleDetail',
|
||||
has: ''
|
||||
has: 'split:sarFileSplitItems:page'
|
||||
},
|
||||
// 编辑
|
||||
{
|
||||
text: this.$t('edit'),
|
||||
clickEvent: 'handleEdit',
|
||||
has: ''
|
||||
has: 'split:sarFileSplitItems:edit'
|
||||
},
|
||||
// 删除
|
||||
{
|
||||
text: this.$t('delete'),
|
||||
clickEvent: 'handleDelete',
|
||||
has: ''
|
||||
has: 'split:sarFileSplitInfo:delete'
|
||||
}
|
||||
],
|
||||
columns: [
|
||||
@@ -210,7 +208,7 @@ export default {
|
||||
},
|
||||
// 导入拆分结果
|
||||
handleExport () {
|
||||
this.$refs.importResult.open()
|
||||
this.$refs.importResultModal.open()
|
||||
},
|
||||
/**
|
||||
* 发布
|
||||
@@ -234,7 +232,7 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 表格操作列的查看
|
||||
// 编辑
|
||||
handleEdit (record) {
|
||||
this.$router.push({
|
||||
path: '/documentTool/DocumentSplitDetail',
|
||||
@@ -246,6 +244,10 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 表格操作列的查看
|
||||
* @param record
|
||||
*/
|
||||
handleDetail (record) {
|
||||
this.$openPageNewSheet({
|
||||
path: '/documentTool/StandardSplitSheet'
|
||||
|
||||
@@ -87,20 +87,21 @@
|
||||
<search ref="searchRef"
|
||||
:url="url"
|
||||
:get-query-condition-func="getQueryConditionFunc"
|
||||
search-has="domesticStandard:search"
|
||||
search-has="split:sarFileSplitItems:search"
|
||||
@search="searchQuery"
|
||||
@reset="searchReset" />
|
||||
</div>
|
||||
<!--操作按钮-->
|
||||
<div class="table-operator">
|
||||
<!--新增-->
|
||||
<a-button icon="plus" type="primary" @click="handleAdd" v-has="'domesticStandard:add'">{{ $t('newlyAdded') }}</a-button>
|
||||
<a-button icon="plus" type="primary" @click="handleAdd" v-has="'split:sarFileSplitItems:add'">{{ $t('newlyAdded') }}</a-button>
|
||||
<!--导入-->
|
||||
<a-upload name="file"
|
||||
:showUploadList="false"
|
||||
:multiple="false"
|
||||
:headers="tokenHeader"
|
||||
:action="importExcelUrl"
|
||||
v-has="'split:sarFileSplitItems:import'"
|
||||
@change="handleImportExcel">
|
||||
<a-button type="primary" icon="download" ghost>{{ $t('import') }}</a-button>
|
||||
</a-upload>
|
||||
@@ -108,24 +109,32 @@
|
||||
<a-button icon="upload"
|
||||
type="primary"
|
||||
ghost
|
||||
v-has="'split:sarFileSplitItems:export'"
|
||||
@click="handleExportXls($t('standardRegulationLibrary.domesticStandard.exportFileName'))">
|
||||
{{ $t('export') }}
|
||||
</a-button>
|
||||
<!--批量删除-->
|
||||
<a-button type="primary" icon="delete" ghost @click="batchDel" v-has="'domesticStandard:batchDel'">{{ $t('batchDelete') }}</a-button>
|
||||
<a-button type="primary" icon="delete" ghost @click="batchDel" v-has="'split:sarFileSplitItems:delete'">{{ $t('batchDelete') }}</a-button>
|
||||
<!--模板下载-->
|
||||
<a-button type="primary"
|
||||
icon="download"
|
||||
ghost
|
||||
v-has="'split:sarFileSplitItems:template'"
|
||||
@click="downTemplate($t('standardRegulationLibrary.domesticStandard.templateName'))">
|
||||
{{ $t('templateDownload') }}
|
||||
</a-button>
|
||||
<!--批量复制-->
|
||||
<a-button type="primary" ghost @click="handleCopyManage">{{ $t('docTool.split.batchCopy') }}</a-button>
|
||||
<a-button type="primary" ghost @click="handleCopyManage" v-has="'split:sarFileSplitItems:copy'">
|
||||
{{ $t('docTool.split.batchCopy') }}
|
||||
</a-button>
|
||||
<!--批量编辑-->
|
||||
<a-button type="primary" ghost @click="handleManage">{{ $t('docTool.split.batchEdit') }}</a-button>
|
||||
<a-button type="primary" ghost @click="handleManage" v-has="'split:sarFileSplitItems:batchUpdate'">
|
||||
{{ $t('docTool.split.batchEdit') }}
|
||||
</a-button>
|
||||
<!--合并条款-->
|
||||
<a-button type="primary" ghost @click="handleMergeManage">{{ $t('docTool.split.mergerClause') }}</a-button>
|
||||
<a-button type="primary" ghost @click="handleMergeManage" v-has="'split:sarFileSplitItems:merge'">
|
||||
{{ $t('docTool.split.mergerClause') }}
|
||||
</a-button>
|
||||
</div>
|
||||
<div>
|
||||
<j-table
|
||||
@@ -137,17 +146,9 @@
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:pagination="ipagination"
|
||||
:scroll="{x: '100%'}"
|
||||
:operation-list="operationList"
|
||||
@change="tableOnChange">
|
||||
|
||||
<template slot="operation" slot-scope="{text, record}">
|
||||
<a v-for="(operation, index) in operationList" :key="index" @click="operationClick(operation,record)">
|
||||
<!-- v-has="operation.has"-->
|
||||
<span class="text">
|
||||
{{ operation.text }}
|
||||
</span>
|
||||
</a>
|
||||
</template>
|
||||
|
||||
<!-- 详情-->
|
||||
<template slot="detailClick" slot-scope="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
@@ -248,11 +249,13 @@ export default {
|
||||
operationList: [
|
||||
{
|
||||
text: this.$t('edit'),
|
||||
ClickEvent: 'handleEdit'
|
||||
clickEvent: 'handleEdit',
|
||||
has: 'split:sarFileSplitItems:update'
|
||||
},
|
||||
{
|
||||
text: this.$t('delete'),
|
||||
ClickEvent: 'handleDelete'
|
||||
clickEvent: 'handleDelete',
|
||||
has: 'split:sarFileSplitItems:delete'
|
||||
}
|
||||
],
|
||||
url: {
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="$t('docTool.split.importResults')"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
switchFullscreen
|
||||
:maskClosable="false"
|
||||
:confirmLoading="confirmLoading"
|
||||
:ok-text="$t('docTool.split.split')"
|
||||
:cancel-text="$t('cancel')"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel">
|
||||
|
||||
<a-form :form="form">
|
||||
<!--标准号-->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardSelect.standardNumber')">
|
||||
<standard-selection :placeholder="$t('pleaseSelect') + $t('standardSelect.standardNumber')"
|
||||
v-decorator="['projectSource', validatorRules.projectSource]" />
|
||||
</a-form-item>
|
||||
<!--标准名称-->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardSelect.standardName')">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('standardSelect.standardName')"
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
:maxLength="50"
|
||||
v-decorator="['projectName', validatorRules.projectName]" />
|
||||
</a-form-item>
|
||||
<!--文本状态-->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('docTool.comparison.textStatus')">
|
||||
<j-dict-select-tag v-decorator="['projectSource', validatorRules.projectSource]"
|
||||
dict-code="process_manuscript"
|
||||
:placeholder="$t('pleaseSelect') + $t('docTool.comparison.textStatus')" />
|
||||
</a-form-item>
|
||||
<!--拆分结果文件-->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('docTool.split.splitResultFile')">
|
||||
<j-upload v-decorator="['resultFileId', validatorRules.resultFileId]" class="line-btn" />
|
||||
<a-button class="line-btn">{{ $t('templateDownload') }}</a-button>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
|
||||
<div class="tip">
|
||||
<a-icon type="exclamation-circle" class="tip-icon" />
|
||||
<span>{{ $t('docTool.split.splitImportResultTip') }}</span>
|
||||
<span class="tip-click" @click="showTips">{{ $t('docTool.split.clickToView') }}</span>
|
||||
</div>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import StandardSelection from '../../../../components/selection/StandardSelection.vue'
|
||||
|
||||
export default {
|
||||
name: 'ImportSplitResultModal',
|
||||
components: { StandardSelection },
|
||||
data () {
|
||||
return {
|
||||
width: 600,
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
form: this.$form.createForm(this),
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 6 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 }
|
||||
},
|
||||
validatorRules: {
|
||||
// 项目来源
|
||||
projectSource: {
|
||||
rules: [{ required: false, message: this.$t('pleaseSelect') + this.$t('standardRegulationLibrary.nodeName') }],
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
// 项目名称
|
||||
projectName: {
|
||||
rules: [{ required: true, message: this.$t('pleaseEnter') + this.$t('projectLibrary.projectName') }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
// 工作令编号
|
||||
workNumber: {
|
||||
rules: [{ required: false, message: this.$t('pleaseEnter') + this.$t('projectLibrary.workOrderNumber') }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
// 项目负责人
|
||||
projectLeader: {
|
||||
rules: [{ required: false, message: this.$t('pleaseSelect') + this.$t('projectLibrary.vehicleItemLibrary.projectLeader') }],
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
// 项目健康度
|
||||
projectHealth: {
|
||||
rules: [{ required: false, message: this.$t('pleaseSelect') + this.$t('projectLibrary.projectHealthStatus') }],
|
||||
validateTrigger: 'change'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open () {
|
||||
this.visible = true
|
||||
},
|
||||
handleOk () {
|
||||
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
close () {
|
||||
this.visible = false
|
||||
},
|
||||
showTips () {
|
||||
this.$info({
|
||||
closeable: true, // 展示右上角关闭
|
||||
cancelText: this.$t('docTool.split.gotIt'),
|
||||
title: this.$t('docTool.split.formatRequirement'),
|
||||
content: (h) => {
|
||||
const contentArr = [this.$t('docTool.split.formatRequirementContentOne'), this.$t('docTool.split.formatRequirementContentTwo'), this.$t('docTool.split.formatRequirementContentThree'), this.$t('docTool.split.formatRequirementContentFour')]
|
||||
const contentDomArr = []
|
||||
for (const content of contentArr) {
|
||||
console.log(content)
|
||||
contentDomArr.push(h('div', {}, content))
|
||||
}
|
||||
return contentDomArr
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.line-btn {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.line-btn:last-child {
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
.tip {
|
||||
margin: 0 42px;
|
||||
|
||||
&-icon {
|
||||
color: @primary-color;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
&-click {
|
||||
color: @primary-color;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -143,12 +143,10 @@ export default {
|
||||
// 抽屉关闭
|
||||
onClose () {
|
||||
this.visible = false
|
||||
this.$emit('visible', false)
|
||||
},
|
||||
// 取消
|
||||
cancelSplit () {
|
||||
this.visible = false
|
||||
this.$emit('visible', false)
|
||||
},
|
||||
// 拆分
|
||||
submitSplit () {
|
||||
@@ -166,14 +164,15 @@ export default {
|
||||
const nameSuffix = name[name.length - 1]
|
||||
if (nameSuffix.toLowerCase() === 'doc' || nameSuffix.toLowerCase() === 'docx') {
|
||||
const params = {
|
||||
id: file.id
|
||||
fileId: file.id,
|
||||
id: '2'
|
||||
}
|
||||
this.loading = true
|
||||
addDocSplit(params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.visible = false
|
||||
this.$emit('visible', false, 1)
|
||||
this.$emit('ok')
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user