|
|
@@ -1,8 +1,5 @@
|
|
|
<template>
|
|
|
- <div
|
|
|
- class="app-container"
|
|
|
- style="position: absolute;height:calc(100% - 40px);width:100%;overflow-y: auto;overflow-x: hidden;"
|
|
|
- >
|
|
|
+ <div class="app-container" style="position: absolute;height:calc(100% - 40px);width:100%;overflow-y: auto;overflow-x: hidden;">
|
|
|
<!-- 服务配置 -->
|
|
|
<el-row type="flex" :gutter="10" style="line-height: 54px;height:100%">
|
|
|
<el-col style="height:100%;width:50%;padding-right:10px">
|
|
|
@@ -34,42 +31,12 @@
|
|
|
<el-col :span="10">
|
|
|
<el-button type="primary" size="small" @click="handleBtnClick('query', 'service')">查询</el-button>
|
|
|
<el-button type="primary" size="small" @click="handleBtnClick('add', 'service')">新增</el-button>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- size="small"
|
|
|
- :disabled="serviceChoosing.length !== 1"
|
|
|
- @click="handleBtnClick('edit', 'service')"
|
|
|
- >修改</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- size="small"
|
|
|
- :disabled="serviceChoosing.length === 0"
|
|
|
- @click="handleBtnClick('delete', 'service')"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" size="small" :disabled="serviceChoosing.length !== 1" @click="handleBtnClick('edit', 'service')">修改</el-button>
|
|
|
+ <el-button type="primary" size="small" :disabled="serviceChoosing.length === 0" @click="handleBtnClick('delete', 'service')">删除</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<div style="margin-top: 20px;height:100%;width:100%">
|
|
|
- <table-item
|
|
|
- :table-data="list"
|
|
|
- :column="column"
|
|
|
- :pagination="true"
|
|
|
- :pagesize="pagination.size"
|
|
|
- :currentpage="pagination.current"
|
|
|
- :tableheight="'calc(100% - 75px)'"
|
|
|
- :border="true"
|
|
|
- :multiple="true"
|
|
|
- :total="total"
|
|
|
- :fixed="false"
|
|
|
- :isdelete="true"
|
|
|
- :stripe="true"
|
|
|
- :is-select="false"
|
|
|
- @handleCurrentChange="handleCurrentChange"
|
|
|
- @handleSizeChange="handleSizeChange"
|
|
|
- @handleSelectionChange="serviceSelection"
|
|
|
- @rowDblclick="handleServiceDbclick"
|
|
|
- />
|
|
|
+ <table-item :table-data="list" :column="column" :pagination="true" :pagesize="pagination.size" :currentpage="pagination.current" :tableheight="'calc(100% - 75px)'" :border="true" :multiple="true" :total="total" :fixed="false" :isdelete="true" :stripe="true" :is-select="false" @handleCurrentChange="handleCurrentChange" @handleSizeChange="handleSizeChange" @handleSelectionChange="serviceSelection" @rowDblclick="handleServiceDbclick" />
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col style="height:100%;width:50%;padding-left:10px">
|
|
|
@@ -100,62 +67,19 @@
|
|
|
</el-col>
|
|
|
<el-col :span="10">
|
|
|
<el-button type="primary" size="small" @click="handleBtnClick('query', 'source')">查询</el-button>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- size="small"
|
|
|
- :disabled="serviceChoosing.length !== 1"
|
|
|
- @click="handleBtnClick('add', 'source')"
|
|
|
- >新增</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- size="small"
|
|
|
- :disabled="sourceChoosing.length !== 1"
|
|
|
- @click="handleBtnClick('edit', 'source')"
|
|
|
- >修改</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- size="small"
|
|
|
- :disabled="sourceChoosing.length === 0"
|
|
|
- @click="handleBtnClick('delete', 'source')"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" size="small" :disabled="serviceChoosing.length !== 1" @click="handleBtnClick('add', 'source')">新增</el-button>
|
|
|
+ <el-button type="primary" size="small" :disabled="sourceChoosing.length !== 1" @click="handleBtnClick('edit', 'source')">修改</el-button>
|
|
|
+ <el-button type="primary" size="small" :disabled="sourceChoosing.length === 0" @click="handleBtnClick('delete', 'source')">删除</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<div style="margin-top: 20px;height:100%;width:100%">
|
|
|
- <table-item
|
|
|
- :table-data="list1"
|
|
|
- :column="column2"
|
|
|
- :pagination="false"
|
|
|
- :tableheight="'calc(100% - 75px)'"
|
|
|
- :border="true"
|
|
|
- :multiple="true"
|
|
|
- :fixed="false"
|
|
|
- :isdelete="true"
|
|
|
- :is-select="false"
|
|
|
- @handleSelectionChange="sourceSelection"
|
|
|
- @rowDblclick="handleSourceDbclick"
|
|
|
- />
|
|
|
+ <table-item :table-data="list1" :column="column2" :pagination="false" :tableheight="'calc(100% - 75px)'" :border="true" :multiple="true" :fixed="false" :isdelete="true" :is-select="false" @handleSelectionChange="sourceSelection" @rowDblclick="handleSourceDbclick" />
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <el-dialog
|
|
|
- v-if="dialogShow"
|
|
|
- v-dialogDrag
|
|
|
- :visible.sync="dialogShow"
|
|
|
- :title="dialogTitle"
|
|
|
- width="600px"
|
|
|
- @close="closedialogShow"
|
|
|
- >
|
|
|
+ <el-dialog v-if="dialogShow" v-dialogDrag :visible.sync="dialogShow" :title="dialogTitle" width="600px" @close="closedialogShow">
|
|
|
<template v-if="currDialog === 'service'">
|
|
|
- <el-form
|
|
|
- ref="serviceInfoForm"
|
|
|
- :model="serviceInfo"
|
|
|
- :rules="serviceInfoRule"
|
|
|
- label-position="right"
|
|
|
- label-width="140px"
|
|
|
- >
|
|
|
+ <el-form ref="serviceInfoForm" :model="serviceInfo" :rules="serviceInfoRule" label-position="right" label-width="140px">
|
|
|
<el-form-item label="服务编码:" prop="code">
|
|
|
<el-input v-model="serviceInfo.code" size="small" placeholder="请输入服务编码" :disabled="currType !== 1" />
|
|
|
</el-form-item>
|
|
|
@@ -168,13 +92,7 @@
|
|
|
</el-form>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <el-form
|
|
|
- ref="sourceInfoForm"
|
|
|
- :model="sourceInfo"
|
|
|
- :rules="sourceInfoRule"
|
|
|
- label-position="right"
|
|
|
- label-width="140px"
|
|
|
- >
|
|
|
+ <el-form ref="sourceInfoForm" :model="sourceInfo" :rules="sourceInfoRule" label-position="right" label-width="140px">
|
|
|
<el-form-item label="资源编码:" prop="ckey">
|
|
|
<el-input v-model="sourceInfo.ckey" size="small" placeholder="请输入资源编码" :disabled="currType !== 1" />
|
|
|
</el-form-item>
|
|
|
@@ -185,16 +103,16 @@
|
|
|
<el-input v-model="sourceInfo.cval" size="small" placeholder="请输入资源值" />
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="visible" label="默认加载:">
|
|
|
- <el-select v-model="sourceInfo.visible" size="small">
|
|
|
+ <el-select style="width:100%" v-model="sourceInfo.visible" size="small">
|
|
|
<el-option value="0" label="否"></el-option>
|
|
|
<el-option value="1" label="是"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="第三方调用:">
|
|
|
+ <el-form-item style="width:100%" prop="thirdSys" label="第三方调用:">
|
|
|
<el-input size="small" v-model="sourceInfo.thirdSys" placeholder="第三方系统调用服务需填写" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="第三方默认加载:">
|
|
|
- <el-select size="small" v-model="sourceInfo.thirdSysAutoLoad">
|
|
|
+ <el-form-item prop="thirdSysAutoLoad" label="第三方默认加载:">
|
|
|
+ <el-select style="width:100%" size="small" v-model="sourceInfo.thirdSysAutoLoad">
|
|
|
<el-option value="0" label="否"></el-option>
|
|
|
<el-option value="1" label="是"></el-option>
|
|
|
</el-select>
|
|
|
@@ -289,9 +207,9 @@ export default class ServiceConfig extends Vue {
|
|
|
cval: undefined,
|
|
|
pid: undefined,
|
|
|
id: undefined,
|
|
|
- visible:"0",
|
|
|
- thirdSys:'',
|
|
|
- thirdSysAutoLoad:"0"
|
|
|
+ visible: '0',
|
|
|
+ thirdSys: '',
|
|
|
+ thirdSysAutoLoad: '0'
|
|
|
}
|
|
|
currDialog = 'service' // 弹窗当前为左侧服务
|
|
|
serviceChoosing = []
|
|
|
@@ -313,12 +231,22 @@ export default class ServiceConfig extends Vue {
|
|
|
Object.keys(this.serviceInfo).forEach((item) => {
|
|
|
this.serviceInfo[item] = undefined
|
|
|
})
|
|
|
- Object.keys(this.sourceInfo).forEach((item) => {
|
|
|
- this.sourceInfo[item] = undefined
|
|
|
- })
|
|
|
+ this.sourceInfo=this.defaultSourceInfo();
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
+ defaultSourceInfo() {
|
|
|
+ return {
|
|
|
+ ckey: undefined,
|
|
|
+ name: undefined,
|
|
|
+ cval: undefined,
|
|
|
+ pid: undefined,
|
|
|
+ id: undefined,
|
|
|
+ visible: '0',
|
|
|
+ thirdSys: '',
|
|
|
+ thirdSysAutoLoad: '0'
|
|
|
+ }
|
|
|
+ }
|
|
|
// 获取服务列
|
|
|
getServiceList() {
|
|
|
// if (this.serviceName !== '' || this.serviceCode !== '') {
|
|
|
@@ -328,7 +256,7 @@ export default class ServiceConfig extends Vue {
|
|
|
// name: this.serviceName || undefined,
|
|
|
// code: this.serviceCode || undefined,
|
|
|
current: this.pagination.current,
|
|
|
- size: this.pagination.size,
|
|
|
+ size: this.pagination.size
|
|
|
// 'orders[0].asc': false,
|
|
|
// 'orders[0].column': 'ID'
|
|
|
}
|
|
|
@@ -437,8 +365,8 @@ export default class ServiceConfig extends Vue {
|
|
|
const { code, name, type } = this.serviceChoosing[0]
|
|
|
this.serviceInfo = { code, name, type, id: undefined }
|
|
|
} else {
|
|
|
- const { ckey, name, cval, id } = this.sourceChoosing[0]
|
|
|
- this.sourceInfo = { ckey, name, cval, id, pid: undefined }
|
|
|
+ const { ckey, name, cval, id, visible, thirdSys, thirdSysAutoLoad } = this.sourceChoosing[0]
|
|
|
+ this.sourceInfo = { ckey, name, cval, id, pid: undefined, visible, thirdSys, thirdSysAutoLoad }
|
|
|
}
|
|
|
} else if (type === 'delete') {
|
|
|
const deleteList = dialog === 'service' ? this.serviceChoosing : this.sourceChoosing
|