[update] 表格拖拽换j-table
This commit is contained in:
@@ -45,20 +45,20 @@
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a-table
|
||||
<j-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
:components="drag(columns,'columns')"
|
||||
:columns="columns"
|
||||
:data-source="dataSource"
|
||||
rowKey="id"
|
||||
:can-drag="true"
|
||||
:loading="loading"
|
||||
:pagination="ipagination"
|
||||
:scroll="{x: '100%',y:'calc(100vh - 280px)'}"
|
||||
rowKey="id"
|
||||
:data-source="dataSource"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:columns="columns"
|
||||
@change="tableOnChange"
|
||||
@change="handleTableChange"
|
||||
>
|
||||
<span slot="operation" slot-scope="text,record">
|
||||
<template v-slot:operation="{text,record}">
|
||||
<a class="text-operation" @click="comparisonResultsClick(record)">{{$t('docTool.comparison.comparisonResults')}}</a>
|
||||
<a class="text-operation"
|
||||
v-if="record.createBy === userInfoQuery.username || administrators"
|
||||
@@ -71,28 +71,29 @@
|
||||
<a class="text-operation"
|
||||
v-if="(record.createBy === userInfoQuery.username || administrators) && record.releaseState === 'draft'"
|
||||
@click="deleteData(record)">{{$t('delete')}}</a>
|
||||
</span>
|
||||
<span slot="serialNumberRight" :title="text" slot-scope="text,record">
|
||||
<a @click="serialNumberRightClick(record)">{{text}}</a>
|
||||
</span>
|
||||
<span slot="serialNumberLeft" :title="text" slot-scope="text,record">
|
||||
<a @click="serialNumberLeftClick(record)">{{text}}</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</template>
|
||||
<template v-slot:serialNumberRight="{text,record}">
|
||||
<a @click="serialNumberRightClick(record)" :title="text">{{text}}</a>
|
||||
</template>
|
||||
<template v-slot:serialNumberLeft="{text,record}">
|
||||
<a @click="serialNumberLeftClick(record)" :title="text">{{text}}</a>
|
||||
</template>
|
||||
</j-table>
|
||||
</div>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction, deleteAction } from '@/api/manage'
|
||||
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
|
||||
import { postAction, deleteAction } from '@/api/manage'
|
||||
import { mapGetters } from 'vuex'
|
||||
import JDictSelectTag from '../../components/dict/JDictSelectTag'
|
||||
import JDictSelectTag from '@/components/dict/JDictSelectTag'
|
||||
import JTable from '@/components/jero/JTable'
|
||||
import { JeroListMixin } from '../../mixins/JeroListMixin'
|
||||
|
||||
export default {
|
||||
name: 'DocumentComparison',
|
||||
mixins: [ResizeHeader, ResizeColumnProvide],
|
||||
components: { JDictSelectTag },
|
||||
components: { JDictSelectTag, JTable },
|
||||
mixins: [JeroListMixin],
|
||||
data () {
|
||||
return {
|
||||
// url传参严格按照当前命名
|
||||
@@ -103,7 +104,7 @@ export default {
|
||||
loading: false,
|
||||
dataSource: [],
|
||||
selectedRowKeys: [],
|
||||
selectedRows: [],
|
||||
selectionRows: [],
|
||||
downLoadFileUrl: window._CONFIG.domianPreviewURL + '/sys/common/download',
|
||||
downLoadImgUrl: window._CONFIG.domianWebImgURL + '/sys/common/download',
|
||||
/* 分页参数 */
|
||||
@@ -213,50 +214,12 @@ export default {
|
||||
}
|
||||
})
|
||||
}
|
||||
this.getList()
|
||||
this.loadData(1)
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
searchQuery () {
|
||||
this.ipagination.current = 1
|
||||
this.getList()
|
||||
},
|
||||
searchReset () {
|
||||
this.queryParam = {}
|
||||
this.ipagination.current = 1
|
||||
this.getList()
|
||||
},
|
||||
tableOnChange (pagination) {
|
||||
this.ipagination = pagination
|
||||
this.getList()
|
||||
},
|
||||
getList () {
|
||||
this.dataSource = [{ id: 1, serialNumberLeft: '11' }]
|
||||
// const queryParam = JSON.parse(JSON.stringify(this.queryParam))
|
||||
// Object.keys(queryParam).forEach(val => {
|
||||
// if (queryParam[val] instanceof Array) {
|
||||
// queryParam[val] = queryParam[val].join(',')
|
||||
// }
|
||||
// })
|
||||
// const query = {
|
||||
// pageNo: this.ipagination.current,
|
||||
// pageSize: this.ipagination.pageSize,
|
||||
// ...queryParam
|
||||
// }
|
||||
// this.loading = true
|
||||
// getAction(this.url.list, query).then((res) => {
|
||||
// if (res.success) {
|
||||
// if (res.result.current > 1 && res.result.records.length === 0) {
|
||||
// this.ipagination.current = 1
|
||||
// this.getList()
|
||||
// return
|
||||
// }
|
||||
// this.dataSource = res.result.records || []
|
||||
// this.ipagination.total = res.result.total
|
||||
// }
|
||||
// }).finally(() => {
|
||||
// this.loading = false
|
||||
// })
|
||||
},
|
||||
batchDelete () {
|
||||
if (this.selectedRowKeys.length > 0) {
|
||||
@@ -264,11 +227,11 @@ export default {
|
||||
content: this.$t('confirmBatchDeletion'),
|
||||
onOk: () => {
|
||||
const idList = []
|
||||
const selectedRows = JSON.parse(JSON.stringify(this.selectedRows))
|
||||
for (let i = 0; i < selectedRows.length; i++) {
|
||||
if (selectedRows[i].createBy === this.userInfoQuery.username &&
|
||||
selectedRows[i].releaseState === 'draft') {
|
||||
idList.push(selectedRows[i].id)
|
||||
const selectionRows = JSON.parse(JSON.stringify(this.selectionRows))
|
||||
for (let i = 0; i < selectionRows.length; i++) {
|
||||
if (selectionRows[i].createBy === this.userInfoQuery.username &&
|
||||
selectionRows[i].releaseState === 'draft') {
|
||||
idList.push(selectionRows[i].id)
|
||||
}
|
||||
}
|
||||
if (idList.length > 0) {
|
||||
@@ -290,10 +253,6 @@ export default {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
onSelectChange (value, record) {
|
||||
this.selectedRowKeys = value
|
||||
this.selectedRows = record
|
||||
},
|
||||
// 对比结果按钮点击
|
||||
comparisonResultsClick (item) {
|
||||
if (item.createBy === this.userInfoQuery.username && item.releaseState === 'draft') {
|
||||
|
||||
@@ -21,17 +21,47 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="splitting-table">
|
||||
<table-data
|
||||
:url="url"
|
||||
:flag="'3'"
|
||||
:operationList="operationList"
|
||||
showAction
|
||||
ref="tableData"
|
||||
@onSelectChange="onSelectChange"
|
||||
@backDocument="backDocument"
|
||||
@deleteDetail="deleteDetail"
|
||||
@detailClick="detailClick"
|
||||
></table-data>
|
||||
<j-table
|
||||
v-if="columns && columns.length > 0"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:can-drag="true"
|
||||
rowKey="id"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:pagination="ipagination"
|
||||
:scroll="{x: '100%'}"
|
||||
@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">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<a class="table-text textName" @click="detailClick(record)" v-if="text || text === 0">{{ text }}</a>
|
||||
<div class="table-text" v-else>{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
</j-table>
|
||||
<!-- <table-data-->
|
||||
<!-- :url="url"-->
|
||||
<!-- :flag="'3'"-->
|
||||
<!-- :operationList="operationList"-->
|
||||
<!-- showAction-->
|
||||
<!-- ref="tableData"-->
|
||||
<!-- @onSelectChange="onSelectChange"-->
|
||||
<!-- @backDocument="backDocument"-->
|
||||
<!-- @deleteDetail="deleteDetail"-->
|
||||
<!-- @detailClick="detailClick"-->
|
||||
<!-- ></table-data>-->
|
||||
</div>
|
||||
<split-text ref="splitText" @visible="splitTextVisible"></split-text>
|
||||
<import-result ref="importResult" @visible="importResultVisible"></import-result>
|
||||
@@ -40,16 +70,18 @@
|
||||
|
||||
<script>
|
||||
import Search from '@/components/customField/Search'
|
||||
import TableData from '@/components/customField/TableData'
|
||||
import JTable from '@/components/jero/JTable'
|
||||
// 拆分已入库文本弹框
|
||||
import SplitText from './modules/SplitText'
|
||||
// 导入拆分结果弹框
|
||||
import ImportResult from './modules/ImportResult'
|
||||
import { httpAction, getAction } from '../../api/manage'
|
||||
import { httpAction, getAction } from '@/api/manage'
|
||||
import { ConfigurableTableMixin } from '@/mixins/ConfigurableTableMixin'
|
||||
|
||||
export default {
|
||||
name: 'DocumentSplit',
|
||||
components: { Search, TableData, SplitText, ImportResult },
|
||||
components: { Search, JTable, SplitText, ImportResult },
|
||||
mixins: [ConfigurableTableMixin],
|
||||
data () {
|
||||
return {
|
||||
selectedRowKeys: [],
|
||||
@@ -73,11 +105,13 @@ export default {
|
||||
url: {
|
||||
tableHeader: 'split/sarFileSplitInfo/getHeader', // 表格头部字段
|
||||
searchList: 'split/sarFileSplitInfo/queryCondition', // 搜索字段
|
||||
tableList: 'split/sarFileSplitInfo/page', // 表格数据
|
||||
list: 'split/sarFileSplitInfo/page', // 表格数据
|
||||
deleteBatch: '', // 批量删除
|
||||
deleteUrl: '',
|
||||
backDocument: '' // 回传至文档库
|
||||
}
|
||||
},
|
||||
showAction: true,
|
||||
flag: '3'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -114,6 +148,11 @@ export default {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
operationClick (operation, record) {
|
||||
if (this[operation.clickEvent]) {
|
||||
this[operation.clickEvent](record)
|
||||
}
|
||||
},
|
||||
// 表格操作列的删除
|
||||
deleteDetail (val) {
|
||||
this.$confirm({
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
<template>
|
||||
<a-modal
|
||||
:title="title"
|
||||
:width="600"
|
||||
:visible="visible"
|
||||
:confirm-loading="confirmLoading"
|
||||
:maskClosable="false"
|
||||
@cancel="visible = false"
|
||||
>
|
||||
<template slot="footer">
|
||||
<a-button key="back" @click="visible = false">
|
||||
{{$t('cancel')}}
|
||||
</a-button>
|
||||
<a-button type="primary" :loading="confirmLoading" @click="fullTextCommentsSubmit">
|
||||
{{$t('submit')}}
|
||||
</a-button>
|
||||
</template>
|
||||
<a-form-model :model="formInlineText" class="formAdd" :rules="rulesText" ref="ruleFormText">
|
||||
<div class="box-title-text" v-if="title === $t('docTool.comparison.fullTextComments')">
|
||||
<div class="title-text" :title="$t('docTool.comparison.fullTextComments')">
|
||||
<span class="title-text-text">{{$t('docTool.comparison.fullTextComments')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" style="width: calc(100% - 113px)" prop="comment">
|
||||
<a-textarea :placeholder="$t('pleaseEnter') + $t('docTool.comparison.fullTextComments')"
|
||||
v-model.trim="formInlineText.comment"
|
||||
:maxLength="500"
|
||||
:rows="4"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<div class="box-title-text" v-if="title === $t('docTool.comparison.comparativeComments')">
|
||||
<div class="title-text" :title="$t('docTool.comparison.comparativeComments')">
|
||||
<span class="title-text-text">{{$t('docTool.comparison.comparativeComments')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" style="width: calc(100% - 113px)" prop="comment">
|
||||
<a-textarea :placeholder="$t('pleaseEnter')+$t('docTool.comparison.comparativeComments')"
|
||||
v-model.trim="formInlineText.comment"
|
||||
:maxLength="500"
|
||||
:rows="4"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { putAction } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'ComparisonResultEditModal',
|
||||
data () {
|
||||
return {
|
||||
title: '',
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
formInlineText: {},
|
||||
rulesText: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open (form) {
|
||||
this.initData()
|
||||
this.visible = true
|
||||
this.formInlineText = Object.assign({}, form)
|
||||
},
|
||||
initData () {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ruleFormText.clearValidate()
|
||||
})
|
||||
},
|
||||
// 发表评论弹框的提交按钮点击
|
||||
fullTextCommentsSubmit () {
|
||||
this.$refs.ruleFormText.validate(valid => {
|
||||
if (valid) {
|
||||
if (this.title === this.$t('docTool.comparison.fullTextComments')) {
|
||||
this.fullTextComments()
|
||||
} else {
|
||||
this.comparaComments()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 全文评论提交
|
||||
fullTextComments () {
|
||||
this.confirmLoading = true
|
||||
const query = {
|
||||
id: this.$route.query.id,
|
||||
comments: this.formInlineText.comment
|
||||
}
|
||||
putAction('/compare/sarFileCompareInfo/editComments', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.visible = false
|
||||
this.$emit('ok')
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
}).finally(() => {
|
||||
this.confirmLoading = false
|
||||
})
|
||||
},
|
||||
// 发表评论提交
|
||||
comparaComments () {
|
||||
this.confirmLoading = true
|
||||
const query = {
|
||||
infoId: this.$route.query.id,
|
||||
id: this.formInlineText.id,
|
||||
comment: this.formInlineText.comment
|
||||
}
|
||||
putAction('/compare/sarFileCompareItemComment/edit', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.visible = false
|
||||
this.$emit('ok')
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
}).finally(() => {
|
||||
this.confirmLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import'~@assets/less/common.less';
|
||||
</style>
|
||||
@@ -141,48 +141,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a-modal
|
||||
:title="title"
|
||||
:width="600"
|
||||
:visible="visible"
|
||||
:confirm-loading="confirmLoading"
|
||||
:maskClosable="false"
|
||||
@cancel="visible = false"
|
||||
>
|
||||
<template slot="footer">
|
||||
<a-button key="back" @click="visible = false">
|
||||
{{$t('cancel')}}
|
||||
</a-button>
|
||||
<a-button type="primary" :loading="confirmLoading" @click="fullTextCommentsSubmit">
|
||||
{{$t('submit')}}
|
||||
</a-button>
|
||||
</template>
|
||||
<a-form-model :model="formInlineText" class="formAdd" :rules="rulesText" ref="ruleFormText">
|
||||
<div class="box-title-text-remarks" v-if="title === $t('docTool.comparison.fullTextComments')">
|
||||
<div class="title-text-remarks" :title="$t('docTool.comparison.fullTextComments')">
|
||||
<span>{{$t('docTool.comparison.fullTextComments')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" style="width: calc(100% - 113px)" prop="comment">
|
||||
<a-textarea :placeholder="$t('pleaseEnter') + $t('docTool.comparison.fullTextComments')"
|
||||
v-model.trim="formInlineText.comment"
|
||||
:maxLength="500"
|
||||
:rows="4"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<div class="box-title-text-remarks" v-if="title === $t('docTool.comparison.comparativeComments')">
|
||||
<div class="title-text-remarks" :title="$t('docTool.comparison.comparativeComments')">
|
||||
<span>{{$t('docTool.comparison.comparativeComments')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" style="width: calc(100% - 113px)" prop="comment">
|
||||
<a-textarea :placeholder="$t('pleaseEnter')+$t('docTool.comparison.comparativeComments')"
|
||||
v-model.trim="formInlineText.comment"
|
||||
:maxLength="500"
|
||||
:rows="4"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
<commentList ref="commentListRef"/>
|
||||
<comparison-result-edit-modal ref="comparisonResultEditModal" @ok="getData"></comparison-result-edit-modal>
|
||||
<div id="images">
|
||||
<div class="image" v-viewer="{movable: false}">
|
||||
<img v-show="image" :src="imageUrl">
|
||||
@@ -192,15 +152,16 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, downloadFile, deleteAction, putAction, getFileAccessHttpUrl } from '@/api/manage'
|
||||
import { getAction, downloadFile, deleteAction, getFileAccessHttpUrl } from '@/api/manage'
|
||||
import { previewPdf } from '@/utils/previewPdf'
|
||||
import { Base64 } from 'js-base64'
|
||||
import { mapGetters } from 'vuex'
|
||||
import CommentList from './CommentList'
|
||||
import ComparisonResultEditModal from './ComparisonResultEditModal'
|
||||
|
||||
export default {
|
||||
name: 'ComparisonResults',
|
||||
components: { CommentList },
|
||||
components: { CommentList, ComparisonResultEditModal },
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
@@ -208,13 +169,8 @@ export default {
|
||||
isVarianceOne: false,
|
||||
isVarianceTwo: false,
|
||||
isVarianceThe: false,
|
||||
confirmLoading: false,
|
||||
downLoadFileUrl: window._CONFIG.domianPreviewURL + '/sys/common/download',
|
||||
downLoadImgUrl: window._CONFIG.domianWebImgURL + '/sys/common/download',
|
||||
visible: false,
|
||||
formInlineText: {},
|
||||
rulesText: {},
|
||||
title: '',
|
||||
indeterminate: false,
|
||||
checkAll: false,
|
||||
isDisplay: false,
|
||||
@@ -367,76 +323,15 @@ export default {
|
||||
this.indeterminate = false
|
||||
}
|
||||
},
|
||||
// 发表评论弹框的提交按钮点击
|
||||
fullTextCommentsSubmit () {
|
||||
this.$refs.ruleFormText.validate(valid => {
|
||||
if (valid) {
|
||||
if (this.title === this.$t('docTool.comparison.fullTextComments')) {
|
||||
this.fullTextComments()
|
||||
} else {
|
||||
this.comparaComments()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 全文评论提交
|
||||
fullTextComments () {
|
||||
this.confirmLoading = true
|
||||
const query = {
|
||||
id: this.$route.query.id,
|
||||
comments: this.formInlineText.comment
|
||||
}
|
||||
putAction('/compare/sarFileCompareInfo/editComments', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.visible = false
|
||||
this.getData()
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
}).finally(() => {
|
||||
this.confirmLoading = false
|
||||
})
|
||||
},
|
||||
// 发表评论提交
|
||||
comparaComments () {
|
||||
this.confirmLoading = true
|
||||
const query = {
|
||||
infoId: this.$route.query.id,
|
||||
id: this.formInlineText.id,
|
||||
comment: this.formInlineText.comment
|
||||
}
|
||||
putAction('/compare/sarFileCompareItemComment/edit', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.visible = false
|
||||
this.getData()
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
}).finally(() => {
|
||||
this.confirmLoading = false
|
||||
})
|
||||
},
|
||||
// 全文评论编辑点击
|
||||
fullTextEdit (item) {
|
||||
this.visible = true
|
||||
this.title = this.$t('docTool.comparison.fullTextComments')
|
||||
this.formInlineText.comment = this.resultData.comments || ''
|
||||
this.formInlineText = { ...this.formInlineText }
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ruleFormText.clearValidate()
|
||||
})
|
||||
this.$refs.comparisonResultEditModal.title = this.$t('docTool.comparison.fullTextComments')
|
||||
this.$refs.comparisonResultEditModal.open({ comment: this.resultData.comments || '' })
|
||||
},
|
||||
// 对比结果编辑按钮点击
|
||||
comparaEdit (item) {
|
||||
this.visible = true
|
||||
this.title = this.$t('docTool.comparison.comparativeComments')
|
||||
this.formInlineText = JSON.parse(JSON.stringify(item))
|
||||
this.formInlineText = { ...this.formInlineText }
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ruleFormText.clearValidate()
|
||||
})
|
||||
this.$refs.comparisonResultEditModal.title = this.$t('docTool.comparison.comparativeComments')
|
||||
this.$refs.comparisonResultEditModal.open(item)
|
||||
},
|
||||
// 对比结果删除按钮点击
|
||||
comparaDelete (val) {
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
</span>
|
||||
</a-row>
|
||||
</a-form>
|
||||
<a-table
|
||||
<j-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
:components="drag(columns,'columns')"
|
||||
:can-drag="true"
|
||||
:loading="loadingLeft"
|
||||
:pagination="false"
|
||||
:scroll="{x: '100%',y:340}"
|
||||
@@ -46,7 +46,7 @@
|
||||
:columns="columns"
|
||||
@change="tableChangeLeft"
|
||||
>
|
||||
</a-table>
|
||||
</j-table>
|
||||
<div class="box-button-standard">
|
||||
<span class="box-button-standard-left" :title="$t('docTool.comparison.selectedStandard')">
|
||||
{{$t('docTool.comparison.selectedStandard')}}
|
||||
@@ -82,20 +82,20 @@
|
||||
</span>
|
||||
</a-row>
|
||||
</a-form>
|
||||
<a-table
|
||||
<j-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
:components="drag(columns,'columns')"
|
||||
:can-drag="true"
|
||||
:loading="loadingRight"
|
||||
:pagination="false"
|
||||
:scroll="{x: '100%',y:340}"
|
||||
rowKey="id"
|
||||
:data-source="dataSourceRight"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeysRight, onChange: onSelectChangeRight, columnTitle:' ', type: 'radio'}"
|
||||
:columns="columns"
|
||||
:columns="tableColumns"
|
||||
@change="tableChangeRight"
|
||||
>
|
||||
</a-table>
|
||||
</j-table>
|
||||
<div class="box-button-standard">
|
||||
<span class="box-button-standard-left" :title="$t('docTool.comparison.selectedStandard')">
|
||||
{{$t('docTool.comparison.selectedStandard')}}
|
||||
@@ -139,15 +139,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction, downloadFile, getFileAccessHttpUrl } from '@/api/manage'
|
||||
import JTable from '@/components/jero/JTable'
|
||||
import { getAction, downloadFile, getFileAccessHttpUrl } from '@/api/manage'
|
||||
import { previewPdf } from '@/utils/previewPdf'
|
||||
import { Base64 } from 'js-base64'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
|
||||
|
||||
export default {
|
||||
name: 'InitiateComparison',
|
||||
mixins: [ResizeHeader, ResizeColumnProvide],
|
||||
components: { JTable },
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
@@ -225,7 +225,7 @@ export default {
|
||||
width: 79
|
||||
},
|
||||
{
|
||||
title: this.$t('TextStatus'),
|
||||
title: this.$t('docTool.comparison.textStatus'),
|
||||
align: 'left',
|
||||
ellipsis: true,
|
||||
dataIndex: 'fileType',
|
||||
@@ -239,7 +239,7 @@ export default {
|
||||
width: 79
|
||||
}
|
||||
],
|
||||
tablecolumns: [
|
||||
tableColumns: [
|
||||
{
|
||||
title: this.$t('number'),
|
||||
align: 'left',
|
||||
@@ -263,7 +263,7 @@ export default {
|
||||
width: 79
|
||||
},
|
||||
{
|
||||
title: this.$t('TextStatus'),
|
||||
title: this.$t('docTool.comparison.textStatus'),
|
||||
align: 'left',
|
||||
ellipsis: true,
|
||||
dataIndex: 'fileType',
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model="formInline[item.db_field_name]"
|
||||
:placeholder="$t('PleaseEnter')+item.db_field_txt"/>
|
||||
:placeholder="$t('pleaseEnter')+item.db_field_txt"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<div class="box-title-text" v-else-if="item.field_show_type === '2'">
|
||||
@@ -36,7 +36,7 @@
|
||||
</div>
|
||||
<a-form-model-item class="item-model" :prop="item.db_field_name">
|
||||
<a-input-number class="box-input"
|
||||
:placeholder="$t('PleaseEnter')+item.db_field_txt"
|
||||
:placeholder="$t('pleaseEnter')+item.db_field_txt"
|
||||
:disabled="disabled"
|
||||
:min="0"
|
||||
v-model="formInline[item.db_field_name]" :max="99999999"/>
|
||||
@@ -52,7 +52,7 @@
|
||||
<j-dict-select-tag class="box-input" v-model="formInline[item.db_field_name]"
|
||||
:disabled="disabled"
|
||||
@input="handleInput(item.db_field_name)"
|
||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||
:placeholder="$t('pleaseSelect')+item.db_field_txt"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="item.dict_field"/>
|
||||
</a-form-model-item>
|
||||
@@ -65,7 +65,7 @@
|
||||
<a-form-model-item class="item-model-multi" :prop="item.db_field_name">
|
||||
<j-multi-select-tag class="box-input" v-model="formInline[item.db_field_name]"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||
:placeholder="$t('pleaseSelect')+item.db_field_txt"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="item.dict_field"/>
|
||||
</a-form-model-item>
|
||||
@@ -117,7 +117,7 @@
|
||||
</div>
|
||||
<a-form-model-item class="item-model" :prop="item.db_field_name">
|
||||
<a-textarea
|
||||
:placeholder="$t('PleaseEnter')+item.db_field_txt"
|
||||
:placeholder="$t('pleaseEnter')+item.db_field_txt"
|
||||
:disabled="disabled"
|
||||
v-model="formInline[item.db_field_name]" :rows="4"/>
|
||||
</a-form-model-item>
|
||||
@@ -144,7 +144,7 @@
|
||||
:disabled="disabled"
|
||||
class="box-input"
|
||||
@input="handleInput(item.db_field_name)"
|
||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||
:placeholder="$t('pleaseSelect')+item.db_field_txt"
|
||||
:type="'radio'" :triggerChange="false" :dictCode="item.dict_field"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -162,7 +162,7 @@
|
||||
style="width: 100%"
|
||||
:tree-data="item.tree"
|
||||
tree-checkable
|
||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||
:placeholder="$t('pleaseSelect')+item.db_field_txt"
|
||||
@change="changeTree"
|
||||
/>
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
<a-form-model-item class="item-model-multi" :prop="item.db_field_name">
|
||||
<j-multi-select-tag class="box-input" v-model="formInline[item.db_field_name]"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||
:placeholder="$t('pleaseSelect')+item.db_field_txt"
|
||||
:type="'checkbox'"
|
||||
:triggerChange="false" :dictCode="item.dict_field"/>
|
||||
</a-form-model-item>
|
||||
@@ -253,14 +253,10 @@ export default {
|
||||
return {
|
||||
formTitle: '',
|
||||
title: this.$t('newClause'),
|
||||
titlePreImg: '',
|
||||
contentList: [],
|
||||
confirmLoading: false,
|
||||
visible: false,
|
||||
addIndex: '',
|
||||
disabled: false,
|
||||
splitVisible: false,
|
||||
itemSrc: '', // 预览图片
|
||||
formInline: {},
|
||||
isFormInline: false,
|
||||
dataList: [],
|
||||
@@ -272,7 +268,6 @@ export default {
|
||||
token: Vue.ls.get(ACCESS_TOKEN),
|
||||
submitFlag: false,
|
||||
deleteIds: [],
|
||||
numberFlag: false,
|
||||
itemVal: {},
|
||||
contentTrees: '',
|
||||
isTableEdit: false
|
||||
@@ -399,15 +394,10 @@ export default {
|
||||
.then((res) => {
|
||||
if (res.data.success) {
|
||||
this.loading = false
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.visible = false
|
||||
// this.$emit('closeVisible',false)
|
||||
const queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
|
||||
}
|
||||
this.$emit('sumber', queryParam)
|
||||
this.$emit('sumber')
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
@@ -505,10 +495,6 @@ export default {
|
||||
this.formInline[this.uploadName] = attIdList.join(',')
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
// 关闭上传
|
||||
closeHandle () {
|
||||
this.splitVisible = false
|
||||
},
|
||||
handleInput (value) {
|
||||
this.$nextTick(() => {
|
||||
this.formInline = { ...this.formInline }
|
||||
@@ -571,11 +557,11 @@ export default {
|
||||
this.$set(this, 'rules', rules)
|
||||
// console.log('rules',this.rules)
|
||||
this.isFormInline = true
|
||||
this.confirmLoading = false
|
||||
this.loading = false
|
||||
// console.log('this.column',this.column)
|
||||
},
|
||||
getForm (callBack) {
|
||||
this.confirmLoading = true
|
||||
this.loading = true
|
||||
const params = {
|
||||
flag: this.flag,
|
||||
type: this.type
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
<div class="div-right-wrapper">
|
||||
<div class="right-search-header table-page-search-wrapper">
|
||||
<search :flag="'4'" :url="url" :infoId="$route.query.infoId"
|
||||
:menuId="menuId" @resetSearch="resetSearch" @queryParams="queryParamsValues" />
|
||||
:menuId="menuId" @reset="searchReset" @search="searchQuery" />
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div class="operator-text" @click="handleCopyManage">
|
||||
@@ -84,7 +84,7 @@
|
||||
{{ $t('add') }}
|
||||
</div>
|
||||
<div class="operator-text upload-split"
|
||||
v-if="$route.query.createBy === userData.username || administrators"
|
||||
v-if="isCanOperate"
|
||||
@click="handleImportManage" v-has="'split:sarFileSplitItems:import'">
|
||||
<a-icon type="import" :rotate="-90" v-if="uploadMenuId === undefined || uploadMenuId === ''" />
|
||||
{{ (uploadMenuId === '' || uploadMenuId === undefined) ? $t('import') : '' }}
|
||||
@@ -97,44 +97,65 @@
|
||||
{{ $t('export') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleDownManage"
|
||||
v-if="$route.query.createBy === userData.username || administrators"
|
||||
v-if="isCanOperate"
|
||||
v-has="'split:sarFileSplitItems:template'">
|
||||
<a-icon type="download" />
|
||||
{{ $t('templateDownload') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleMergeManage"
|
||||
v-if="$route.query.createBy === userData.username || administrators"
|
||||
v-if="isCanOperate"
|
||||
v-has="'split:sarFileSplitItems:merge'">
|
||||
<a-icon type="snippets" />
|
||||
{{ $t('docTool.split.mergerClause') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleManage"
|
||||
v-if="$route.query.createBy === userData.username || administrators"
|
||||
v-if="isCanOperate"
|
||||
v-has="'split:sarFileSplitItems:set'">
|
||||
<a-icon type="setting" />
|
||||
{{ $t('docTool.split.batchSetting') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleBatCancel"
|
||||
v-if="$route.query.createBy === userData.username || administrators"
|
||||
v-if="isCanOperate"
|
||||
v-has="'split:sarFileSplitItems:delete'">
|
||||
<a-icon type="delete" />
|
||||
{{ $t('batchDelete') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="split-detail-table">
|
||||
<table-data
|
||||
ref="splitDetailTable"
|
||||
:url="url"
|
||||
:flag="'4'"
|
||||
:operationList="operationList"
|
||||
:infoId="$route.query.infoId"
|
||||
:menuId="menuId"
|
||||
:showAction="$route.query.createBy === userData.username || administrators ? true :false"
|
||||
@onSelectChange="onSelectChange"
|
||||
@deleteClick="deleteClick"
|
||||
@editClick="editClick"
|
||||
@showContent="showContent"
|
||||
></table-data>
|
||||
<j-table
|
||||
v-if="columns && columns.length > 0"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:can-drag="true"
|
||||
rowKey="id"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:pagination="ipagination"
|
||||
:scroll="{x: '100%'}"
|
||||
@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">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<a class="table-text textName" @click="detailClick(record)" v-if="text || text === 0">{{ text }}</a>
|
||||
<div class="table-text" v-else>{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<template slot="showContent" slot-scope="text, record">
|
||||
<span class="content-show" @click="showContent(text,record)">{{record.iterms_conditions&&record.iterms_conditions!=='null'?record.iterms_conditions.replace(/<.*?>/ig, ' ') : ''}}</span>
|
||||
</template>
|
||||
|
||||
</j-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -154,7 +175,7 @@
|
||||
|
||||
<script>
|
||||
import Search from '@/components/customField/Search'
|
||||
import TableData from '@/components/customField/TableData'
|
||||
import JTable from '@/components/jero/JTable'
|
||||
// 条款添加
|
||||
import SplitAddForm from './SplitAddForm'
|
||||
// 条款内容弹框
|
||||
@@ -168,17 +189,19 @@ import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { postAction, getAction, downloadFile } from '@/api/manage'
|
||||
import moment from 'moment'
|
||||
import { ConfigurableTableMixin } from '../../../mixins/ConfigurableTableMixin'
|
||||
|
||||
export default {
|
||||
name: 'SplitDetail',
|
||||
components: {
|
||||
Search,
|
||||
TableData,
|
||||
JTable,
|
||||
SplitAddForm,
|
||||
SplitClauseDetail,
|
||||
SplitDetailNodeAdd,
|
||||
SplitDetailBatchSetting
|
||||
},
|
||||
mixins: [ConfigurableTableMixin],
|
||||
data () {
|
||||
return {
|
||||
userData: {},
|
||||
@@ -215,8 +238,8 @@ export default {
|
||||
],
|
||||
url: {
|
||||
tableHeader: 'split/sarFileSplitItems/getHeader', // 表格头部字段
|
||||
searchList: 'split/sarFileSplitItems/queryCondition', // 搜索字段
|
||||
tableList: 'split/sarFileSplitItems/getSplitItemsByPage', // 表格数据
|
||||
getSearchList: 'split/sarFileSplitItems/queryCondition', // 搜索字段
|
||||
list: 'split/sarFileSplitItems/getSplitItemsByPage', // 表格数据
|
||||
getAddForm: 'split/sarFileSplitItems/getForm', // 表单的字段
|
||||
getDocumentInfo: 'split/sarFileSplitItems/getSplitItemsById',
|
||||
importZipUrl: '/split/sarFileSplitItems/importSplitItems' // 导入
|
||||
@@ -228,7 +251,20 @@ export default {
|
||||
moveUpFlag: false,
|
||||
fullWidth: '',
|
||||
parameter: {},
|
||||
administrators: false
|
||||
administrators: false,
|
||||
showAction: this.isCanOperate,
|
||||
flag: '4' // 查询要用到
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isCanOperate () {
|
||||
return !!(this.$route.query.createBy === this.userData.username || this.administrators)
|
||||
},
|
||||
filters () {
|
||||
return {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
@@ -383,13 +419,9 @@ export default {
|
||||
this.menuId = selectedKeys[0]
|
||||
this.uploadMenuId = selectedKeys[0]
|
||||
this.selectedKeys = selectedKeys
|
||||
const queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
}
|
||||
this.parameter.info_id = this.infoId
|
||||
this.parameter.menu_id = this.menuId
|
||||
this.$refs.splitDetailTable.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
|
||||
this.loadData()
|
||||
},
|
||||
// 树形新增
|
||||
orgAdd () {
|
||||
@@ -403,11 +435,7 @@ export default {
|
||||
nodeAddOk () {
|
||||
this.expandedKeys.push(this.nodeItem.id)
|
||||
this.loadMenuData()
|
||||
const queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
}
|
||||
this.$refs.splitDetailTable.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
|
||||
this.loadData()
|
||||
},
|
||||
// 修改节点完成后的回调
|
||||
nodeUpdateOk (expandId) {
|
||||
@@ -424,11 +452,7 @@ export default {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.loadMenuData()
|
||||
const queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
}
|
||||
this.$refs.splitDetailTable.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
|
||||
this.loadData()
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
@@ -451,11 +475,7 @@ export default {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.loadMenuData()
|
||||
const queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
}
|
||||
this.$refs.splitDetailTable.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
|
||||
this.loadData()
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
@@ -476,12 +496,7 @@ export default {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.loadMenuData()
|
||||
const queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
|
||||
}
|
||||
this.$refs.splitDetailTable.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
|
||||
this.loadData()
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
@@ -490,6 +505,56 @@ export default {
|
||||
onContextMenuClick (treeKey, menuKey) {
|
||||
// console.log(`treeKey: ${treeKey}, menuKey: ${menuKey}`);
|
||||
},
|
||||
// 表格操作列按钮的点击
|
||||
operationClick (operation, record) {
|
||||
if (this[operation.clickEvent]) {
|
||||
this[operation.clickEvent](record)
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 处理表头数据
|
||||
* @param columns
|
||||
* @returns {*[]}
|
||||
*/
|
||||
dealColumns (columns) {
|
||||
const tempColumns = []
|
||||
columns.forEach(item => {
|
||||
// 可点击项加入插槽
|
||||
if (item.click === 'true') {
|
||||
item.scopedSlots = {
|
||||
customRender: 'detailClick'
|
||||
}
|
||||
} else if (item.urlClick === 'true') {
|
||||
item.scopedSlots = {
|
||||
customRender: 'urlClick'
|
||||
}
|
||||
} else if (item.db_field_name === 'iterms_conditions') {
|
||||
// 拆分文档详情页的条款内容点击可预览
|
||||
item.scopedSlots = {
|
||||
customRender: 'showContent'
|
||||
}
|
||||
}
|
||||
// 是否可排序
|
||||
item.sorter = item.sort === 'true'
|
||||
item.width = 215
|
||||
item.title = item.db_field_txt
|
||||
item.dataIndex = item.db_field_name
|
||||
item.align = 'left'
|
||||
tempColumns.push(item)
|
||||
})
|
||||
if (this.showAction && this.operateColumn) {
|
||||
let width = 0
|
||||
if (this.operationList.length > 0) {
|
||||
for (let i = 0; i < this.operationList.length; i++) {
|
||||
width += this.getTextWith(this.operationList[i].text)
|
||||
}
|
||||
}
|
||||
const operateColumn = JSON.parse(JSON.stringify(this.operateColumn))
|
||||
operateColumn.width = width
|
||||
tempColumns.push(operateColumn)
|
||||
}
|
||||
return tempColumns
|
||||
},
|
||||
// 清空按钮
|
||||
resetSearch () {
|
||||
this.menuId = ''
|
||||
@@ -520,13 +585,8 @@ export default {
|
||||
if (res.data.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.selectClear()
|
||||
// this.loadData()
|
||||
this.loadMenuData()
|
||||
const queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
}
|
||||
this.$refs.splitDetailTable.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
|
||||
this.loadData()
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
@@ -569,13 +629,8 @@ export default {
|
||||
// 上传成功
|
||||
uploadSuccess (data, status) {
|
||||
if (status === 'success') {
|
||||
const queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
|
||||
}
|
||||
this.loadMenuData()
|
||||
this.$refs.splitDetailTable.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
|
||||
this.loadData()
|
||||
}
|
||||
const attIdList = []
|
||||
if (data && data.length > 0) {
|
||||
@@ -612,10 +667,8 @@ export default {
|
||||
downloadFile('split/sarFileSplitItems/exportSplitInfoZip', name, query, this.selectClear)
|
||||
},
|
||||
selectClear () {
|
||||
this.$refs.splitDetailTabel.selectedRowKeys = []
|
||||
this.selectedRowKeys = []
|
||||
this.selectedRows = []
|
||||
this.selecIds = []
|
||||
},
|
||||
// 模板下载
|
||||
handleDownManage () {
|
||||
@@ -637,11 +690,7 @@ export default {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.selectClear()
|
||||
this.loadMenuData()
|
||||
const queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
}
|
||||
this.$refs.splitDetailTable.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
|
||||
this.loadData()
|
||||
this.selectedRowKeys = []
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
@@ -663,18 +712,14 @@ export default {
|
||||
// 批量设置完成的回调
|
||||
batchSettingOk () {
|
||||
this.selectClear()
|
||||
const queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
}
|
||||
this.$refs.splitDetailTable.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
|
||||
this.loadData()
|
||||
},
|
||||
// 批量删除
|
||||
handleBatCancel () {
|
||||
const params = {
|
||||
ids: this.selecIds.join(',')
|
||||
ids: this.selectedRowKeys.join(',')
|
||||
}
|
||||
if (this.selecIds && this.selecIds.length > 0) {
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
this.$confirm({
|
||||
title: this.$t('confirmBatchDeletion'),
|
||||
content: '',
|
||||
@@ -683,13 +728,12 @@ export default {
|
||||
if (res.data.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.loadMenuData()
|
||||
const queryParam = {
|
||||
this.filter = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
}
|
||||
this.$refs.splitDetailTable.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
|
||||
this.loadData()
|
||||
this.selectClear()
|
||||
// eventBUs.$emit('searchReset')
|
||||
} else {
|
||||
this.$message.warning(res.data.message)
|
||||
}
|
||||
@@ -712,8 +756,8 @@ export default {
|
||||
})
|
||||
},
|
||||
// 保存成功
|
||||
sumber (queryParam) {
|
||||
this.$refs.splitDetailTable.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
|
||||
sumber () {
|
||||
this.loadData()
|
||||
this.loadMenuData()
|
||||
},
|
||||
// 删除
|
||||
@@ -729,12 +773,7 @@ export default {
|
||||
if (res.data.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.loadMenuData()
|
||||
const queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
|
||||
}
|
||||
this.$refs.splitDetailTable.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
|
||||
this.loadData()
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
@@ -851,36 +890,6 @@ export default {
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
/deep/ .ant-table-body {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
.add-menus {
|
||||
.ant-modal-wrap {
|
||||
.ant-modal-footer {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.show-setting {
|
||||
.ant-modal {
|
||||
min-width: 700px;
|
||||
}
|
||||
|
||||
.ant-select-dropdown--multiple {
|
||||
max-height: 39vh !important;
|
||||
}
|
||||
|
||||
.ant-modal-body {
|
||||
overflow-y: visible !important;
|
||||
}
|
||||
|
||||
.ant-modal-footer {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 600px) and (max-width: 1600px) {
|
||||
.operator-text {
|
||||
margin-right: 20px !important;
|
||||
|
||||
@@ -80,6 +80,22 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style scoped lang="less">
|
||||
.show-setting {
|
||||
.ant-modal {
|
||||
min-width: 700px;
|
||||
}
|
||||
|
||||
.ant-select-dropdown--multiple {
|
||||
max-height: 39vh !important;
|
||||
}
|
||||
|
||||
.ant-modal-body {
|
||||
overflow-y: visible !important;
|
||||
}
|
||||
|
||||
.ant-modal-footer {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -154,6 +154,12 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
<style scoped lang="less">
|
||||
.add-menus {
|
||||
.ant-modal-wrap {
|
||||
.ant-modal-footer {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
width="1100"
|
||||
>
|
||||
<div class="table-page-search-wrapper">
|
||||
<search :url="url" flag="condition" :minLength="2"></search>
|
||||
<search :url="url" flag="condition" :minLength="2" @search="searchQuery" @reset="searchReset"></search>
|
||||
</div>
|
||||
<div class="operator-select">
|
||||
<a-row :gutter="24">
|
||||
@@ -50,14 +50,17 @@
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
<table-data
|
||||
flag="header"
|
||||
selectionType="radio"
|
||||
:url="url"
|
||||
:type="type"
|
||||
:operationList="operationList"
|
||||
@onSelectChange="onSelectChange"
|
||||
/>
|
||||
<j-table
|
||||
v-if="columns && columns.length > 0"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:can-drag="true"
|
||||
rowKey="id"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio' }"
|
||||
:pagination="ipagination"
|
||||
:scroll="{x: '100%'}"
|
||||
@change="tableOnChange">
|
||||
</j-table>
|
||||
<div class="drawer-bootom-button">
|
||||
<a-button @click="cancelSplit" style='margin-right: 15px'>{{$t('cancel')}}</a-button>
|
||||
<a-button type="primary" :loading="loading" @click="submitSplit">{{$t('submit')}}</a-button>
|
||||
@@ -67,12 +70,14 @@
|
||||
|
||||
<script>
|
||||
import Search from '@/components/customField/Search'
|
||||
import TableData from '@/components/customField/TableData'
|
||||
import JTable from '@/components/jero/JTable'
|
||||
import { httpAction } from '@/api/manage'
|
||||
import { ConfigurableTableMixin } from '../../../mixins/ConfigurableTableMixin'
|
||||
|
||||
export default {
|
||||
name: 'SplitText',
|
||||
components: { Search, TableData },
|
||||
components: { Search, JTable },
|
||||
mixins: [ConfigurableTableMixin],
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
@@ -81,13 +86,15 @@ export default {
|
||||
selectedRowKeys: [],
|
||||
selectedRows: [],
|
||||
url: {
|
||||
tableHeader: 'document/bussDocumentLibraryEO/getHeaderOrConditionForSplitResult', // 表格头部字段
|
||||
// tableHeader: 'document/bussDocumentLibraryEO/getHeaderOrConditionForSplitResult', // 表格头部字段
|
||||
searchList: 'document/bussDocumentLibraryEO/getHeaderOrConditionForSplitResult', // 搜索字段
|
||||
tableList: 'split/sarFileSplitInfo/splitFilePageInfo', // 表格数据
|
||||
addSplit: ''
|
||||
},
|
||||
type: 'pdfdoc',
|
||||
operationList: []
|
||||
operationList: [],
|
||||
showAction: false,
|
||||
flag: 'header'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
Reference in New Issue
Block a user