接口服务
Showing
10 changed files
with
586 additions
and
10 deletions
| ... | @@ -37,4 +37,14 @@ export function editDictNode (data) { | ... | @@ -37,4 +37,14 @@ export function editDictNode (data) { |
| 37 | method: 'post', | 37 | method: 'post', |
| 38 | data | 38 | data |
| 39 | }) | 39 | }) |
| 40 | } | ||
| 41 | |||
| 42 | /* | ||
| 43 | 刷新字典缓存 | ||
| 44 | */ | ||
| 45 | export function refreshDictCache () { | ||
| 46 | return request({ | ||
| 47 | url: SERVER.SERVERAPI + '/rest/sys/dict/refreshDictCache', | ||
| 48 | method: 'get' | ||
| 49 | }) | ||
| 40 | } | 50 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
src/api/jkfw.js
0 → 100644
| 1 | import request from '@/utils/request' | ||
| 2 | import SERVER from './config' | ||
| 3 | |||
| 4 | // 新增平台接口 | ||
| 5 | export function addSysInterface(data) { | ||
| 6 | return request({ | ||
| 7 | url: SERVER.SERVERAPI+"/rest/system/ptjk/addSysInterface", | ||
| 8 | method: 'post', | ||
| 9 | data | ||
| 10 | }) | ||
| 11 | } | ||
| 12 | |||
| 13 | // 编辑平台接口 | ||
| 14 | export function editSysInterface(data) { | ||
| 15 | return request({ | ||
| 16 | url: SERVER.SERVERAPI+"/rest/system/ptjk/editSysInterface", | ||
| 17 | method: 'post', | ||
| 18 | data | ||
| 19 | }) | ||
| 20 | } | ||
| 21 | // 接口调取 | ||
| 22 | export function interfaceRetrieve(data) { | ||
| 23 | return request({ | ||
| 24 | url: SERVER.SERVERAPI+"/rest/system/ptjk/interfaceRetrieve", | ||
| 25 | method: 'post', | ||
| 26 | data | ||
| 27 | }) | ||
| 28 | } | ||
| 29 | |||
| 30 | // 获取平台接口列表 | ||
| 31 | export function getSysInterfaceList(data) { | ||
| 32 | return request({ | ||
| 33 | url: SERVER.SERVERAPI+"/rest/system/ptjk/getSysInterfaceList", | ||
| 34 | method: 'post', | ||
| 35 | data | ||
| 36 | }) | ||
| 37 | } | ||
| 38 |
| ... | @@ -314,6 +314,26 @@ export const asyncRoutes = [ | ... | @@ -314,6 +314,26 @@ export const asyncRoutes = [ |
| 314 | meta: { title: '主机监控' } | 314 | meta: { title: '主机监控' } |
| 315 | }, | 315 | }, |
| 316 | ] | 316 | ] |
| 317 | }, | ||
| 318 | { | ||
| 319 | path: '/jkfw', | ||
| 320 | id: '7', | ||
| 321 | parentId: null, | ||
| 322 | component: Layout, | ||
| 323 | meta: { title: '接口服务', icon: 'system' }, | ||
| 324 | redirect: '/jkfw/ptjk', | ||
| 325 | alwaysShow: true, | ||
| 326 | name: 'jkfw', | ||
| 327 | children: [ | ||
| 328 | { | ||
| 329 | path: 'ptjk', | ||
| 330 | id: '71', | ||
| 331 | parentId: '7', | ||
| 332 | component: () => import('@/views/jkfw/ptjk/ptjk.vue'), | ||
| 333 | name: 'ptjk', | ||
| 334 | meta: { title: '平台接口' } | ||
| 335 | }, | ||
| 336 | ] | ||
| 317 | } | 337 | } |
| 318 | ] | 338 | ] |
| 319 | 339 | ... | ... |
src/views/jkfw/ptjk/components/addDialog.vue
0 → 100644
| 1 | <template> | ||
| 2 | <dialogBox :title="editFlag ? '编辑接口信息' : '新增接口信息'" @submitForm="submitForm" saveButton="保存" width="50%" :isFullscreen="false" | ||
| 3 | @closeDialog="closeDialog" v-model="value"> | ||
| 4 | <div> | ||
| 5 | <el-form ref="ruleForm" :model="ruleForm" label-width="100px" :rules="rules"> | ||
| 6 | <el-row> | ||
| 7 | <el-col :span="12"> | ||
| 8 | <el-form-item label="接口代码:" prop="interfaceCode"> | ||
| 9 | <el-input v-model="ruleForm.interfaceCode" :disabled="editFlag"></el-input> | ||
| 10 | </el-form-item> | ||
| 11 | </el-col> | ||
| 12 | <el-col :span="12"> | ||
| 13 | <el-form-item label="接口名称:" prop="interfaceService"> | ||
| 14 | <el-input v-model="ruleForm.interfaceService"></el-input> | ||
| 15 | </el-form-item> | ||
| 16 | </el-col> | ||
| 17 | </el-row> | ||
| 18 | <el-row> | ||
| 19 | <el-col :span="24"> | ||
| 20 | <el-form-item label="接口地址:" prop="interfaceApi"> | ||
| 21 | <el-input v-model="ruleForm.interfaceApi"></el-input> | ||
| 22 | </el-form-item> | ||
| 23 | </el-col> | ||
| 24 | </el-row> | ||
| 25 | <el-row> | ||
| 26 | <el-col :span="12"> | ||
| 27 | <el-form-item label="接口方式:" prop="interfaceMethod"> | ||
| 28 | <el-select v-model="ruleForm.interfaceMethod" class="width100" placeholder="请选择"> | ||
| 29 | <el-option v-for="item in interfaceMethods" :key="item" :label="item" :value="item" ></el-option> | ||
| 30 | </el-select> | ||
| 31 | </el-form-item> | ||
| 32 | </el-col> | ||
| 33 | <el-col :span="12"> | ||
| 34 | <el-form-item label="接口类型:" prop="interfaceType"> | ||
| 35 | <el-select v-model="ruleForm.interfaceType" class="width100" placeholder="请选择"> | ||
| 36 | <el-option v-for="item in interfaceTypes" :key="item.value" :label="item.label" :value="item.value"></el-option> | ||
| 37 | </el-select> | ||
| 38 | </el-form-item> | ||
| 39 | </el-col> | ||
| 40 | </el-row> | ||
| 41 | <el-row> | ||
| 42 | <el-col :span="24"> | ||
| 43 | <el-form-item label="接口密钥:" prop="interfaceKey"> | ||
| 44 | <el-input v-model="ruleForm.interfaceKey"></el-input> | ||
| 45 | </el-form-item> | ||
| 46 | </el-col> | ||
| 47 | </el-row> | ||
| 48 | <el-row> | ||
| 49 | <el-col :span="24"> | ||
| 50 | <el-form-item label="接口描述:" prop="interfaceDescription"> | ||
| 51 | <el-input v-model="ruleForm.interfaceDescription" type="textarea" :rows="4"></el-input> | ||
| 52 | </el-form-item> | ||
| 53 | </el-col> | ||
| 54 | </el-row> | ||
| 55 | </el-form> | ||
| 56 | </div> | ||
| 57 | </dialogBox> | ||
| 58 | </template> | ||
| 59 | |||
| 60 | <script> | ||
| 61 | import { addSysInterface, editSysInterface} from "@/api/jkfw.js" | ||
| 62 | export default { | ||
| 63 | components: { | ||
| 64 | }, | ||
| 65 | computed: { | ||
| 66 | }, | ||
| 67 | props: { | ||
| 68 | value: { type: Boolean, default: false }, | ||
| 69 | editFlag: {type: Boolean,default:false} | ||
| 70 | }, | ||
| 71 | data () { | ||
| 72 | return { | ||
| 73 | //表单提交数据 | ||
| 74 | interfaceMethods: ['webapi','webservice'], | ||
| 75 | interfaceTypes: [ | ||
| 76 | {'label': '工作流服务平台','value':'1'}, | ||
| 77 | {'label': '管理平台','value':'2'}, | ||
| 78 | {'label': '定时器服务','value':'3'}, | ||
| 79 | {'label': '其他第三方平台','value':'4'}, | ||
| 80 | ], | ||
| 81 | ruleForm: { | ||
| 82 | interfaceCode: '', | ||
| 83 | interfaceService: '', | ||
| 84 | interfaceDescription: '', | ||
| 85 | interfaceApi: '', | ||
| 86 | interfaceMethod: '', | ||
| 87 | interfaceType: '', | ||
| 88 | interfaceKey: '', | ||
| 89 | }, | ||
| 90 | rules: { | ||
| 91 | interfaceCode: [ | ||
| 92 | { required: true, message: '接口代码不能为空', trigger: 'blur' } | ||
| 93 | ], | ||
| 94 | interfaceService: [ | ||
| 95 | { required: true, message: '接口服务名称不能为空', trigger: 'blur' } | ||
| 96 | ], | ||
| 97 | interfaceApi: [ | ||
| 98 | { required: true, message: '接口api地址不能为空', trigger: 'blur' } | ||
| 99 | ], | ||
| 100 | interfaceMethod: [ | ||
| 101 | { required: true, message: '接口方式不能为空', trigger: 'change' } | ||
| 102 | ], | ||
| 103 | interfaceType: [ | ||
| 104 | { required: true, message: '入库编号不能为空', trigger: 'change' } | ||
| 105 | ], | ||
| 106 | }, | ||
| 107 | } | ||
| 108 | }, | ||
| 109 | methods: { | ||
| 110 | //表单提交 | ||
| 111 | submitForm () { | ||
| 112 | let that = this; | ||
| 113 | that.$refs.ruleForm.validate(valid => { | ||
| 114 | if (valid) { | ||
| 115 | if(this.editFlag){ | ||
| 116 | this.editInterface(); | ||
| 117 | }else{ | ||
| 118 | this.addInterface(); | ||
| 119 | } | ||
| 120 | } else { | ||
| 121 | // console.log('error submit!!'); | ||
| 122 | return false; | ||
| 123 | } | ||
| 124 | }); | ||
| 125 | }, | ||
| 126 | //新增接口 | ||
| 127 | addInterface(){ | ||
| 128 | addSysInterface(this.ruleForm).then(res => { | ||
| 129 | if(res.code == 200){ | ||
| 130 | this.$message.success("保存成功"); | ||
| 131 | this.closeDialog(); | ||
| 132 | this.$parent.queryClick(); | ||
| 133 | }else{ | ||
| 134 | this.$message.error(res.message) | ||
| 135 | } | ||
| 136 | }) | ||
| 137 | }, | ||
| 138 | //编辑接口 | ||
| 139 | editInterface(){ | ||
| 140 | editSysInterface(this.ruleForm).then(res => { | ||
| 141 | if(res.code == 200){ | ||
| 142 | this.$message.success("编辑成功"); | ||
| 143 | this.closeDialog(); | ||
| 144 | this.$parent.queryClick(); | ||
| 145 | }else{ | ||
| 146 | this.$message.error(res.message) | ||
| 147 | } | ||
| 148 | }) | ||
| 149 | }, | ||
| 150 | //获取详情 | ||
| 151 | getDetailInfo(item){ | ||
| 152 | this.ruleForm = item | ||
| 153 | }, | ||
| 154 | //关闭弹窗 | ||
| 155 | closeDialog () { | ||
| 156 | this.$emit("input", false); | ||
| 157 | this.ruleForm = { | ||
| 158 | interfaceCode: '', | ||
| 159 | interfaceService: '', | ||
| 160 | interfaceDescription: '', | ||
| 161 | interfaceApi: '', | ||
| 162 | interfaceMethod: '', | ||
| 163 | interfaceType: '', | ||
| 164 | interfaceKey: '', | ||
| 165 | } | ||
| 166 | } | ||
| 167 | } | ||
| 168 | } | ||
| 169 | </script> | ||
| 170 | <style scoped lang="scss"> | ||
| 171 | @import "~@/styles/mixin.scss"; | ||
| 172 | </style> |
| 1 | <template> | ||
| 2 | <dialogBox title="调用接口" @submitForm="submitForm" saveButton="调用" width="50%" :isFullscreen="false" | ||
| 3 | @closeDialog="closeDialog" v-model="value"> | ||
| 4 | <el-descriptions class="margin-top" :column="1" :size="16" border> | ||
| 5 | <el-descriptions-item> | ||
| 6 | <template slot="label" style="width:200px">接口代码</template>{{ruleForm.interfaceCode}} | ||
| 7 | </el-descriptions-item> | ||
| 8 | <el-descriptions-item> | ||
| 9 | <template slot="label">接口名称</template>{{ruleForm.interfaceService}} | ||
| 10 | </el-descriptions-item> | ||
| 11 | <el-descriptions-item> | ||
| 12 | <template slot="label">接口地址</template>{{ruleForm.interfaceApi}} | ||
| 13 | </el-descriptions-item> | ||
| 14 | <el-descriptions-item> | ||
| 15 | <template slot="label">接口方式</template>{{ruleForm.interfaceMethod}} | ||
| 16 | </el-descriptions-item> | ||
| 17 | <el-descriptions-item> | ||
| 18 | <template slot="label">接口类型</template>{{ruleForm.interfaceType}} | ||
| 19 | </el-descriptions-item> | ||
| 20 | <el-descriptions-item> | ||
| 21 | <template slot="label">接口参数</template><el-input v-model="interfaceParams" type="textarea" :rows="4"></el-input> | ||
| 22 | </el-descriptions-item> | ||
| 23 | <el-descriptions-item> | ||
| 24 | <template slot="label">调用状态</template>{{returnMessage.statusCode}} | ||
| 25 | </el-descriptions-item> | ||
| 26 | <el-descriptions-item> | ||
| 27 | <template slot="label">返回结果</template>{{returnMessage.body}} | ||
| 28 | </el-descriptions-item> | ||
| 29 | </el-descriptions> | ||
| 30 | </dialogBox> | ||
| 31 | </template> | ||
| 32 | |||
| 33 | <script> | ||
| 34 | import {interfaceRetrieve } from "@/api/jkfw.js" | ||
| 35 | export default { | ||
| 36 | components: { | ||
| 37 | }, | ||
| 38 | computed: { | ||
| 39 | }, | ||
| 40 | props: { | ||
| 41 | value: { type: Boolean, default: false }, | ||
| 42 | }, | ||
| 43 | data () { | ||
| 44 | return { | ||
| 45 | //表单提交数据 | ||
| 46 | interfaceMethods: ['webapi','webservice'], | ||
| 47 | interfaceTypes: [ | ||
| 48 | {'label': '工作流服务平台','value':'1'}, | ||
| 49 | {'label': '管理平台','value':'2'}, | ||
| 50 | {'label': '定时器服务','value':'3'}, | ||
| 51 | {'label': '其他第三方平台','value':'4'}, | ||
| 52 | ], | ||
| 53 | ruleForm: {}, | ||
| 54 | interfaceParams: '{\n\n}' , | ||
| 55 | returnMessage: {}, | ||
| 56 | } | ||
| 57 | }, | ||
| 58 | methods: { | ||
| 59 | //表单提交 | ||
| 60 | submitForm () { | ||
| 61 | var formdata = new FormData(); | ||
| 62 | formdata.append("interfaceCode", this.ruleForm.interfaceCode); | ||
| 63 | formdata.append("params", this.interfaceParams); | ||
| 64 | interfaceRetrieve(formdata).then(res => { | ||
| 65 | if(res.code == 200){ | ||
| 66 | this.returnMessage = res.result | ||
| 67 | |||
| 68 | } | ||
| 69 | }) | ||
| 70 | }, | ||
| 71 | //获取详情 | ||
| 72 | getDetailInfo(item){ | ||
| 73 | this.ruleForm = item | ||
| 74 | }, | ||
| 75 | //关闭弹窗 | ||
| 76 | closeDialog () { | ||
| 77 | this.$emit("input", false); | ||
| 78 | this.interfaceParams = '{\n\n}' | ||
| 79 | this.returnMessage = {} | ||
| 80 | } | ||
| 81 | } | ||
| 82 | } | ||
| 83 | </script> | ||
| 84 | <style scoped lang="scss"> | ||
| 85 | @import "~@/styles/mixin.scss"; | ||
| 86 | </style> |
src/views/jkfw/ptjk/ptjk.vue
0 → 100644
| 1 | <template> | ||
| 2 | <div class="from-clues"> | ||
| 3 | <!-- 表单部分 --> | ||
| 4 | <div class="from-clues-header"> | ||
| 5 | <el-form :model="queryForm" ref="queryForm" @submit.native.prevent label-width="80px"> | ||
| 6 | <el-row> | ||
| 7 | <el-col :span="5"> | ||
| 8 | <el-form-item label="业务号"> | ||
| 9 | <el-input placeholder="请输入业务号" v-model="queryForm.ywh" @clear="queryClick" clearable class="width100"> | ||
| 10 | </el-input> | ||
| 11 | </el-form-item> | ||
| 12 | </el-col> | ||
| 13 | <el-col :span="5"> | ||
| 14 | <el-form-item label="业务号"> | ||
| 15 | <el-input placeholder="请输入业务号" v-model="queryForm.ywh" @clear="queryClick" clearable class="width100"> | ||
| 16 | </el-input> | ||
| 17 | </el-form-item> | ||
| 18 | </el-col> | ||
| 19 | <el-col :span="14" class="btnColRight"> | ||
| 20 | <el-form-item> | ||
| 21 | <el-button type="primary" native-type="submit" @click="queryClick">查询</el-button> | ||
| 22 | <el-button type="primary" @click="openDialog()">新增</el-button> | ||
| 23 | </el-form-item> | ||
| 24 | </el-col> | ||
| 25 | </el-row> | ||
| 26 | </el-form> | ||
| 27 | </div> | ||
| 28 | <!-- 表格 --> | ||
| 29 | <div class="from-clues-content"> | ||
| 30 | <lb-table :page-size="pageData.size" border :current-page.sync="pageData.current" :total="tableData.total" | ||
| 31 | @size-change="handleSizeChange" @p-current-change="handleCurrentChange" :column="tableData.columns" | ||
| 32 | :data="tableData.data"> | ||
| 33 | </lb-table> | ||
| 34 | </div> | ||
| 35 | <addDialog ref="addDialog" v-model="addDialog" :editFlag="editFlag"/> | ||
| 36 | <retrieveDialog ref="retrieveDialog" v-model="retrieveDialog"/> | ||
| 37 | </div> | ||
| 38 | </template> | ||
| 39 | <script> | ||
| 40 | import { mapGetters } from 'vuex' | ||
| 41 | import table from "@/utils/mixin/table" | ||
| 42 | import { datas, sendThis } from "./ptjkdata" | ||
| 43 | import { getSysInterfaceList} from '@/api/jkfw' | ||
| 44 | import addDialog from "./components/addDialog.vue" | ||
| 45 | import retrieveDialog from "./components/retrieveDialog.vue" | ||
| 46 | export default { | ||
| 47 | name: "ptjk", | ||
| 48 | components: { addDialog,retrieveDialog }, | ||
| 49 | mixins: [table], | ||
| 50 | mounted () { | ||
| 51 | sendThis(this); | ||
| 52 | this.queryClick() | ||
| 53 | }, | ||
| 54 | computed: { | ||
| 55 | ...mapGetters(['dictData']) | ||
| 56 | }, | ||
| 57 | data () { | ||
| 58 | return { | ||
| 59 | addDialog: false, | ||
| 60 | retrieveDialog: false, | ||
| 61 | editFlag: false, | ||
| 62 | queryForm: { | ||
| 63 | ywly: "", | ||
| 64 | qllx: "", | ||
| 65 | djlx: "", | ||
| 66 | ywh: "", | ||
| 67 | }, | ||
| 68 | tableData: { | ||
| 69 | total: 0, | ||
| 70 | columns: datas.columns(), | ||
| 71 | data: [], | ||
| 72 | }, | ||
| 73 | }; | ||
| 74 | }, | ||
| 75 | methods: { | ||
| 76 | queryClick(){ | ||
| 77 | this.$startLoading() | ||
| 78 | getSysInterfaceList({ ...this.ruleForm, ...this.pageData }, { 'target': '#ptjkLoading' }).then(res => { | ||
| 79 | this.$endLoading() | ||
| 80 | if(res.code == 200){ | ||
| 81 | let { total, records } = res.result | ||
| 82 | this.tableData.total = total; | ||
| 83 | this.tableData.data = records ? records : [] | ||
| 84 | } | ||
| 85 | }) | ||
| 86 | }, | ||
| 87 | //打开新增 | ||
| 88 | openDialog(){ | ||
| 89 | this.editFlag = false; | ||
| 90 | this.addDialog = true; | ||
| 91 | }, | ||
| 92 | //打开编辑 | ||
| 93 | editInterface(item){ | ||
| 94 | this.editFlag = true; | ||
| 95 | this.addDialog = true; | ||
| 96 | this.$refs.addDialog.getDetailInfo(item); | ||
| 97 | }, | ||
| 98 | //打开调试窗口 | ||
| 99 | tuneInterface(item){ | ||
| 100 | this.retrieveDialog = true; | ||
| 101 | this.$refs.retrieveDialog.getDetailInfo(item); | ||
| 102 | } | ||
| 103 | } | ||
| 104 | }; | ||
| 105 | </script> | ||
| 106 | <style scoped lang="scss"> | ||
| 107 | @import "~@/styles/public.scss"; | ||
| 108 | </style> |
src/views/jkfw/ptjk/ptjkdata.js
0 → 100644
| 1 | import filter from '@/utils/filter.js' | ||
| 2 | let vm = null | ||
| 3 | |||
| 4 | const sendThis = (_this) => { | ||
| 5 | vm = _this | ||
| 6 | } | ||
| 7 | class data extends filter { | ||
| 8 | constructor() { | ||
| 9 | super() | ||
| 10 | } | ||
| 11 | columns () { | ||
| 12 | return [ | ||
| 13 | { | ||
| 14 | label: '序号', | ||
| 15 | type: 'index', | ||
| 16 | width: '50', | ||
| 17 | render: (h, scope) => { | ||
| 18 | return ( | ||
| 19 | <div> | ||
| 20 | {(vm.pageData.currentPage - 1) * vm.pageData.pageSize + scope.$index + 1} | ||
| 21 | </div> | ||
| 22 | ) | ||
| 23 | } | ||
| 24 | }, | ||
| 25 | { | ||
| 26 | prop: "interfaceCode", | ||
| 27 | label: "接口代码", | ||
| 28 | }, | ||
| 29 | { | ||
| 30 | prop: "interfaceService", | ||
| 31 | label: "接口服务名称", | ||
| 32 | }, | ||
| 33 | { | ||
| 34 | prop: "interfaceDescription", | ||
| 35 | label: "接口描述", | ||
| 36 | }, | ||
| 37 | { | ||
| 38 | prop: "interfaceApi", | ||
| 39 | label: "接口访问地址", | ||
| 40 | }, | ||
| 41 | { | ||
| 42 | prop: "interfaceMethod", | ||
| 43 | label: "接口方式", | ||
| 44 | }, | ||
| 45 | { | ||
| 46 | label: "接口类型", | ||
| 47 | render: (h, scope) => { | ||
| 48 | switch (scope.row.interfaceType) { | ||
| 49 | case '1': | ||
| 50 | return <div>工作流服务平台</div> | ||
| 51 | case '2': | ||
| 52 | return <div>管理平台</div> | ||
| 53 | case '3': | ||
| 54 | return <div>定时器服务</div> | ||
| 55 | case '4': | ||
| 56 | return <div>其他第三方平台</div> | ||
| 57 | } | ||
| 58 | } | ||
| 59 | }, | ||
| 60 | { | ||
| 61 | label: '操作', | ||
| 62 | align: 'center', | ||
| 63 | fixed: 'right', | ||
| 64 | render: (h, scope) => { | ||
| 65 | return <div> | ||
| 66 | <el-button type="text" icon="el-icon-view" onClick={() => { vm.tuneInterface(scope.row) }}>调用</el-button> | ||
| 67 | <el-button type="text" icon="el-icon-edit" onClick={() => { vm.editInterface(scope.row) }}>编辑</el-button> | ||
| 68 | </div> | ||
| 69 | } | ||
| 70 | } | ||
| 71 | ] | ||
| 72 | } | ||
| 73 | } | ||
| 74 | let datas = new data() | ||
| 75 | export { | ||
| 76 | datas, | ||
| 77 | sendThis | ||
| 78 | } |
| ... | @@ -35,7 +35,7 @@ | ... | @@ -35,7 +35,7 @@ |
| 35 | </template> | 35 | </template> |
| 36 | <script> | 36 | <script> |
| 37 | import table from "@/utils/mixin/table" | 37 | import table from "@/utils/mixin/table" |
| 38 | import { getQlxxDictList, getChildDictList } from "@/api/dict.js" | 38 | import { getQlxxDictList, getChildDictList,refreshDictCache } from "@/api/dict.js" |
| 39 | import { datas, sendThis } from "./dictionaries" | 39 | import { datas, sendThis } from "./dictionaries" |
| 40 | import editDialog from "./components/editDialog.vue" | 40 | import editDialog from "./components/editDialog.vue" |
| 41 | export default { | 41 | export default { |
| ... | @@ -78,11 +78,30 @@ export default { | ... | @@ -78,11 +78,30 @@ export default { |
| 78 | this.tableData.total = total ? total : 0 | 78 | this.tableData.total = total ? total : 0 |
| 79 | }) | 79 | }) |
| 80 | }, | 80 | }, |
| 81 | async handleRefresh () { | 81 | handleRefresh () { |
| 82 | let refech = await this.$store.dispatch('dict/generateDic') | 82 | this.$confirm('是否确认刷新', '提示', { |
| 83 | refech && this.$message({ | 83 | confirmButtonText: '确定', |
| 84 | message: '刷新成功', | 84 | cancelButtonText: '取消', |
| 85 | type: 'success' | 85 | type: 'warning' |
| 86 | }).then(() => { | ||
| 87 | this.$startLoading() | ||
| 88 | refreshDictCache().then(res => { | ||
| 89 | if (res.code == 200) { | ||
| 90 | let refech = this.$store.dispatch('dict/generateDic') | ||
| 91 | this.$endLoading() | ||
| 92 | refech && this.$message({ | ||
| 93 | message: '刷新成功', | ||
| 94 | type: 'success' | ||
| 95 | }); | ||
| 96 | } else { | ||
| 97 | this.$message.error(res.message) | ||
| 98 | } | ||
| 99 | }) | ||
| 100 | }).catch(() => { | ||
| 101 | this.$message({ | ||
| 102 | type: 'info', | ||
| 103 | message: '取消刷新' | ||
| 104 | }); | ||
| 86 | }); | 105 | }); |
| 87 | }, | 106 | }, |
| 88 | editClick (row, val) { | 107 | editClick (row, val) { | ... | ... |
| ... | @@ -29,7 +29,7 @@ class data extends filter { | ... | @@ -29,7 +29,7 @@ class data extends filter { |
| 29 | // } | 29 | // } |
| 30 | }, | 30 | }, |
| 31 | { | 31 | { |
| 32 | prop: "qllxmc", | 32 | prop: "qllx", |
| 33 | label: "权利类型" | 33 | label: "权利类型" |
| 34 | }, | 34 | }, |
| 35 | { | 35 | { |
| ... | @@ -42,7 +42,7 @@ class data extends filter { | ... | @@ -42,7 +42,7 @@ class data extends filter { |
| 42 | label: "不动产权证号" | 42 | label: "不动产权证号" |
| 43 | }, | 43 | }, |
| 44 | { | 44 | { |
| 45 | prop: "qlrmc", | 45 | prop: "qlr", |
| 46 | label: "权利人" | 46 | label: "权利人" |
| 47 | }, | 47 | }, |
| 48 | { | 48 | { | ... | ... |
| ... | @@ -350,7 +350,11 @@ export default { | ... | @@ -350,7 +350,11 @@ export default { |
| 350 | bestepid: this.bestepid, | 350 | bestepid: this.bestepid, |
| 351 | }).then((res) => { | 351 | }).then((res) => { |
| 352 | if (res.code === 200) { | 352 | if (res.code === 200) { |
| 353 | this.send(res.result); | 353 | if(res.result){ |
| 354 | this.sendToNext(res.result); | ||
| 355 | }else{ | ||
| 356 | this.sendToEnd(); | ||
| 357 | } | ||
| 354 | } | 358 | } |
| 355 | }); | 359 | }); |
| 356 | break; | 360 | break; |
| ... | @@ -494,7 +498,7 @@ export default { | ... | @@ -494,7 +498,7 @@ export default { |
| 494 | this.componentTag = getForm(tabname, this.$route.query.sqywbm); | 498 | this.componentTag = getForm(tabname, this.$route.query.sqywbm); |
| 495 | }, | 499 | }, |
| 496 | //发送下一个环节 | 500 | //发送下一个环节 |
| 497 | send (obj) { | 501 | sendToNext (obj) { |
| 498 | const h = this.$createElement; | 502 | const h = this.$createElement; |
| 499 | this.$msgbox({ | 503 | this.$msgbox({ |
| 500 | title: "您确定转出吗?", | 504 | title: "您确定转出吗?", |
| ... | @@ -541,6 +545,47 @@ export default { | ... | @@ -541,6 +545,47 @@ export default { |
| 541 | }); | 545 | }); |
| 542 | }); | 546 | }); |
| 543 | }, | 547 | }, |
| 548 | sendToEnd() { | ||
| 549 | const h = this.$createElement; | ||
| 550 | this.$msgbox({ | ||
| 551 | title: "您确定转出吗?", | ||
| 552 | message: "此环节为流程结束环节,转出后流程将结束", | ||
| 553 | showCancelButton: true, | ||
| 554 | beforeClose: (action, instance, done) => { | ||
| 555 | if (action === "confirm") { | ||
| 556 | instance.confirmButtonLoading = true; | ||
| 557 | instance.confirmButtonText = "执行中..."; | ||
| 558 | completeTask({ | ||
| 559 | bsmSlsq: this.bsmSlsq, | ||
| 560 | shyj: "this.bestepid", | ||
| 561 | stepform: JSON.stringify(this.tabList), | ||
| 562 | }).then((res) => { | ||
| 563 | if (res.code === 200) { | ||
| 564 | instance.confirmButtonLoading = false; | ||
| 565 | this.$message.success("转件成功"); | ||
| 566 | setTimeout(() => { | ||
| 567 | window.opener = null; | ||
| 568 | window.open("about:blank", "_self"); | ||
| 569 | window.close(); | ||
| 570 | this.$emit("input", false); | ||
| 571 | }, 1000); | ||
| 572 | } else { | ||
| 573 | instance.confirmButtonLoading = false; | ||
| 574 | instance.confirmButtonText = "确定"; | ||
| 575 | this.$message.error(res.message); | ||
| 576 | } | ||
| 577 | }); | ||
| 578 | } else { | ||
| 579 | done(); | ||
| 580 | } | ||
| 581 | }, | ||
| 582 | }).then((action) => { | ||
| 583 | this.$message({ | ||
| 584 | type: "info", | ||
| 585 | message: "action: " + action, | ||
| 586 | }); | ||
| 587 | }); | ||
| 588 | } | ||
| 544 | }, | 589 | }, |
| 545 | }; | 590 | }; |
| 546 | </script> | 591 | </script> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment