Merge remote-tracking branch 'origin/master'
| | |
| | | } |
| | | } |
| | | paramVOS.component=component; |
| | | let name="查看详情" |
| | | if(paramVOS.showname){ |
| | | name="查看【"+replaceFreeMarker(paramVOS.showname,options.dataStore,options.sourceData)+"】" |
| | | const name="查看【"+replaceFreeMarker(paramVOS.showname,options.dataStore,options.sourceData)+"】"; |
| | | paramVOS.title=name; |
| | | } |
| | | paramVOS.title=name; |
| | | |
| | | const params= { |
| | | options:options, |
| | | paramVOS:paramVOS, |
| | | saveCallback:callback |
| | | saveCallback:callback, |
| | | title:paramVOS.title |
| | | } |
| | | |
| | | store.dispatch("setViewtabparams", params); |
| | | router.push({ |
| | | name: "查看详情", |
| | | params:params, |
| | | query:{ |
| | | name:params.title |
| | | } |
| | | //params:params //加参数后页面刷新时会多一个选项卡 |
| | | }); |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | paramVOS.component=component; |
| | | let name="查看详情" |
| | | if(paramVOS.showname){ |
| | | name="查看【"+replaceFreeMarker(paramVOS.showname,options.dataStore,options.sourceData)+"】" |
| | | const name="查看【"+replaceFreeMarker(paramVOS.showname,options.dataStore,options.sourceData)+"】" |
| | | paramVOS.title=name; |
| | | } |
| | | paramVOS.title=name; |
| | | const dialogConstructor = Vue.extend(ViewDialog); |
| | | let instance = new dialogConstructor(); |
| | | instance.sourceData = options.sourceData; |
| | |
| | | :sourceData="sourceData" |
| | | :dataStore="dataStore" |
| | | :areasName="areasName" |
| | | :paramVOS="urlParams"></component> |
| | | :paramVOS="urlParams" |
| | | @setData="setData" |
| | | @setDataStore="setDataStore"></component> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | } |
| | | }, |
| | | watch: { |
| | | sourceData: { |
| | | sourceData:{ |
| | | handler(newval) { |
| | | //源数据有变化时变更当前区域数据 |
| | | console.log(this.areasName); |
| | | console.log(newval); |
| | | this.sourceDataMap(); |
| | | }, |
| | | deep: true, |
| | | immediate: true |
| | |
| | | }, |
| | | computed: {}, |
| | | created() { |
| | | this.customClass=this.componentVO.customClass; |
| | | this.componentVO.customClass.split(';').forEach(item=>{ |
| | | if(item.indexOf('web=')==0){ |
| | | this.customClass=item.split('web=')[1]; |
| | | } |
| | | }) |
| | | let urlParams = {}; |
| | | // 如果路径中存在 '?',则取问号前面部分给 parts |
| | | if (this.customClass.includes('?')) { |
| | | this.ComponentUrl = this.customClass.split("?")[0]; |
| | | urlParams = queryStringToObject(this.customClass); |
| | | } else { |
| | | this.ComponentUrl = this.customClass; // 不存在 '?' 整条路径就是 parts |
| | | } |
| | | if(validatenull(this.ComponentUrl) || ['ui', 'UI', 'base','bs'].includes(this.ComponentUrl)){ |
| | | this.ComponentUrl='views/base/UIContentViewerInDialog'; |
| | | }else if(this.ComponentUrl.indexOf('views/')===-1){ |
| | | this.ComponentUrl='views/custom-ui/'+this.ComponentUrl; |
| | | } |
| | | |
| | | if (this.ComponentUrl=='base/UIContentViewerInDialog' && (!urlParams.type || !urlParams.context)) { |
| | | this.isError = true; |
| | | return; |
| | | } |
| | | |
| | | this.btmType = urlParams.type; |
| | | this.context = urlParams.context; |
| | | this.urlParams = Object.assign({},this.paramVOS, urlParams) |
| | | this.loadCompoent(); |
| | | this.sourceDataMap(); |
| | | }, |
| | | mounted() { |
| | | //this.getHeight(this.$parent); |
| | | }, |
| | | methods: { |
| | | sourceDataMap: function () { |
| | | this.customClass=this.componentVO.customClass; |
| | | this.componentVO.customClass.split(';').forEach(item=>{ |
| | | if(item.indexOf('web=')==0){ |
| | | this.customClass=item.split('web=')[1]; |
| | | } |
| | | }) |
| | | let urlParams = {}; |
| | | // 如果路径中存在 '?',则取问号前面部分给 parts |
| | | if (this.customClass.includes('?')) { |
| | | this.ComponentUrl = this.customClass.split("?")[0]; |
| | | urlParams = queryStringToObject(this.customClass); |
| | | } else { |
| | | this.ComponentUrl = this.customClass; // 不存在 '?' 整条路径就是 parts |
| | | } |
| | | if(validatenull(this.ComponentUrl) || ['ui', 'UI', 'base','bs'].includes(this.ComponentUrl)){ |
| | | this.ComponentUrl='views/base/UIContentViewerInDialog'; |
| | | }else if(this.ComponentUrl.indexOf('views/')===-1){ |
| | | this.ComponentUrl='views/custom-ui/'+this.ComponentUrl; |
| | | } |
| | | |
| | | if (this.ComponentUrl=='base/UIContentViewerInDialog' && (!urlParams.type || !urlParams.context)) { |
| | | this.isError = true; |
| | | return; |
| | | } |
| | | |
| | | this.btmType = urlParams.type; |
| | | this.context = urlParams.context; |
| | | this.urlParams = Object.assign({},this.paramVOS, urlParams) |
| | | this.loadCompoent(); |
| | | }, |
| | | loadCompoent(){ |
| | | // 动态导入组件 |
| | | import(`@/${this.ComponentUrl}.vue`).then((module) => { |
| | |
| | | } else { |
| | | this.getHeight(el.$parent); |
| | | } |
| | | }, |
| | | setDataStore(value) { |
| | | this.$emit("setDataStore", value); |
| | | this.dataStore = value.dataStore; |
| | | }, |
| | | setData(value) { |
| | | this.$emit("setData", value); |
| | | } |
| | | } |
| | | } |
| | |
| | | }, |
| | | isShow: { |
| | | handler(newval) { |
| | | debugger; |
| | | if (newval && this.$el.clientHeight > 50) { |
| | | this.parentHeight = this.$el.clientHeight - this.$children[0].$children[1].$children[0].$el.clientHeight - this.$children[0].$children[2].$el.clientHeight - 5; |
| | | } |
| | |
| | | }, |
| | | 'sourceData':{ |
| | | handler(newval) { |
| | | if(newval) { |
| | | if(newval && Object.keys(newval).length>0) { |
| | | this.sourceDataMapParams=this.sourceDataMap(); |
| | | this.getParams(); |
| | | // this.handleRefresh(); |
| | | this.handleRefresh(); |
| | | } |
| | | }, |
| | | deep: true, |
| | |
| | | this.$refs.dataTable.rowView(row,index) |
| | | }, |
| | | rowClickChange(row){ |
| | | this.$refs.dataTable.toggleRowSelection(row); |
| | | this.$refs.dataTable.toggleRowSelection(row,true); |
| | | }, |
| | | selectChange(row) { |
| | | this.selectList = row; |
| | |
| | | this.isRefresh=false; |
| | | } |
| | | }) |
| | | |
| | | }).catch(error => { |
| | | this.$message.error(error); |
| | | }) |
| | |
| | | }) |
| | | } else { |
| | | const value = to.query.src || to.fullPath; |
| | | const label = to.query.name || to.name; |
| | | const label = to.query.name ||to.params.title|| to.name; |
| | | const meta = to.meta || router.$avueRouter.meta || {}; |
| | | const i18n = to.query.i18n; |
| | | if (to.query.target) { |
| | |
| | | import( /* webpackChunkName: "views" */ '@/views/work/process/leave/detail') |
| | | }] |
| | | },{ |
| | | path: '/viewTab', |
| | | path: '/base', |
| | | component: Layout, |
| | | redirect: '/viewTab/index', |
| | | redirect: '/viewTab', |
| | | children: [{ |
| | | path: 'index', |
| | | path: 'viewTab', |
| | | name: '查看详情', |
| | | meta: { |
| | | i18n: 'viewTab' |
| | |
| | | }, |
| | | getters, |
| | | state: { |
| | | viewtabparams:undefined, //查看tab Action参数 |
| | | viewtabparams:undefined, //tab浏览 Action参数 |
| | | }, |
| | | mutations: { |
| | | // 规程详情参数 |
| | |
| | | |
| | | <script> |
| | | import {validatenull} from "@/util/validate"; |
| | | import { getStore } from "@/util/store.js"; |
| | | import { getStore ,removeStore} from "@/util/store.js"; |
| | | |
| | | export default { |
| | | name: "ViewTab", |
| | |
| | | } |
| | | }, |
| | | computed:{ |
| | | title(){ |
| | | return this.paramVOS.title || "查看详情" |
| | | } |
| | | }, |
| | | created() { |
| | | let config = {}; |
| | | if (!validatenull(this.$store.state.viewtabparams)) { |
| | | config = this.$store.state.viewtabparams; |
| | | } else { |
| | | config = getStore('viewtabparams'); |
| | | config = getStore({ name:'viewtabparams'}); |
| | | } |
| | | this.sourceData = config.options.sourceData; |
| | | this.dataStore = config.options.dataStore; |
| | | this.paramVOS = config.paramVOS; |
| | | if(config){ |
| | | this.sourceData = config.options.sourceData; |
| | | this.dataStore = config.options.dataStore; |
| | | this.paramVOS = config.paramVOS; |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.loadCompoent(); |
| | | }, |
| | | beforeDestroy() { |
| | | //removeStore({ name:'viewtabparams', type:'session'}); |
| | | }, |
| | | methods: { |
| | | loadCompoent(){ |
| | |
| | | console.log('组件加载失败:', error); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | |
| | | } |
| | | </script> |
| | | |
| | |
| | | <template> |
| | | <avue-tree ref="tree" v-loading="treeLoading" :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | </avue-tree> |
| | | <div style="height: 720px"> |
| | | <avue-tree ref="tree" v-loading="treeLoading" :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | | <i class="el-icon-s-promotion"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | // console.log(this.sourceData); |
| | | console.log(this.dataStore); |
| | | // console.log(this.paramVOS); |
| | | console.log('this.dataStore',this.dataStore); |
| | | }, |
| | | methods: {} |
| | | methods: { |
| | | nodeClick(row) { |
| | | console.log(row); |
| | | this.$emit("setDataStore", { |
| | | area: 'westAreaInDialog', |
| | | type: 'tree', |
| | | btmType: 'workcontext', |
| | | dataStore: [row] |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | |
| | | // list.forEach(item => { |
| | | // this.form[item] = ""; |
| | | // }) |
| | | this.form.searchTarger = '1' |
| | | const searchTarger = this.option.column.find(item => item.prop === 'searchTarger'); // 获取搜索类型配置项 |
| | | searchTarger.display = true; // 切换默认展示搜索类型 |
| | | // 模板类型为表格 |
| | |
| | | labelWidth: "30%", |
| | | dicData: [{ |
| | | label: '否', |
| | | value: 0 |
| | | value: false |
| | | }, { |
| | | label: '是', |
| | | value: 1 |
| | | value: true |
| | | }] |
| | | }, |
| | | ] |