|
@@ -1,76 +1,63 @@
|
|
|
<template>
|
|
|
- <div class="container">
|
|
|
- <div class="container normal-panel normal-margin flex-align-stretch flex-between">
|
|
|
- <div>
|
|
|
- <div class="flex-align-center">
|
|
|
+ <div>
|
|
|
+ <div class="container normal-panel sticky">
|
|
|
+ <div class="flex-align-center flex-between normal-margin">
|
|
|
+ <div>
|
|
|
<p class="appname inline-16">{{routerName}}</p>
|
|
|
- <div class="flex-align-center">
|
|
|
- <p class="normal-title inline-16">{{titleText}}</p>
|
|
|
- <div>
|
|
|
- <el-button :disabled="rowindex === 1" size="mini" icon="el-icon-arrow-left" @click="previous()"></el-button>
|
|
|
- <el-button :disabled="rowindex === total" size="mini" @click="next()"><i class="el-icon-arrow-right"></i></el-button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div v-if="tags">
|
|
|
- <el-tag style="margin-right:10px" v-for="item in tags" :key="item.index" size="mini" effect="light">{{item}}</el-tag>
|
|
|
+ <p class="normal-title inline-16">{{titleText}}</p>
|
|
|
</div>
|
|
|
- <div v-else>
|
|
|
- <slot name="tags"></slot>
|
|
|
+ <div class="flex-align-center">
|
|
|
+ <cpEdit v-if="tool.checkAuth($route.name,'update')" :formPath="formPath" :data="editData" btnType="default" @onAddSuccess="onSuccess"></cpEdit>
|
|
|
+ <div class="inline-16">
|
|
|
+ <slot name="customOperation"></slot>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-button :disabled="rowindex === 1" size="mini" icon="el-icon-arrow-left" @click="previous()"></el-button>
|
|
|
+ <el-button :disabled="rowindex === total" size="mini" @click="next()"><i class="el-icon-arrow-right"></i></el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div style="display:flex">
|
|
|
- <cpEdit v-if="tool.checkAuth($route.name,'update')" :formPath="formPath" :data="editData" btnType="default" @onAddSuccess="onSuccess"></cpEdit>
|
|
|
- <slot name="customOperation"></slot>
|
|
|
- </div>
|
|
|
+ <tagTemp ref="tag" :onwertable="idname.slice(0, this.idname.length - 2)" @onSuccess="onSuccess"></tagTemp>
|
|
|
+ <!-- <group :ownertable="idname"></group> -->
|
|
|
</div>
|
|
|
- <el-row :gutter="20">
|
|
|
- <el-col :span="18">
|
|
|
- <div class="container normal-panel normal-margin">
|
|
|
- <el-descriptions title="基本信息" :column="4">
|
|
|
+ <div style="box-sizing: border-box;padding:20px">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="18">
|
|
|
+ <div class="container normal-panel normal-margin">
|
|
|
+ <el-descriptions title="基本信息" :column="4">
|
|
|
<el-descriptions-item v-for="item in mainAreaData" :key="item.index" :label="item.label">{{item.value?item.value:'--'}}</el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
- </div>
|
|
|
- <div class="my-tabs">
|
|
|
- <el-tabs v-model="activeName" type="card">
|
|
|
- <el-tab-pane v-for="(tab,index) in tabs" :key="index" :label="tab" :name="'tab' + index"></el-tab-pane>
|
|
|
- <el-tab-pane label="附件" name="file"></el-tab-pane>
|
|
|
- <el-tab-pane label="操作记录" name="log"></el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
- </div>
|
|
|
- <div v-show="'tab'+index === activeName" v-for="(item,index) in tabs" :key="index">
|
|
|
- <slot :name="'slot' + index"></slot>
|
|
|
- </div>
|
|
|
- <div class="container normal-panel" v-show="activeName === 'file'">
|
|
|
- <attachmentList :attinfos="attinfo_attachment" @onSuccess="queryAttments">
|
|
|
- <upload slot="upload" :folderid="folderid"
|
|
|
- :bindData="{ ownertable: idname.slice(0, idname.length - 2), ownerid: editData[idname], usetype: 'default' }"
|
|
|
- @onSuccess="queryAttments"></upload>
|
|
|
- </attachmentList>
|
|
|
- </div>
|
|
|
- <slot name="custom"></slot>
|
|
|
- </el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <group :ownertable="idname"></group>
|
|
|
- <follow-up :ownertable="idname"></follow-up>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
+ </el-descriptions>
|
|
|
+ </div>
|
|
|
+ <tabTemp :tabs="tabs" :editData="editData" :idname="idname">
|
|
|
+ <div :slot="'slot' + index" v-for="(tab,index) in tabs" :key="tab.index">
|
|
|
+ <slot :name="'slot' + index"></slot>
|
|
|
+ </div>
|
|
|
+ </tabTemp>
|
|
|
+ <slot name="custom"></slot>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <!-- <group :ownertable="idname"></group> -->
|
|
|
+ <follow-up :ownertable="idname"></follow-up>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import cpEdit from '../modules/cpEdit.vue'
|
|
|
-import followUp from './modules/followUp/followUp'
|
|
|
-import group from './modules/group/group'
|
|
|
-import upload from '@/components/upload/hw_obs_upload.vue'
|
|
|
-import attachmentList from '@/components/attachment_list/index.vue'
|
|
|
+import followUp from './modules/followUp/followUp.vue'
|
|
|
+import tagTemp from './modules/tags/tag.vue'
|
|
|
+import tabTemp from './modules/tabs/tab.vue'
|
|
|
+
|
|
|
+import group from './modules/group/group.vue'
|
|
|
+
|
|
|
export default {
|
|
|
props:['titleText','mainAreaData','turnPageId','idname','formPath','editData','tags','tabs'],
|
|
|
data () {
|
|
|
return {
|
|
|
- activeName:'tab0',
|
|
|
- folderid:JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
|
|
|
routerName:'',
|
|
|
rowindex:0,
|
|
|
total:0,
|
|
@@ -84,16 +71,15 @@ export default {
|
|
|
"condition": ""
|
|
|
}
|
|
|
}
|
|
|
- },
|
|
|
- attinfo_attachment:[]
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
components:{
|
|
|
cpEdit,
|
|
|
followUp,
|
|
|
group,
|
|
|
- upload,
|
|
|
- attachmentList
|
|
|
+ tagTemp,
|
|
|
+ tabTemp
|
|
|
},
|
|
|
methods:{
|
|
|
async queryData (pageNumber) {
|
|
@@ -102,35 +88,21 @@ export default {
|
|
|
const res = await this.$api.requested(this.param)
|
|
|
this.total = res.total
|
|
|
this.$emit('pageChange',res.data[0][this.idname],res.data[0].rowindex)
|
|
|
+ this.$refs['tag'].queryTag()
|
|
|
},
|
|
|
next () {
|
|
|
this.rowindex += 1
|
|
|
this.queryData(this.rowindex)
|
|
|
+
|
|
|
},
|
|
|
previous () {
|
|
|
this.rowindex -= 1
|
|
|
this.queryData(this.rowindex)
|
|
|
+
|
|
|
},
|
|
|
onSuccess () {
|
|
|
this.$emit('onEditSuccess')
|
|
|
},
|
|
|
- async queryAttments () {
|
|
|
- const res = await this.$api.requested({
|
|
|
- "classname": "system.attachment.Attachment",
|
|
|
- "method": "queryFileLink",
|
|
|
- "content": {
|
|
|
- "ownertable": this.idname.slice(0, this.idname.length - 2),
|
|
|
- "ownerid": this.editData[this.idname],
|
|
|
- "usetype":""
|
|
|
- }
|
|
|
- })
|
|
|
- this.attinfo_attachment = res.data
|
|
|
- }
|
|
|
- },
|
|
|
- watch: {
|
|
|
- editData () {
|
|
|
- this.queryAttments()
|
|
|
- }
|
|
|
},
|
|
|
mounted () {
|
|
|
},
|
|
@@ -142,6 +114,10 @@ export default {
|
|
|
|
|
|
</script>
|
|
|
<style>
|
|
|
+.detail__head__label{
|
|
|
+ display: inline-block;
|
|
|
+ width: 70px;
|
|
|
+}
|
|
|
</style>
|
|
|
<style scoped>
|
|
|
.appname{
|
|
@@ -152,4 +128,11 @@ export default {
|
|
|
padding: 2px 10px;
|
|
|
font-size: 12px;
|
|
|
}
|
|
|
+.my-tabs{
|
|
|
+ background:#eeeeee
|
|
|
+}
|
|
|
+.sticky{
|
|
|
+ position: sticky;
|
|
|
+ top:0;
|
|
|
+}
|
|
|
</style>
|