Merge remote-tracking branch 'origin/master'
Showing
9 changed files
with
116 additions
and
39 deletions
... | @@ -22,6 +22,7 @@ | ... | @@ -22,6 +22,7 @@ |
22 | "normalize.css": "7.0.0", | 22 | "normalize.css": "7.0.0", |
23 | "nprogress": "0.2.0", | 23 | "nprogress": "0.2.0", |
24 | "vue": "2.6.10", | 24 | "vue": "2.6.10", |
25 | "vue-json-editor": "^1.4.3", | ||
25 | "vue-quill-editor": "^3.0.6", | 26 | "vue-quill-editor": "^3.0.6", |
26 | "vue-router": "3.0.2", | 27 | "vue-router": "3.0.2", |
27 | "vue-seamless-scroll": "^1.1.23", | 28 | "vue-seamless-scroll": "^1.1.23", | ... | ... |
... | @@ -32,6 +32,16 @@ export function getDjlxInfo (id) { | ... | @@ -32,6 +32,16 @@ export function getDjlxInfo (id) { |
32 | } | 32 | } |
33 | 33 | ||
34 | /* | 34 | /* |
35 | 获取登记类型信息-申请业务规则 | ||
36 | */ | ||
37 | export function getQllxByBsmSqyw (id) { | ||
38 | return request({ | ||
39 | url: SERVER.SERVERAPI + '/rest/system/sysSqdjyw/getQllxByBsmSqyw?bsmSqyw=' + id, | ||
40 | method: 'post' | ||
41 | }) | ||
42 | } | ||
43 | |||
44 | /* | ||
35 | 读取申请登记业务信息-申请业务规则 | 45 | 读取申请登记业务信息-申请业务规则 |
36 | */ | 46 | */ |
37 | export function getSqdjywDetail (bsmSqyw) { | 47 | export function getSqdjywDetail (bsmSqyw) { | ... | ... |
... | @@ -74,7 +74,7 @@ export default { | ... | @@ -74,7 +74,7 @@ export default { |
74 | interfaceMethods: ['webapi','webservice'], | 74 | interfaceMethods: ['webapi','webservice'], |
75 | interfaceTypes: [ | 75 | interfaceTypes: [ |
76 | {'label': '工作流服务平台','value':'1'}, | 76 | {'label': '工作流服务平台','value':'1'}, |
77 | {'label': '管理平台','value':'2'}, | 77 | {'label': '权限平台','value':'2'}, |
78 | {'label': '定时器服务','value':'3'}, | 78 | {'label': '定时器服务','value':'3'}, |
79 | {'label': '其他第三方平台','value':'4'}, | 79 | {'label': '其他第三方平台','value':'4'}, |
80 | ], | 80 | ], | ... | ... |
1 | <template> | 1 | <template> |
2 | <dialogBox title="调用接口" @submitForm="submitForm" saveButton="调用" width="50%" :isFullscreen="false" | 2 | <dialogBox title="调用接口" @submitForm="submitForm" saveButton="调用" width="50%" :isFullscreen="false" |
3 | @closeDialog="closeDialog" v-model="value"> | 3 | @closeDialog="closeDialog" v-model="value"> |
4 | <el-descriptions class="margin-top" :column="1" :size="16" border> | 4 | <el-descriptions class="margin-top" :column="1" size="16" border style="height:700px"> |
5 | <el-descriptions-item> | 5 | <el-descriptions-item> |
6 | <template slot="label" style="width:200px">接口代码</template>{{ruleForm.interfaceCode}} | 6 | <template slot="label" style="width:200px">接口代码</template>{{ruleForm.interfaceCode}} |
7 | </el-descriptions-item> | 7 | </el-descriptions-item> |
... | @@ -15,25 +15,39 @@ | ... | @@ -15,25 +15,39 @@ |
15 | <template slot="label">接口方式</template>{{ruleForm.interfaceMethod}} | 15 | <template slot="label">接口方式</template>{{ruleForm.interfaceMethod}} |
16 | </el-descriptions-item> | 16 | </el-descriptions-item> |
17 | <el-descriptions-item> | 17 | <el-descriptions-item> |
18 | <template slot="label">接口类型</template>{{ruleForm.interfaceType}} | 18 | <template slot="label">接口类型</template>{{getInterfaceType(ruleForm.interfaceType)}} |
19 | </el-descriptions-item> | 19 | </el-descriptions-item> |
20 | <el-descriptions-item> | 20 | <el-descriptions-item> |
21 | <template slot="label">接口参数</template><el-input v-model="interfaceParams" type="textarea" :rows="4"></el-input> | 21 | <template slot="label">接口参数</template> |
22 | <vue-json-editor | ||
23 | v-model="interfaceParams" | ||
24 | :showBtns="false" | ||
25 | :mode="'code'" | ||
26 | @json-change="onJsonChange" | ||
27 | @json-save="onJsonSave" | ||
28 | @has-error="onError"/> | ||
22 | </el-descriptions-item> | 29 | </el-descriptions-item> |
23 | <el-descriptions-item> | 30 | <el-descriptions-item> |
24 | <template slot="label">调用状态</template>{{returnMessage.statusCode}} | 31 | <template slot="label">调用状态</template> |
32 | <div style="color:green" v-if="returnMessage">{{returnMessage.statusCode}}</div> | ||
33 | <div style="color:red" v-else>ERROR</div> | ||
25 | </el-descriptions-item> | 34 | </el-descriptions-item> |
26 | <el-descriptions-item> | 35 | <el-descriptions-item> |
27 | <template slot="label">返回结果</template>{{returnMessage.body}} | 36 | <div slot="label" style="height:150px">返回结果 |
37 | </div> | ||
38 | <div v-if="returnMessage">{{returnMessage.body}}</div> | ||
39 | <div v-else>无效的接口CODE,请检查接口配置</div> | ||
28 | </el-descriptions-item> | 40 | </el-descriptions-item> |
29 | </el-descriptions> | 41 | </el-descriptions> |
30 | </dialogBox> | 42 | </dialogBox> |
31 | </template> | 43 | </template> |
32 | 44 | ||
33 | <script> | 45 | <script> |
46 | import vueJsonEditor from 'vue-json-editor' | ||
34 | import {interfaceRetrieve } from "@/api/jkfw.js" | 47 | import {interfaceRetrieve } from "@/api/jkfw.js" |
35 | export default { | 48 | export default { |
36 | components: { | 49 | components: { |
50 | vueJsonEditor | ||
37 | }, | 51 | }, |
38 | computed: { | 52 | computed: { |
39 | }, | 53 | }, |
... | @@ -46,25 +60,31 @@ export default { | ... | @@ -46,25 +60,31 @@ export default { |
46 | interfaceMethods: ['webapi','webservice'], | 60 | interfaceMethods: ['webapi','webservice'], |
47 | interfaceTypes: [ | 61 | interfaceTypes: [ |
48 | {'label': '工作流服务平台','value':'1'}, | 62 | {'label': '工作流服务平台','value':'1'}, |
49 | {'label': '管理平台','value':'2'}, | 63 | {'label': '权限平台','value':'2'}, |
50 | {'label': '定时器服务','value':'3'}, | 64 | {'label': '定时器服务','value':'3'}, |
51 | {'label': '其他第三方平台','value':'4'}, | 65 | {'label': '其他第三方平台','value':'4'}, |
52 | ], | 66 | ], |
53 | ruleForm: {}, | 67 | ruleForm: {}, |
54 | interfaceParams: '{\n\n}' , | 68 | interfaceParams: {} , |
55 | returnMessage: {}, | 69 | returnMessage: {}, |
70 | hasJsonFlag: true | ||
56 | } | 71 | } |
57 | }, | 72 | }, |
58 | methods: { | 73 | methods: { |
59 | //表单提交 | 74 | //表单提交 |
60 | submitForm () { | 75 | submitForm () { |
76 | console.log(this.interfaceParams); | ||
77 | console.log(this.hasJsonFlag); | ||
78 | if(!this.hasJsonFlag){ | ||
79 | return; | ||
80 | } | ||
61 | var formdata = new FormData(); | 81 | var formdata = new FormData(); |
62 | formdata.append("interfaceCode", this.ruleForm.interfaceCode); | 82 | formdata.append("interfaceCode", this.ruleForm.interfaceCode); |
63 | formdata.append("params", this.interfaceParams); | 83 | formdata.append("interfaceType", this.ruleForm.interfaceType); |
84 | formdata.append("params",JSON.stringify(this.interfaceParams)); | ||
64 | interfaceRetrieve(formdata).then(res => { | 85 | interfaceRetrieve(formdata).then(res => { |
65 | if(res.code == 200){ | 86 | if(res.code == 200){ |
66 | this.returnMessage = res.result | 87 | this.returnMessage = res.result |
67 | |||
68 | } | 88 | } |
69 | }) | 89 | }) |
70 | }, | 90 | }, |
... | @@ -75,12 +95,40 @@ export default { | ... | @@ -75,12 +95,40 @@ export default { |
75 | //关闭弹窗 | 95 | //关闭弹窗 |
76 | closeDialog () { | 96 | closeDialog () { |
77 | this.$emit("input", false); | 97 | this.$emit("input", false); |
78 | this.interfaceParams = '{\n\n}' | 98 | this.interfaceParams = {} |
79 | this.returnMessage = {} | 99 | this.returnMessage = {} |
80 | } | 100 | this.hasJsonFlag = true |
101 | }, | ||
102 | //获取接口类型 | ||
103 | getInterfaceType(code){ | ||
104 | let name = '' | ||
105 | for (let item of this.interfaceTypes) { | ||
106 | if (item.value == code) { | ||
107 | name = item.label; | ||
108 | break; | ||
109 | } | ||
110 | } | ||
111 | return name; | ||
112 | }, | ||
113 | onJsonChange(value){ | ||
114 | this.onJsonSave(); | ||
115 | }, | ||
116 | onJsonSave (value) { | ||
117 | this.interfaceParams = value | ||
118 | this.hasJsonFlag = true | ||
119 | }, | ||
120 | onError(value) { | ||
121 | this.hasJsonFlag = false | ||
122 | }, | ||
81 | } | 123 | } |
82 | } | 124 | } |
83 | </script> | 125 | </script> |
84 | <style scoped lang="scss"> | 126 | <style scoped lang="scss"> |
85 | @import "~@/styles/mixin.scss"; | 127 | @import "~@/styles/mixin.scss"; |
128 | /deep/ .is-bordered-label{ | ||
129 | width:100px | ||
130 | } | ||
131 | /deep/ .el-descriptions-item__content:nth-last-child(){ | ||
132 | height: 100px; | ||
133 | } | ||
86 | </style> | 134 | </style> | ... | ... |
... | @@ -49,7 +49,7 @@ class data extends filter { | ... | @@ -49,7 +49,7 @@ class data extends filter { |
49 | case '1': | 49 | case '1': |
50 | return <div>工作流服务平台</div> | 50 | return <div>工作流服务平台</div> |
51 | case '2': | 51 | case '2': |
52 | return <div>管理平台</div> | 52 | return <div>权限平台</div> |
53 | case '3': | 53 | case '3': |
54 | return <div>定时器服务</div> | 54 | return <div>定时器服务</div> |
55 | case '4': | 55 | case '4': | ... | ... |
... | @@ -379,7 +379,11 @@ export default { | ... | @@ -379,7 +379,11 @@ export default { |
379 | getDjlxInfo(this.sqqlRule.bsmSqyw).then((res) => { | 379 | getDjlxInfo(this.sqqlRule.bsmSqyw).then((res) => { |
380 | let { result } = res; | 380 | let { result } = res; |
381 | this.djlxList = result ? result : []; | 381 | this.djlxList = result ? result : []; |
382 | this.getDetail(this.djlxList[0].bsmSqyw); | 382 | if(this.djlxList.length>0){ |
383 | this.getDetail(this.djlxList[0].bsmSqyw); | ||
384 | }else{ | ||
385 | this.getDetail(this.sqqlRule.bsmSqyw); | ||
386 | } | ||
383 | }); | 387 | }); |
384 | //} | 388 | //} |
385 | }, | 389 | }, | ... | ... |
... | @@ -15,9 +15,9 @@ | ... | @@ -15,9 +15,9 @@ |
15 | > | 15 | > |
16 | <el-option | 16 | <el-option |
17 | v-for="item in qllxs" | 17 | v-for="item in qllxs" |
18 | :key="item.value" | 18 | :key="item.sxzdz" |
19 | :label="item.label" | 19 | :label="item.sxzdmc" |
20 | :value="item.value" | 20 | :value="item.sxzdz" |
21 | > | 21 | > |
22 | </el-option> | 22 | </el-option> |
23 | </el-select> | 23 | </el-select> |
... | @@ -93,15 +93,13 @@ import { defaultParameters } from "../javascript/publicDefaultPar.js"; | ... | @@ -93,15 +93,13 @@ import { defaultParameters } from "../javascript/publicDefaultPar.js"; |
93 | import table from "@/utils/mixin/table"; | 93 | import table from "@/utils/mixin/table"; |
94 | import jump from "./mixin/jump"; | 94 | import jump from "./mixin/jump"; |
95 | import { selectQlxx, startBusinessFlow } from "@/api/ywbl.js"; | 95 | import { selectQlxx, startBusinessFlow } from "@/api/ywbl.js"; |
96 | import { getQllxByBsmSqyw } from "@/api/system.js"; | ||
96 | export default { | 97 | export default { |
97 | mixins: [table, jump], | 98 | mixins: [table, jump], |
98 | props: { | 99 | props: { |
99 | isJump: { type: Boolean, default: false }, | 100 | isJump: { type: Boolean, default: false }, |
100 | djywbm: { type: String, default: "" }, | 101 | djywbm: { type: String, default: "" }, |
101 | djqxObj: { | 102 | djqxObj: { type: Object, default: {} }, |
102 | type: Object, | ||
103 | default: {}, | ||
104 | }, | ||
105 | bsmSqyw: { type: String, default: "" }, | 103 | bsmSqyw: { type: String, default: "" }, |
106 | }, | 104 | }, |
107 | data() { | 105 | data() { |
... | @@ -114,11 +112,24 @@ export default { | ... | @@ -114,11 +112,24 @@ export default { |
114 | data: [], | 112 | data: [], |
115 | }, | 113 | }, |
116 | bdcdysz: [], | 114 | bdcdysz: [], |
115 | bsmSqyw: "", | ||
117 | }; | 116 | }; |
118 | }, | 117 | }, |
119 | mounted() { | 118 | mounted() { |
120 | sendThis(this); | 119 | sendThis(this); |
121 | }, | 120 | }, |
121 | created() { | ||
122 | if (this.djqxObj.nodetype === "djlx") { | ||
123 | this.bsmSqyw = this.djqxObj.bsmSqyw; | ||
124 | } else { | ||
125 | this.bsmSqyw = this.djqxObj.parentid; | ||
126 | } | ||
127 | getQllxByBsmSqyw(this.bsmSqyw).then((res) => { | ||
128 | if (res.code === 200) { | ||
129 | this.qllxs = res.result ? res.result : []; | ||
130 | } | ||
131 | }); | ||
132 | }, | ||
122 | methods: { | 133 | methods: { |
123 | //点击行选中或取消复选框 | 134 | //点击行选中或取消复选框 |
124 | handleRowClick(row, column, event) { | 135 | handleRowClick(row, column, event) { |
... | @@ -128,13 +139,13 @@ export default { | ... | @@ -128,13 +139,13 @@ export default { |
128 | closeDialog() { | 139 | closeDialog() { |
129 | this.$emit("closeDialog"); | 140 | this.$emit("closeDialog"); |
130 | }, | 141 | }, |
131 | fetchData() { | 142 | fetchData() { |
132 | if(this.djqxObj.nodetype==="djlx"){ | 143 | //this.queryForm.bsmSqyw = this.bsmSqyw; |
133 | this.queryForm.bsmSqyw = this.djqxObj.bsmSqyw; | 144 | if (this.djqxObj.nodetype === "djlx") { |
134 | }else{ | 145 | this.queryForm.bsmSqyw = this.djqxObj.bsmSqyw; |
135 | this.queryForm.bsmSqyw = this.djqxObj.parentid; | 146 | } else { |
147 | this.queryForm.bsmSqyw = this.djqxObj.parentid; | ||
136 | } | 148 | } |
137 | console.log(this.queryForm); | ||
138 | selectQlxx({ ...this.queryForm, ...this.pageData }).then((res) => { | 149 | selectQlxx({ ...this.queryForm, ...this.pageData }).then((res) => { |
139 | if (res.code === 200) { | 150 | if (res.code === 200) { |
140 | let { total, records } = res.result; | 151 | let { total, records } = res.result; |
... | @@ -157,13 +168,13 @@ export default { | ... | @@ -157,13 +168,13 @@ export default { |
157 | if (res.code == 200) { | 168 | if (res.code == 200) { |
158 | this.$message({ | 169 | this.$message({ |
159 | showClose: true, | 170 | showClose: true, |
160 | message: '发起申请成功', | 171 | message: "发起申请成功", |
161 | type: 'success' | 172 | type: "success", |
162 | }) | 173 | }); |
163 | if (!this.isJump) { | 174 | if (!this.isJump) { |
164 | this.jump(res.result, this.djywbm) | 175 | this.jump(res.result, this.djywbm); |
165 | } else { | 176 | } else { |
166 | this.$emit('updateDialog', true) | 177 | this.$emit("updateDialog", true); |
167 | } | 178 | } |
168 | } else { | 179 | } else { |
169 | this.$message.error(res.message); | 180 | this.$message.error(res.message); | ... | ... |
1 | <template> | 1 | <template> |
2 | <dialogBox title="查询权利信息" width="85%" :isButton="false" :isMain="true" @closeDialog="closeDialog" v-model="myValue"> | 2 | <dialogBox :title="title" width="85%" :isButton="false" :isMain="true" @closeDialog="closeDialog" v-model="myValue"> |
3 | <component :is="editItem" @closeDialog="closeDialog" v-bind="$attrs" :isJump="isJump" id="slectBdc" | 3 | <component :is="editItem" @closeDialog="closeDialog" v-bind="$attrs" :isJump="isJump" id="slectBdc" |
4 | @updateDialog="updateDialog" :djywbm="djywbm" :key="key" /> | 4 | @updateDialog="updateDialog" :djywbm="djywbm" :key="key" :djqxObj="djqxObj"/> |
5 | </dialogBox> | 5 | </dialogBox> |
6 | </template> | 6 | </template> |
7 | <script> | 7 | <script> |
... | @@ -10,14 +10,15 @@ export default { | ... | @@ -10,14 +10,15 @@ export default { |
10 | props: { | 10 | props: { |
11 | isJump: { type: Boolean, default: false }, | 11 | isJump: { type: Boolean, default: false }, |
12 | value: { type: Boolean, default: true }, | 12 | value: { type: Boolean, default: true }, |
13 | djywbm: { type: String, default: '' } | 13 | djywbm: { type: String, default: '' }, |
14 | djqxObj: { type: Object, default: {} } | ||
14 | }, | 15 | }, |
15 | data () { | 16 | data () { |
16 | return { | 17 | return { |
18 | title:"", | ||
17 | key: 0, | 19 | key: 0, |
18 | editItem: '', | 20 | editItem: '', |
19 | myValue: this.value, | 21 | myValue: this.value |
20 | djqxObj:this.$attrs | ||
21 | } | 22 | } |
22 | }, | 23 | }, |
23 | watch: { | 24 | watch: { |
... | @@ -36,6 +37,7 @@ export default { | ... | @@ -36,6 +37,7 @@ export default { |
36 | }, | 37 | }, |
37 | methods: { | 38 | methods: { |
38 | loadView (view) { | 39 | loadView (view) { |
40 | this.title ="申请业务:"+this.djqxObj.djywmc; | ||
39 | return r => require.ensure([], () => r(require(`./components/${view}.vue`))) | 41 | return r => require.ensure([], () => r(require(`./components/${view}.vue`))) |
40 | }, | 42 | }, |
41 | closeDialog () { | 43 | closeDialog () { | ... | ... |
... | @@ -208,11 +208,12 @@ export default { | ... | @@ -208,11 +208,12 @@ export default { |
208 | item.cselect = false | 208 | item.cselect = false |
209 | }) | 209 | }) |
210 | this.btnDisabled = true | 210 | this.btnDisabled = true |
211 | item.cselect = true | 211 | item.cselect = true; |
212 | this.djqxObj = item; | ||
212 | if (item.sffqlc == '1') { | 213 | if (item.sffqlc == '1') { |
213 | this.btnDisabled = false | 214 | this.btnDisabled = false |
214 | this.bsmSqyw = item.bsmSqyw | 215 | this.bsmSqyw = item.bsmSqyw |
215 | this.djywbm = item.djywbm | 216 | this.djywbm = item.djywbm; |
216 | } else { | 217 | } else { |
217 | this.getNextNode(item.bsmSqyw, false) | 218 | this.getNextNode(item.bsmSqyw, false) |
218 | } | 219 | } | ... | ... |
-
Please register or sign in to post a comment