lion 11 months ago
parent 12f0a74ab2
commit 923f5d3614

@ -8,15 +8,19 @@
<slot name="searchtype"></slot>
</div>
<div class="dialogConcent" style="max-height: 65vh !important;min-height: 300px;overflow: scroll;">
<iframe id="iframeWin" :src="url" frameborder="0" scrolling="auto" align="center" class="iframeWeb">
</iframe>
<div class="dialogConcent" style="max-height: 65vh !important;min-height: 300px;overflow: scroll;">
<div v-if="typeName=='file'">
<iframe id="iframeWin" :src="url" frameborder="0" scrolling="auto" align="center" class="iframeWeb">
</iframe>
</div>
<div v-if="typeName=='video'" style="text-align: center;">
<video :src="url" controls></video>
</div>
</div>
<div slot="footer" class="dialog-footer">
<div>
<el-button size="small" @click="coloseDia"></el-button>
</div>
<slot name="footerbtn"></slot>
</div>
@ -50,7 +54,8 @@
return {
diaShow: this.isShow,
isfullscreen:false,
url:'',
url:'',
typeName:'file',
baseUrl: `${process.env.VUE_APP_PREVIEW_API}?url=`,
wheight: "",
form:{
@ -70,6 +75,7 @@
// this.url = ""
this.diaShow = false
this.url = ''
this.typeName = 'file'
this.$emit('update:isShow', false)
}
}

@ -60,11 +60,11 @@ export const constantRoutes = [{
hidden: true
},
{
path: '/record/search',
path: '/record/index',
component: Layout,
children: [{
path: '/record/search',
component: () => import('@/views/record/search'),
path: '/record/index',
component: () => import('@/views/record/index'),
name: '搜索',
meta: {
title: '搜索'

@ -16,6 +16,13 @@ let base = {
},
isUrl(url) {
return this.checkUrl(url)
},
containsVideoFormat(str) {
// 定义包含常见视频格式的正则表达式
const videoFormats = /\.(mp4|avi|mov|wmv|flv|mkv|webm|mpg|mpeg)$/i;
// 使用正则表达式的test方法来检查字符串
return videoFormats.test(str);
},
checkUrl(url) {
// url= 协议://(ftp的登录信息)[IP|域名](:端口号)(/或?请求参数)

@ -1,6 +1,6 @@
<template>
<div>
<xy-dialog ref="dialog" :width="60" :is-show.sync="isShow" :type="'form'" :title="'档案信息'" :form="form"
<xy-dialog ref="dialog" :width="60" :is-show.sync="isShow" :type="'form'" :title="$route.meta.title" :form="form"
:rules='rules' @submit="submit">
<template v-slot:title>
<div class="xy-table-item">
@ -76,7 +76,7 @@
</div>
</div>
</template>
<template v-slot:catalog_id>
<template v-slot:catalog_id v-if="false">
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>所属目录

@ -1,6 +1,6 @@
<template>
<div>
<xy-dialog ref="dialog" :width="60" :is-show.sync="isShow" :type="'form'" :title="'档案延续'" :form="form"
<xy-dialog ref="dialog" :width="60" :is-show.sync="isShow" :type="'form'" :title="$route.meta.title+'--档案延续'" :form="form"
:rules='rules' @submit="submit">
<template v-slot:title>
<div class="xy-table-item">
@ -76,7 +76,7 @@
</div>
</div>
</template>
<template v-slot:catalog_id>
<template v-slot:catalog_id v-if="false">
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>所属目录
@ -214,7 +214,11 @@
changeEditor(e) {
this.form.content = e
},
setList(cat,area,tag){
this.catalogList = cat?cat:[]
this.areaList = area?area:[]
this.tagList = tag?tag:[]
},
getSelectedNodes(data, node) {
console.log("data", data)
this.$refs.tree.setCheckedKeys([]); //

@ -31,7 +31,7 @@
<div v-for="(item,index) in form.files_details">
附件{{index+1}}
<a :href="item.url" target="_blank">{{item.original_name}}</a>
<el-link target="_blank" style="margin:0 10px;" @click="toshowFile(item.view_url)" type="primary">
<el-link target="_blank" style="margin:0 10px;" @click="toshowFile(item)" type="primary">
预览
</el-link>
</div>
@ -80,8 +80,15 @@
console.log("this.form", this.form)
})
},
toshowFile(url) {
this.$refs.viewFile.url = url
toshowFile(item) {
//
if(item.url && this.base.containsVideoFormat(item.url)){
this.$refs.viewFile.typeName = 'video'
this.$refs.viewFile.url = item.url
}else{
this.$refs.viewFile.typeName = 'file'
this.$refs.viewFile.url = item.view_url
}
this.$refs.viewFile.diaShow = true
},
},

@ -7,23 +7,35 @@
<div slot="content" v-if="!hasMenu">
<div class="searchwrap" style="display: flex;align-items: center;">
<div>
<el-input v-model="select.title" placeholder="请输入名称"></el-input>
<el-input style="width:200px" v-model="select.title" placeholder="请输入名称"></el-input>
</div>
<div>
<el-select style="width:100%" v-model="select.status" placeholder="请选择状态" clearable>
<el-select style="width:200px" v-model="select.status" placeholder="请选择状态" clearable>
<el-option v-for="item in statusList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
<div v-if="is_search">
<el-select style="width:200px" clearable @clear="clearCatalog" v-model="select.catalog_name" placeholder="请选择目录">
<el-option value="">
<el-tree :default-checked-keys="checkArr" :check-strictly="true" @check="getSelectedNodes"
:data="catalogList" show-checkbox node-key="id" ref="tree" highlight-current
:props="defaultProps">
</el-tree>
</el-option>
</el-select>
</div>
<div>
<el-select style="width:100%" v-model="select.area_id" clearable multiple collapse-tags
<el-select style="width:200px" v-model="select.area_id" clearable multiple collapse-tags
placeholder="请选择区域">
<el-option v-for="item in areaList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-select style="width:100%" v-model="select.tag_id" multiple collapse-tags placeholder="请选择标签">
<el-select style="width:200px" v-model="select.tag_id" multiple collapse-tags placeholder="请选择标签">
<el-option v-for="item in tagList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
@ -165,6 +177,7 @@
page: 1,
page_size: 10,
catalog_id: '',
catalog_name: '',
status: '',
area_id: '',
tag_id: '',
@ -181,12 +194,14 @@
label: 'name'
},
catalogList: [],
catalogChildren: [], //
showChildren:[], //
lastChildren:[], //
catalogChildren: [], //
showChildren: [], //
lastChildren: [], //
areaList: [],
tagList: [],
nowDate: '',
is_search: false,
checkArr: [],
statusList: [{
id: 0,
name: '正常',
@ -257,27 +272,28 @@
//
this.nowDate = this.$moment().format("YYYY-MM-DD")
this.stateObj = state.state
console.log("this.stateObj", this.stateObj)
if (this.$route.query.searchTitle) {
this.select.title = this.$route.query.searchTitle
}
if (this.$route.query.dateTotal) {
this.select.endRange = [this.nowDate, this.nowDate]
this.select.status = 0
this.is_search = false
if (this.$route.query.searchTitle) {
this.select.title = this.$route.query.searchTitle
this.is_search = true
}
if (this.$route.query.dateTotal) {
this.select.endRange = [this.nowDate, this.nowDate]
this.select.status = 0
this.is_search = true
}
// this.getCatalogList()
if (this.$route.path) {
let path = this.$route.path.split("_")
this.select.catalog_id = path[1]
let path = this.$route.path.split("_")
this.select.catalog_id = path[1]
console.log(this.$route.path.includes('menu'))
if (this.$route.path.includes('menu')) {
this.hasMenu = true
// this.getCatalogChildren(path[1])
this.getCatalogList(path[1])
} else {
this.getCatalogList()
this.getAreaList()
this.getTagList()
this.getTagList()
this.getList()
}
@ -293,15 +309,29 @@
console.log("e", e)
this.myHeight = e + 37
},
getSelectedNodes(data, node) {
console.log("data", data)
this.$refs.tree.setCheckedKeys([]); //
this.$refs.tree.setCheckedNodes([data]); //
this.select.catalog_id = data.id
this.select.catalog_name = data.name
this.$forceUpdate()
},
clearCatalog(e){
this.select.catalog_id = ''
this.select.catalog_name = ''
this.checkArr = []
this.$refs.tree.setCheckedKeys([]);
},
toUrl(item) {
let path = ''
if (item.children && item.children.length > 0) {
// path = '/record/menu_' + item.id + '?time=' + new Date()
// path = '/record/menu_' + item.id + '?time=' + new Date()
this.catalogChildren = item.children
} else {
path = '/record/index_' + item.id
this.$router.push({
path: path
path = '/record/index_' + item.id
this.$router.push({
path: path
})
}
@ -317,31 +347,13 @@
})
if (res.data.length > 0) {
this.catalogList = this.base.buildTree(res.data)
console.log("this.catalogList", this.catalogList)
if (pid) {
let pList = this.base.findNodesById(this.catalogList, pid)
console.log("pList",pList)
let pList = this.base.findNodesById(this.catalogList, pid)
console.log("pList", pList)
this.catalogChildren = pList[0].children
}
console.log("this.catalogChildren", this.catalogChildren)
}
},
async getCatalogChildren(pid) {
const res = await index({
page_size: 999,
page: 1,
sort_type: 'ASC',
sort_name: 'sort',
table_name: 'catalogs',
filter: [{
key: 'pid',
op: 'eq',
value: pid
}]
// is_auth: 1,
})
this.catalogChildren = res.data
},
async getAreaList() {
const res = await index({
page_size: 999,
@ -365,13 +377,6 @@
this.tagList = res.data
},
getSelectedNodes(data, node, self) {
node.expanded = true
this.select.catalog_id = data.id
this.select.page = 1
this.getList()
},
editIndex(type, id) {
@ -404,11 +409,19 @@
},
resetSearch() {
this.select.page = 1
this.select.title = ''
this.select.area_id = []
this.select.tag_id = []
this.select.startRange = []
this.select.endRange = []
this.select.endRange = []
if(this.is_search){
this.select.catalog_id = ''
this.select.catalog_name = ''
this.checkArr = []
this.$refs.tree.setCheckedKeys([]);
}else{
this.select.title = ''
}
// this.select.catalog_id = ''
this.getList()
},
@ -495,11 +508,13 @@
.searchwrap {
display: flex;
align-items: center;
flex-wrap: wrap;
&>div {
display: flex;
align-items: center;
margin-right: 10px;
margin-bottom: 10px;
span {
min-width: 70px;
@ -526,19 +541,8 @@
margin-bottom: 10px;
}
}
// display: flex;
// // align-items: center;
// justify-content: space-between;
// &_left {
// width: 20%;
// background: #fff;
// padding: 10px;
// }
// &_right {
// width: 79%
// }
}
::v-deep .el-checkbox__input .el-checkbox__inner {
border-radius: 50%;
}
</style>

@ -46,9 +46,6 @@
<div>
<el-button type="primary" size="small" @click="resetSearch"></el-button>
</div>
<div>
<el-button type="primary" size="small" @click="editIndex('add')"></el-button>
</div>
</div>
</div>
@ -57,21 +54,7 @@
</div>
<div class="catalog">
<!-- <div class="catalog_left" :style="{'height': myHeight+'px',overflow:'scroll'}">
<el-tree @node-click="getSelectedNodes" :data="catalogList" default-expand-all node-key="id" ref="tree"
highlight-current :props="defaultProps">
</el-tree>
</div> -->
<div v-if="hasMenu" class="catalog_list">
<div v-for="item in catalogChildren" class='catalog_item' @click="toUrl(item)">
<div>
<i :class="item.children&&item.children.length>0?'el-icon-folder-opened':'el-icon-document-copy'"></i>
<div>{{item.name}}</div>
</div>
</div>
</div>
<div class="catalog_right" v-else>
<div class="catalog_right">
<xy-table @getHeight="initHeight" :list="list" :total="total" @pageIndexChange="pageIndexChange"
@pageSizeChange="pageSizeChange" :table-item="table_item">
<template v-slot:catalog_name>
@ -171,7 +154,6 @@
startRange: [],
endRange: []
},
hasMenu: false,
myHeight: 0,
stateObj: {},
total: 0,
@ -181,9 +163,6 @@
label: 'name'
},
catalogList: [],
catalogChildren: [], //
showChildren:[], //
lastChildren:[], //
areaList: [],
tagList: [],
nowDate: '',
@ -265,47 +244,16 @@
this.select.endRange = [this.nowDate, this.nowDate]
this.select.status = 0
}
// this.getCatalogList()
if (this.$route.path) {
let path = this.$route.path.split("_")
this.select.catalog_id = path[1]
console.log(this.$route.path.includes('menu'))
if (this.$route.path.includes('menu')) {
this.hasMenu = true
// this.getCatalogChildren(path[1])
this.getCatalogList(path[1])
} else {
this.getCatalogList()
this.getAreaList()
this.getTagList()
this.getList()
}
}
},
watch: {
'$route'(to, from) {
this.$router.go(0);
}
this.getCatalogList()
this.getAreaList()
this.getTagList()
this.getList()
},
methods: {
initHeight(e) {
console.log("e", e)
this.myHeight = e + 37
},
toUrl(item) {
let path = ''
if (item.children && item.children.length > 0) {
// path = '/record/menu_' + item.id + '?time=' + new Date()
this.catalogChildren = item.children
} else {
path = '/record/index_' + item.id + '?time=' + new Date()
this.$router.push({
path: path
})
}
},
async getCatalogList(pid) {
const res = await index({
page_size: 999,
@ -317,31 +265,8 @@
})
if (res.data.length > 0) {
this.catalogList = this.base.buildTree(res.data)
console.log("this.catalogList", this.catalogList)
if (pid) {
let pList = this.base.findNodesById(this.catalogList, pid)
console.log("pList",pList)
this.catalogChildren = pList[0].children
}
console.log("this.catalogChildren", this.catalogChildren)
}
},
async getCatalogChildren(pid) {
const res = await index({
page_size: 999,
page: 1,
sort_type: 'ASC',
sort_name: 'sort',
table_name: 'catalogs',
filter: [{
key: 'pid',
op: 'eq',
value: pid
}]
// is_auth: 1,
})
this.catalogChildren = res.data
},
async getAreaList() {
const res = await index({
page_size: 999,

Loading…
Cancel
Save