[update] 文档拆分详情页布局

This commit is contained in:
lideqin
2023-08-18 18:03:53 +08:00
parent 6b1a7feaed
commit e331340e55
5 changed files with 293 additions and 523 deletions
+17 -1
View File
@@ -21,7 +21,8 @@
<span v-else-if="ol.text === $t('cancelSubscribe')" v-has="ol.has" class="text">
{{ !record.subscribeFlag || record.subscribeFlag === 0 ? $t('subscribe') :$t('cancelSubscribe') }}
</span>
<span v-else v-has="ol.has" class="text">
<!-- v-has="ol.has"-->
<span v-else class="text">
{{ ol.text }}
</span>
</a>
@@ -200,6 +201,21 @@ export default {
// scopedSlots: { customRender: 'operation' }
// }
]
let width = 0
if (this.operationList.length > 0) {
for (let i = 0; i < this.operationList.length; i++) {
width += this.getTextWith(this.operationList[i].text)
}
}
if (this.showAction) {
this.columns.push({
title: this.$t('operation'),
align: 'center',
fixed: 'right',
width: width,
scopedSlots: { customRender: 'operation' }
})
}
this.dataSource = [
{
collectFlag: '0',
+1 -1
View File
@@ -2,7 +2,7 @@
<a-card :bordered="false">
<div class="left-tree-div">
<div class="div-left">
<div class="split-detail-left-tree">
<div>
<a-input-search style="margin-bottom: 8px" :placeholder="$t('nodeQuickLookup')" @change="onLeftChange"
@search="onSearch"/>
<a-tree
+2 -2
View File
@@ -62,12 +62,12 @@ export default {
// 查看
{
text: this.$t('view'),
ClickEvent: 'detailClick'
clickEvent: 'detailClick'
},
// 删除
{
text: this.$t('delete'),
ClickEvent: 'deleteDetail'
clickEvent: 'deleteDetail'
}
],
url: {
@@ -16,7 +16,7 @@
:rules="rules"
ref="splitEditForm"
>
<a-row :gutter="24" class="split-form-row">
<a-row :gutter="24">
<a-col :span="12" v-for="(item,index) in dataList" :key="index">
<div class="box-title-text" v-if="item.field_show_type === '1' || item.field_show_type === '11'">
<div class="title-text">
@@ -143,7 +143,7 @@
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
</div>
<a-form-model-item class="item-model" :prop="item.db_field_name">
<Standardselection :query="item"
<standard-selection :query="item"
:disabled="disabled"
:standard="formInline"
v-model="formInline[item.db_field_name]"/>
@@ -329,16 +329,16 @@ import UploadFile from '@/components/UploadFile'
import StandardSelection from '@/components/selection/StandardSelection'
import SplitUpload from '@/components/splitUpload/SplitUpload'
import UEditor from '@/components/uEditor/UEditor'
import moment from 'moment'
import axios from 'axios'
import { getAction, postAction } from '@/api/manage'
import { getAction } from '@/api/manage'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import Vue from 'vue'
export default {
name: 'SplitAddForm',
components: {
uploadFile,
Standardselection,
UploadFile,
StandardSelection,
SplitUpload,
UEditor
},
@@ -726,7 +726,7 @@ export default {
this.$message.warning(this.$t('oneTableAdded'))
} else if (!ueContent || ueContent.length < 1) {
this.$message.warning(this.$t('addATable'))
} if (ueContent && ueContent.length == 1) {
} if (ueContent && ueContent.length === 1) {
this.tableVisible = false
if (this.isTableEdit) {
this.contentList[this.addIndex] = {
+21 -267
View File
@@ -1,10 +1,8 @@
<template>
<div class="main-item">
<div class="split-detail" @click="clearMenu" :style="'width:' + (fullWidth - 200) + 'px'">
<a-card :bordered="false">
<div class="split-detail-wrap">
<div class="split-detail-left">
<div class="split-detail-left-tree">
<div class="left-tree-div">
<div class="div-left">
<div>
<a-input-search style="margin-bottom: 8px" :placeholder="$t('nodeQuickLookup')" @change="onLeftChange"
@search="onSearch" />
<a-tree
@@ -67,9 +65,9 @@
</a-tree>
</div>
</div>
<div class="split-detail-right">
<div class="split-detail-right-wraper">
<div class="split-detail-search-header">
<div class="div-right">
<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" />
</div>
@@ -80,9 +78,9 @@
<a-icon type="copy" />
{{ $t('copy') }}
</div>
<div class="operator-text" @click="handleAddManage"
v-if="$route.query.createBy === userData.username || administrators"
v-has="'split:sarFileSplitItems:add'">
<div class="operator-text" @click="handleAddManage">
<!-- v-if="$route.query.createBy === userData.username || administrators"-->
<!-- v-has="'split:sarFileSplitItems:add'"-->
<a-icon type="plus" />
{{ $t('add') }}
</div>
@@ -208,8 +206,6 @@
</div>
</a-card>
</div>
</div>
</template>
<script>
@@ -218,7 +214,9 @@ import TableData from '@/components/customField/TableData'
import AddForm from '@/components/customField/AddForm'
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import mapGetters from 'vuex'
import { mapGetters } from 'vuex'
import { postAction, getAction, putAction, downloadFile } from '@/api/manage'
import moment from 'moment'
export default {
name: 'SplitDetail',
@@ -656,45 +654,22 @@ export default {
this.$confirm({
title: this.$t('confirmReplication'),
content: '',
onOk:
async () => {
axios({
url: '/jero-boot/split/sarFileSplitItems/batchCopyItems',
method: 'get',
params: params,
// transformRequest: [function (data) {
// // Do whatever you want to transform the data
// let ret = ''
// for (let it in data) {
// ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
// }
// return ret
// }],
headers: {
// 'Content-Type': 'application/x-www-form-urlencoded',
'X-Access-Token': this.token
}
})
.then((res) => {
onOk: () => {
getAction('/split/sarFileSplitItems/batchCopyItems', params).then((res) => {
if (res.data.success) {
this.$message.success(this.$t('operationSuccessful'))
this.$emit('selectClear')
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)))
// eventBUs.$emit('searchReset')
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
},
onCancel () {
}
})
} else if (menuIds.length === 0) {
@@ -791,19 +766,8 @@ export default {
this.$confirm({
title: this.$t('docTool.split.mergeTerms'),
content: '',
onOk:
async () => {
axios({
url: '/jero-boot/split/sarFileSplitItems/batchMergeItems',
method: 'get',
params: {
ids: ids
},
headers: {
'X-Access-Token': this.token
}
})
.then((res) => {
onOk: () => {
getAction('/split/sarFileSplitItems/batchMergeItems', { ids: ids }).then(res => {
if (res.data.success) {
this.$message.success(this.$t('operationSuccessful'))
this.selectClear()
@@ -811,7 +775,6 @@ export default {
const queryParam = {
menu_id: this.menuId,
info_id: this.infoId
}
this.$refs.splitDetailTable.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
this.selectedRowKeys = []
@@ -848,15 +811,7 @@ export default {
url = this.url.addInfo
}
formInline.ids = this.ids
axios({
url: url,
method: 'post',
data: formInline,
headers: {
'X-Access-Token': this.token
}
})
.then((res) => {
postAction(url, formInline).then((res) => {
if (res.data.success) {
this.$message.success(this.$t('operationSuccessful'))
this.batSetVisible = false
@@ -880,33 +835,14 @@ export default {
this.$confirm({
title: this.$t('confirmBatchDeletion'),
content: '',
onOk:
async () => {
axios({
url: '/jero-boot/split/sarFileSplitItems/batchDeleteItems',
method: 'post',
data: params,
transformRequest: [function (data) {
// Do whatever you want to transform the data
let ret = ''
for (const it in data) {
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
}
return ret
}],
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'X-Access-Token': this.token
}
})
.then((res) => {
onOk: () => {
postAction('/split/sarFileSplitItems/batchDeleteItems', params).then((res) => {
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.selectClear()
@@ -915,11 +851,6 @@ export default {
this.$message.warning(res.data.message)
}
})
.catch((error) => {
console.log(error)
})
},
onCancel () {
}
})
} else {
@@ -950,26 +881,8 @@ export default {
this.$confirm({
title: this.$t('areYouSure'),
content: '',
onOk:
async () => {
axios({
url: '/jero-boot/split/sarFileSplitItems/batchDeleteItems',
method: 'post',
data: params,
transformRequest: [function (data) {
// Do whatever you want to transform the data
let ret = ''
for (const it in data) {
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
}
return ret
}],
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'X-Access-Token': this.token
}
})
.then((res) => {
onOk: () => {
postAction('/split/sarFileSplitItems/batchDeleteItems', params).then((res) => {
if (res.data.success) {
this.$message.success(this.$t('operationSuccessful'))
this.loadMenuData()
@@ -983,11 +896,6 @@ export default {
this.$message.warning(this.$t('operationFailed'))
}
})
.catch((error) => {
console.log(error)
})
},
onCancel () {
}
})
},
@@ -1110,89 +1018,6 @@ export default {
<style scoped lang="less">
@import '~@assets/less/common.less';
.split-detail {
/*height: 100% !important;*/
.split-detail-wrap {
/*display: flex;*/
/*justify-content: space-between;*/
.split-detail-left {
/*height: 100%;*/
width: 230px;
float: left;
padding-right: 20px;
/*border-right: 1px solid #E6E7EC;*/
overflow-y: auto;
.split-detail-left-tree {
}
.menu-item {
padding: 2px 8px;
border: 1px solid #000000;
border-bottom: none;
cursor: pointer;
}
.menu-bottom {
border-bottom: 1px solid #000000;
}
.menu-item:hover {
background: #00B3BE;
color: #ffffff;
}
}
.split-detail-right {
padding-left: 20px;
width: calc(100% - 230px);
float: right;
border-left: 1px solid #E6E7EC;
/*flex: 1;*/
.split-detail-search-header {
margin-bottom: 20px;
.table-page-search-submitButtons {
display: flex;
}
}
.split-detail-table {
.action-edit {
margin-right: 20px;
}
.content-show {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
height: 60px;
line-height: 20px;
white-space: pre-wrap;
}
.page {
text-align: right;
}
}
.split-item {
display: flex;
}
}
.page {
margin-top: 20px;
}
}
}
/deep/ .ant-table-body {
overflow: hidden !important;
}
@@ -1205,39 +1030,6 @@ export default {
}
}
.split-detail-right-wraper {
.table-page-search-submitButtons {
.ant-col-md-6 {
display: flex;
}
}
.split-detail-search-header {
.ant-col-sm-8 {
min-width: 300px;
}
.ant-select-selection--multiple {
ul {
height: 36px;
overflow-y: auto;
}
}
}
.upload-split {
.ant-upload {
color: #040B29;
}
.anticon-import {
display: inline-block;
margin-right: 3px !important;
}
}
}
.show-setting {
.ant-modal {
min-width: 700px;
@@ -1256,44 +1048,6 @@ export default {
}
}
.split-detail-left {
.ant-tree-node-content-wrapper-normal {
}
ant-tree-node-content-wrapper {
.expand-title {
}
}
.ant-tree-title {
span {
//display: block;
width: auto;
overflow: hidden;
text-overflow: ellipsis;
}
}
.ant-tree-child-tree {
.ant-tree-title {
span {
//display: block;
width: auto;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
}
@media screen and (min-width: 600px) and (max-width: 1600px) {
.operator-text {
margin-right: 20px !important;