Compare commits

...

4 Commits

@ -84,6 +84,10 @@
if (/^Select|RadioButtonGroup$/.test(item.component)) {
res['options'] = item?.componentProps?.options
}
//
if (item.field?.includes('permissions-')) {
res['permissions'] = false
}
return res
})
const Apidata = {

@ -37,7 +37,7 @@
<div class="opt-box">
<h3>字段属性设置</h3>
<!-- 表格操作列组件 -->
<a-form ref="form" :model="formItems.formData" :rules="rules">
<a-form ref="form" :model="formItems.formData" :rules="rules" v-if="!isPermissions">
<a-form-item label="字段名称(中文)" name="label">
<a-input
v-model:value="formItems.formData.label"
@ -99,6 +99,14 @@
/>
</a-form-item>
</a-form>
<a-form ref="form" :model="formItems.formData" :rules="rules" v-else>
<a-form-item label="是否不校验" name="permissions">
<a-radio-group v-model:value="formItems.formData.permissions" :disabled="formDisable">
<a-radio :value="true"></a-radio>
<a-radio :value="false"></a-radio>
</a-radio-group>
</a-form-item>
</a-form>
</div>
</div>
</template>
@ -157,6 +165,8 @@
}
//
const chooseItem = (item) => {
console.log(item)
if (formItems.formData.field) {
form.value.validate().then(() => {
formToggle(item)
@ -165,9 +175,12 @@
formToggle(item)
}
}
const isPermissions = ref(false)
const formToggle = (item) => {
form.value.clearValidate()
activeClass.value = item.field
item.field.includes('permissions-')
isPermissions.value = item.field.includes('permissions-') ? true : false
formItems.formData = item
formDisable.value = false
}

@ -392,6 +392,7 @@
const DIYformSchema = ref([])
const grade = ref('A')
const CustomerOrSupplier = ref('')
const PContact = ref(false)
//
const getFormSet = async () => {
let res: any = await GetFormSetListByModule({ permissionId: permissionsInfo().permissionId })
@ -401,6 +402,11 @@
const content = JSON.parse(data[0].content).columns
updateSchema(content)
DIYformSchema.value = content
content.forEach((e) => {
if (e.field == 'permissions-contact') {
PContact.value = e.permissions
}
})
}
}
}
@ -1099,7 +1105,7 @@
async function SubmitAudit() {
if (rowId.value) {
const res = await ApiList(formatParams({ ClientId: clientId.value }))
if (res.succeeded && res.data.length) {
if (PContact.value || (res.succeeded && res.data.length)) {
const auditStatus = getFieldsValue().auditStatus
if (auditStatus == -1 || auditStatus == 2) {
let ApiData: any = { ids: [rowId.value] }

@ -1338,6 +1338,13 @@ export const formSchema: FormSchema[] = [
rows: 4,
},
},
{
field: 'permissions-contact',
label: '权限-联系人信息是否必有一条数据',
component: 'Switch',
show: false,
permissions: false,
},
]
export const formSchema2: FormSchema[] = [

@ -51,7 +51,7 @@ export function Delete(parameter) {
export function projectQueryList(parameter) {
return request({
url: '/opApi/ServiceWorkFlowBase/GetEnableProjectList',
url: '/opApi/ServiceProject/QueryList',
method: 'get',
params: parameter,
})
@ -67,7 +67,7 @@ export function QueryActivitiesList(parameter) {
export function QueryListStatus(parameter) {
return request({
url: '/opApi/StatusSkuBase/QueryList',
url: '/opApi/StatusSkuBaseManage/QueryList',
method: 'get',
params: parameter,
})
@ -75,7 +75,7 @@ export function QueryListStatus(parameter) {
export function workFlowSetUnEnable(parameter) {
return request({
url: '/opApi/StatusSkuBase/SetUnEnable',
url: '/opApi/StatusSkuBaseManage/SetUnEnable',
method: 'post',
data: parameter,
})
@ -104,3 +104,11 @@ export function GetShowTimeLine(parameter) {
params: parameter,
})
}
export function SaveWFActivities(parameter) {
return request({
url: '/opApi/ServiceWorkFlowBase/SaveWFActivities',
method: 'post',
data: parameter,
})
}

@ -110,8 +110,7 @@
<div>
<span>服务项目</span>
<a-select show-search placeholder="请选择服务项目" v-model:value="serviceItem"
style="width: 300px;margin-right: 20px;" @search="projectSearch" :default-active-first-option="false"
:show-arrow="false" :filter-option="false" :not-found-content="null">
style="width: 300px;margin-right: 20px;" @search="projectSearch">
<a-select-option v-for="item in projectList" :key="item.pkId" :value="item.pkId">
{{ item.serviceProjectName }}
</a-select-option>
@ -130,9 +129,7 @@
:model="activeForm">
<a-form-item name="pkId" style="margin-bottom: 10px;" label="流程活动">
<a-select show-search placeholder="请选择流程活动" v-model:value="activeForm.pkId"
style="width: 300px;margin-right: 20px;" @search="activeSearch"
:default-active-first-option="false" :show-arrow="false" :filter-option="false"
:not-found-content="null">
style="width: 300px;margin-right: 20px;" @search="activeSearch">
<a-select-option v-for="item in activeList" :key="item.pkId" :value="item.pkId">
{{ item.showName }}
</a-select-option>
@ -178,13 +175,11 @@
</a-modal>
<a-modal title="服务活动新增" :width="800" :visible="addActiveFlag" @cancel="addActiveFlag = false">
<div>
<a-form ref="addActiveForm" :rules="addRules" :labelCol="{ span: 3 }" :wrapperCol="{ span: 21 }"
<a-form ref="addActiveFormRef" :rules="addRules" :labelCol="{ span: 3 }" :wrapperCol="{ span: 21 }"
:model="addActiveForm">
<a-form-item name="statusSKUId" style="margin-bottom: 10px;" label="状态名称">
<a-select show-search placeholder="请选择状态名称" v-model:value="addActiveForm.statusSKUId"
style="width: 300px;margin-right: 20px;" @search="statusSearch" @change="handleChangeStatus"
:default-active-first-option="false" :show-arrow="false" :filter-option="false"
:not-found-content="null">
style="width: 300px;margin-right: 20px;" @search="statusSearch" @change="handleChangeStatus">
<a-select-option v-for="item in statusList" :key="item.pkId" :value="item.pkId">
{{ item.statusSKUName }}
</a-select-option>
@ -215,7 +210,8 @@
<div class="top">
<div class="line" :class="{ active: item.isYield == 1 }"></div>
<div class="point" :class="{ active: item.isYield == 1 }"></div>
<div class="line" v-if="index != timeForm.activitiesList.length - 1" :class="{ active: item.isYield == 1 }">
<div class="line" v-if="index != timeForm.activitiesList.length - 1"
:class="{ active: item.isYield == 1 }">
</div>
</div>
<div class="bottom">
@ -242,7 +238,7 @@
import { ref, onMounted } from 'vue'
import {
projectQueryList, QueryActivitiesList, QueryListStatus, workFlowSetUnPublishRelease,
workFlowSetUnEnable, workFlowSaveAndEnable,GetShowTimeLine
workFlowSetUnEnable, workFlowSaveAndEnable, GetShowTimeLine,SaveWFActivities
} from './api'
import { useMessage } from '/@/hooks/web/useMessage'
const { createMessage } = useMessage()
@ -262,6 +258,7 @@ const wrapperCol = {
xs: { span: 24 },
sm: { span: 17 }
}
const addActiveFormRef = ref('') as any
const statusList = ref([]) as any
const addItemFlag = ref(false)
const formRule = {
@ -286,7 +283,7 @@ const addActiveFlag = ref(false)
const activeList = ref([]) as any
function activeSearch(data) {
QueryActivitiesList({ queryItem: data }).then(res => {
activeList.value = res.data.ext
activeList.value = res.data
})
}
const SysTenantData = ref([]) as any
@ -331,6 +328,20 @@ function handlePub() {
}
})
}
function handleSaveAddActive() {
addActiveFormRef.value.validate().then(() => {
SaveWFActivities(addActiveForm.value).then(res => {
if (res.data.succ) {
createMessage.success('添加成功')
addActiveFlag.value = false
QueryActivitiesList().then(res => {
activeList.value = res.data.ext
})
// this.$refs.addActiveForm.resetFields()
}
})
})
}
function handleUnable() {
workFlowSetUnEnable([form.value.pkId]).then(res => {
if (res.data.ext[0].succ) {
@ -377,16 +388,18 @@ function handleInto() {
const projectList = ref([]) as any
onMounted(() => {
projectSearch('')
statusSearch('')
activeSearch('')
})
function projectSearch(data) {
projectQueryList({ queryItem: data }).then(res => {
projectList.value = res.data.ext
projectList.value = res.data
})
}
function statusSearch(data) {
QueryListStatus({ queryItem: data }).then(res => {
statusList.value = res.data.ext
statusList.value = res.data
})
}

Loading…
Cancel
Save