Commit 5b24dfc3 by 黄燕娟

feat:接口联调

parent fa7175ac
......@@ -3,4 +3,5 @@ VUE_APP_MODE = 'development'
# Jeeplus快速开发平台/开发环境
VUE_APP_BASE_API = '/api'
VITE_AXIOS_API_PRIMARY = 'http://rapidplatform.meiqicloud.com/'
VUE_APP_SERVER_URL = 'http://rapidplatform.meiqicloud.com/'
......@@ -4,5 +4,6 @@ VUE_APP_BASE_API = '/api'
#Jeeplus快速开发平台/后台地址
#VUE_APP_SERVER_URL = 'http://szpastest.tianma.cn/api'
VITE_AXIOS_API_PRIMARY = 'http://rapidplatform.meiqicloud.com/'
VUE_APP_SERVER_URL = 'http://172.16.100.28/api'
# 生产环境配置
VUE_APP_MODE = 'production'
VUE_APP_BASE_API = '/api'
VITE_AXIOS_API_PRIMARY = 'http://rapidplatform.meiqicloud.com/'
VUE_APP_SERVER_URL = ''http://172.16.100.29/api'
# 开发环境配置
VUE_APP_MODE = 'stage'
VUE_APP_BASE_API = '/api'
VITE_AXIOS_API_PRIMARY = 'http://rapidplatform.meiqicloud.com/'
VUE_APP_SERVER_URL = 'https://sz-tianma-test.meiqicloud.com/api'
\ No newline at end of file
# 开发环境配置
VUE_APP_MODE = 'test'
VUE_APP_BASE_API = '/api'
VITE_AXIOS_API_PRIMARY = 'http://rapidplatform.meiqicloud.com/'
VUE_APP_SERVER_URL = 'http://sz-tianma.meiqicloud.com/api'
......@@ -4,9 +4,9 @@ import request from '@/api/request.js'
// 查询组织架构树
export function getOrgTree(param) {
return request({
url: 'oa/org/tree',
method: 'get',
params: param
url: 'a/sys/office/tree',
method: 'post',
data: param
})
}
......
import request from '@/api/request.js'
import {syncRequest} from './request.js'
import { syncRequest } from './request.js'
/**
*
......@@ -9,11 +9,11 @@ import {syncRequest} from './request.js'
* @param skipEmpty 是否跳过空部门
* @returns {Promise<unknown>}
*/
export function getUserLeader(level, deptId, skipEmpty){
export function getUserLeader(level, deptId, skipEmpty) {
return request({
url: `wflow/process/step/leader/level`,
method: 'get',
params: {level: level, deptId: deptId, skipEmpty: skipEmpty}
params: { level: level, deptId: deptId, skipEmpty: skipEmpty }
})
}
......@@ -23,11 +23,11 @@ export function getUserLeader(level, deptId, skipEmpty){
* @param deptId 部门ID
* @param skipEmpty 是否跳过空部门
*/
export function getUserLeaders(maxLevel, deptId, skipEmpty){
export function getUserLeaders(maxLevel, deptId, skipEmpty) {
return request({
url: `wflow/process/step/leader/to/level`,
method: 'get',
params: {maxLevel: maxLevel, deptId: deptId, skipEmpty: skipEmpty}
params: { maxLevel: maxLevel, deptId: deptId, skipEmpty: skipEmpty }
})
}
......@@ -35,7 +35,7 @@ export function getUserLeaders(maxLevel, deptId, skipEmpty){
* 获取指定系统角色的所有人员
* @param roles
*/
export function getUsersByRoles(roles){
export function getUsersByRoles(roles) {
return request({
url: `wflow/process/step/userByRoles`,
method: 'post',
......@@ -47,7 +47,7 @@ export function getUsersByRoles(roles){
* 查询所有部门主管
* @param deptIds 部门ID
*/
export function getLeaderByDepts(deptIds){
export function getLeaderByDepts(deptIds) {
return request({
url: `wflow/process/step/deptLeader`,
method: 'post',
......@@ -60,7 +60,7 @@ export function getLeaderByDepts(deptIds){
* @param userId 该人员ID
* @param depts 部门 List
*/
export function userInDepts(userId, depts){
export function userInDepts(userId, depts) {
let result = false
syncRequest({
url: `/wflow/process/step/user/${userId}/belong/depts`,
......@@ -74,43 +74,43 @@ export function userInDepts(userId, depts){
return result
}
export function getNewVerProcess(code){
export function getNewVerProcess(code) {
return request({
url: `wflow/process/model/${code}`,
method: 'get'
})
}
export function saveProcess(params){
export function saveProcess(params) {
return request({
url: `wflow/process/model/save/`,
url: `wflow/process/model/save`,
method: 'post',
data: params
})
}
export function deployProcess(code){
export function deployProcess(code) {
return request({
url: `wflow/process/model/deploy/${code}`,
method: 'post'
})
}
export function getCustomPrintConfig(instanceId){
export function getCustomPrintConfig(instanceId) {
return request({
url: `wflow/process/model/customPrint/${instanceId}`,
method: 'get'
})
}
export function delProcessInst(instanceId){
export function delProcessInst(instanceId) {
return request({
url: `wflow/process/instance/${instanceId}`,
method: 'delete'
})
}
export function startProcess(code, params){
export function startProcess(code, params) {
return request({
url: `wflow/process/start/${code}`,
method: 'post',
......
......@@ -11,7 +11,7 @@ export function login(userId) {
// 用户 分页信息
export function userPage(params) {
return request({
url: `/sys/user/page`,
url: `/a/sys/user/page`,
method: 'post',
data: params
})
......
......@@ -40,6 +40,6 @@ body{
}
.card-page-box{
background: #fff;
height: 100vh;
/* height: 100vh; */
padding: 10px;
}
\ No newline at end of file
<template>
<w-dialog
v-if="visible"
:border="false"
closeFree
width="880px"
@ok="selectOk"
title="选择部门"
v-model="visible"
>
<div>
<el-input
placeholder="输入关键字进行过滤"
v-model="filterText"
size="small"
@input="$refs.tree.filter(filterText)"
/>
<div class="tree-box" v-loading="loading">
<el-tree
:default-checked-keys="defaultValue"
class="mt-15"
show-checkbox
:data="treeOptions"
:props="{
value: 'id',
label: 'name',
children: 'children',
}"
:default-expand-all="false"
:filter-node-method="filterNode"
ref="tree"
node-key="id"
:check-strictly="false"
:default-expanded-keys="[treeOptions.length && treeOptions[0].id]"
>
</el-tree>
</div>
</div>
</w-dialog>
</template>
<script>
import { getOrgTree } from "@/api/org";
export default {
data() {
return {
visible: false,
filterText: "",
treeOptions: [],
orgType: "",
defaultValue: [],
loading: false,
};
},
mounted() {},
methods: {
filterNode(value, data) {
if (!value) return true;
return data.orgName.indexOf(value) !== -1;
},
open(select) {
this.defaultValue = select.map((item) => {
return item.id;
});
this.visible = true;
this.getTree();
},
getTree() {
this.loading = true;
getOrgTree({}).then((res) => {
console.log(444, res);
this.loading = false;
this.treeOptions = res.data;
});
},
onSearchType(val) {},
selectOk() {
let list = this.$refs.tree.getCheckedNodes();
let select = list.map((item) => {
return {
type: "dept",
id: item.id,
name: item.name,
};
});
this.visible = false;
this.$emit("ok", select);
},
},
};
</script>
<style scoped lang="less">
.tree-box {
height: 60vh;
overflow: auto;
}
.form-item-box {
margin: 10px 0;
display: flex;
align-items: center;
}
</style>
......@@ -183,9 +183,9 @@ export default {
getList() {
this.loading = true;
userPage({
page: this.page.current,
limit: this.page.size,
data: {
pageNo: this.page.current,
pageSize: this.page.size,
search: {
...this.formInline,
...this.params,
...this.selectData,
......
......@@ -56,7 +56,7 @@ export function getObjType(obj) {
}
export function goBack() {
let from = sessionStorage.getItem("from");
let from = localStorage.getItem("from");
console.log('from', from)
if (from && from !== "null") {
sessionStorage.removeItem("from");
......
......@@ -234,127 +234,127 @@ export default {
},
remark: "",
};
if (this.$route.query.business === "40") {
loadForm.formItems = [
{
id: "field2432601004816",
icon: "el-icon-folder-opened",
name: "FileUpload",
props: {
maxSize: 100,
onlyRead: false,
required: true,
fileTypes: [],
maxNumber: 10,
enablePrint: true,
type: "fixed",
keyLabel: "recoverFile",
},
title: "复线方案",
value: [],
valueType: "Array",
},
{
id: "field5044001009715",
icon: "el-icon-edit",
name: "NumberInput",
props: {
required: true,
type: "fixed",
keyLabel: "stopDuration",
precision: 2,
},
title: "停线时长(小时)",
value: "",
valueType: "Number",
},
{
id: "field9375301007398",
icon: "el-icon-edit",
name: "RadioGroup",
props: {
required: true,
type: "fixed",
keyLabel: "stopStatus",
},
title: "是否停线",
value: "",
valueType: "String",
},
{
id: "field8369098565280",
icon: "el-icon-edit",
name: "SelectInputApi",
props: {
apiType: "category",
labelKey: "name",
required: true,
searchText: "name",
queryParams: { firstStatus: "1" },
type: "fixed",
keyLabel: "firstCategoryId",
linkageSonId: "field3965098570981",
},
title: "异常一级分类",
value: { id: "", label: "" },
valueType: "Object",
},
{
id: "field3965098570981",
icon: "el-icon-edit",
name: "SelectInputApi",
props: {
apiType: "category",
labelKey: "name",
required: true,
searchText: "name",
queryParams: {
firstStatus: "0",
linkageId: "field8369098565280",
},
type: "fixed",
keyLabel: "secondCategoryId",
isDisabledLinkage: true,
isDisabledLinkageSelect: true,
isLinkage: true,
},
title: "异常二级分类",
value: { id: "", label: "" },
valueType: "Object",
},
{
id: "field4387030350208",
title: "异常处理说明",
name: "ExceptionHandlingInstructions",
icon: "el-icon-edit",
value: { id: "", label: "", remark: "" },
valueType: ValueType.object,
props: {
queryParams: { linkageId: "field3965098570981" },
isDisabledLinkage: true,
isDisabledLinkageSelect: true,
isLinkage: true,
secondCategoryFieldId: "field3965098570981",
},
},
{
id: "field9155398572607",
icon: "el-icon-edit",
name: "SelectInputApi",
props: {
apiType: "grade",
labelKey: "grade",
required: true,
searchText: "grade",
type: "fixed",
keyLabel: "gradeId",
},
title: "异常等级",
value: { id: "", label: "" },
valueType: "Object",
},
];
}
// if (this.$route.query.business === "40") {
// loadForm.formItems = [
// {
// id: "field2432601004816",
// icon: "el-icon-folder-opened",
// name: "FileUpload",
// props: {
// maxSize: 100,
// onlyRead: false,
// required: true,
// fileTypes: [],
// maxNumber: 10,
// enablePrint: true,
// type: "fixed",
// keyLabel: "recoverFile",
// },
// title: "复线方案",
// value: [],
// valueType: "Array",
// },
// {
// id: "field5044001009715",
// icon: "el-icon-edit",
// name: "NumberInput",
// props: {
// required: true,
// type: "fixed",
// keyLabel: "stopDuration",
// precision: 2,
// },
// title: "停线时长(小时)",
// value: "",
// valueType: "Number",
// },
// {
// id: "field9375301007398",
// icon: "el-icon-edit",
// name: "RadioGroup",
// props: {
// required: true,
// type: "fixed",
// keyLabel: "stopStatus",
// },
// title: "是否停线",
// value: "",
// valueType: "String",
// },
// {
// id: "field8369098565280",
// icon: "el-icon-edit",
// name: "SelectInputApi",
// props: {
// apiType: "category",
// labelKey: "name",
// required: true,
// searchText: "name",
// queryParams: { firstStatus: "1" },
// type: "fixed",
// keyLabel: "firstCategoryId",
// linkageSonId: "field3965098570981",
// },
// title: "异常一级分类",
// value: { id: "", label: "" },
// valueType: "Object",
// },
// {
// id: "field3965098570981",
// icon: "el-icon-edit",
// name: "SelectInputApi",
// props: {
// apiType: "category",
// labelKey: "name",
// required: true,
// searchText: "name",
// queryParams: {
// firstStatus: "0",
// linkageId: "field8369098565280",
// },
// type: "fixed",
// keyLabel: "secondCategoryId",
// isDisabledLinkage: true,
// isDisabledLinkageSelect: true,
// isLinkage: true,
// },
// title: "异常二级分类",
// value: { id: "", label: "" },
// valueType: "Object",
// },
// {
// id: "field4387030350208",
// title: "异常处理说明",
// name: "ExceptionHandlingInstructions",
// icon: "el-icon-edit",
// value: { id: "", label: "", remark: "" },
// valueType: ValueType.object,
// props: {
// queryParams: { linkageId: "field3965098570981" },
// isDisabledLinkage: true,
// isDisabledLinkageSelect: true,
// isLinkage: true,
// secondCategoryFieldId: "field3965098570981",
// },
// },
// {
// id: "field9155398572607",
// icon: "el-icon-edit",
// name: "SelectInputApi",
// props: {
// apiType: "grade",
// labelKey: "grade",
// required: true,
// searchText: "grade",
// type: "fixed",
// keyLabel: "gradeId",
// },
// title: "异常等级",
// value: { id: "", label: "" },
// valueType: "Object",
// },
// ];
// }
this.$store.commit("loadForm", loadForm);
},
......
......@@ -123,18 +123,6 @@ export default {
cancelButtonText: "取消",
type: "warning",
}).then(() => {
//this.$store.commit('clearTemplate')
// let from = sessionStorage.getItem("from");
// if (from && from !== "null") {
// sessionStorage.removeItem("from");
// // type==="back" 关闭弹窗
// window.parent.postMessage(
// { text: "子页面发消息给父页面", type: "back", from: from },
// "*"
// );
// } else {
// this.$router.go(-1);
// }
goBack();
});
},
......
......@@ -41,6 +41,7 @@ export const APPROVAL_PROPS = {
type: 'TO_END', //驳回规则 TO_END TO_NODE TO_BEFORE
target: '' //驳回到指定ID的节点
},
dept: [],
operationPerm: {
agree: { alisa: '同意', show: true },
refuse: { alisa: '拒绝', show: true },
......
......@@ -17,6 +17,17 @@
>
<org-items v-model="nodeProps.assignedUser" />
</div>
<div v-else-if="nodeProps.assignedType === 'DEPT'">
<el-button
size="mini"
icon="el-icon-plus"
type="primary"
@click="selectDept"
round
>选择部门</el-button
>
<org-items v-model="nodeProps.dept" />
</div>
<div v-else-if="nodeProps.assignedType === 'USER_GROUP'">
<el-button
icon="el-icon-plus"
......@@ -294,6 +305,7 @@
@ok="selected"
/>
<UserTable ref="userPicker" @ok="onConfirmUser" />
<DeptSelect ref="deptPicker" @ok="onConfirmDept" />
<UserGroupTable ref="userGroupPicker" @ok="onConfirmUser" />
</div>
</template>
......@@ -303,9 +315,10 @@ import OrgPicker from "@/components/common/OrgPicker";
import OrgItems from "../OrgItems";
import UserTable from "@/components/userTable";
import UserGroupTable from "@/components/userGroupTable";
import DeptSelect from "@/components/deptSelect";
export default {
name: "ApprovalNodeConfig",
components: { OrgPicker, OrgItems, UserTable, UserGroupTable },
components: { OrgPicker, OrgItems, UserTable, UserGroupTable, DeptSelect },
props: {
config: {
type: Object,
......@@ -321,16 +334,17 @@ export default {
orgPickerType: "user",
approvalTypes: [
{ name: "指定人员", type: "ASSIGN_USER" },
{ name: "指定用户组", type: "USER_GROUP" },
// { name: "发起人自选", type: "SELF_SELECT" },
// { name: "发起人自己", type: "SELF" },
// { name: "部门主管", type: "LEADER" },
// { name: "多级部门主管", type: "LEADER_TOP" },
{ name: "指定部门", type: "DEPT" },
{ name: "发起人自选", type: "SELF_SELECT" },
{ name: "发起人自己", type: "SELF" },
{ name: "部门主管", type: "LEADER" },
{ name: "多级部门主管", type: "LEADER_TOP" },
// { name: "指定部门的主管", type: "ASSIGN_LEADER" },
// { name: "系统角色", type: "ROLE" },
// { name: "表单内联系人", type: "FORM_USER" },
// { name: "表单内部门主管", type: "FORM_DEPT" },
// { name: "系统(自动拒绝)", type: "REFUSE" },
{ name: "系统(自动拒绝)", type: "REFUSE" },
// { name: "指定用户组", type: "USER_GROUP" },
],
};
},
......@@ -341,12 +355,12 @@ export default {
select() {
return this.config.assignedUser || [];
},
selectDept() {
if (!this.config.assignedDept) {
this.$set(this.config, "assignedDept", []);
}
return this.config.assignedDept;
},
// selectDept() {
// if (!this.config.assignedDept) {
// this.$set(this.config, "assignedDept", []);
// }
// return this.config.assignedDept;
// },
userForms() {
let userForm = [];
this.loadFormItemPicker(
......@@ -426,10 +440,6 @@ export default {
});
},
selectUser() {
// this.orgPickerSelected = this.select;
// this.orgPickerType = "user";
// console.log("选择 " + this.orgPickerType);
// this.$refs.orgPicker.show();
this.orgPickerSelected = this.config.assignedUser;
this.$refs.userPicker.open({}, this.orgPickerSelected);
},
......@@ -437,18 +447,21 @@ export default {
this.orgPickerSelected = this.config.userGroups;
this.$refs.userGroupPicker.open({}, this.orgPickerSelected);
},
selectDept() {
this.orgPickerSelected = this.config.dept || []; //
this.$refs.deptPicker.open(this.config.dept);
console.log(3333, this.orgPickerSelected);
},
selectOrgDept() {
this.orgPickerSelected = this.selectDept;
this.orgPickerType = "dept";
console.log("选择 " + this.orgPickerType);
this.$refs.orgPicker.show();
},
selectNoSetUser() {
// this.orgPickerSelected = this.config.nobody.assignedUser;
// this.orgPickerType = "user";
// this.$refs.orgPicker.show();
this.orgPickerSelected = this.config.nobody.assignedUser;
this.$refs.userGroupPicker.open({}, this.orgPickerSelected);
this.$refs.userPicker.open({}, this.orgPickerSelected);
},
selectRole() {
this.orgPickerType = "role";
......@@ -473,6 +486,13 @@ export default {
});
});
},
onConfirmDept(select) {
this.orgPickerSelected.length = 0;
select.forEach((val) => {
this.orgPickerSelected.push(val);
});
this.orgPickerSelected = select;
},
},
};
</script>
......
......@@ -18,7 +18,7 @@ module.exports = {
disableHostCheck: true,
proxy: {
"/api": {
target: "http://sz-tianma.meiqicloud.com/api",
target: process.env.VITE_AXIOS_API_PRIMARY,
// target: 'http://192.168.110.114:8888',
changeOrigin: true,
pathRewrite: {
......@@ -37,6 +37,21 @@ module.exports = {
languages: ["javascript", "html", "css", "json"],
}),
],
module: {
rules: [
{
test: /\.(js|mjs)$/,
include: process.cwd(),
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
plugins: ['@babel/plugin-proposal-optional-chaining'],
},
},
},
],
},
},
pluginOptions: {
"style-resources-loader": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment