Merge pull request 'master' (#906) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/906
This commit is contained in:
@@ -7,6 +7,12 @@ export const getDemandInfo = (param) => {
|
||||
params: param
|
||||
});
|
||||
};
|
||||
export const filterRequirementName = (requirementName) => {
|
||||
return request({
|
||||
url: `/workflow/mosr/requirement/match/${requirementName}`,
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
export const getWorkflowInfo = () => {
|
||||
return request({
|
||||
url: '/workflow/mosr/requirement/process',
|
||||
|
||||
@@ -8,6 +8,12 @@ export const getApplyProcess = (projectId) => {
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
export const filterProjectName = (projectName,targetState) => {
|
||||
return request({
|
||||
url: `/workflow/mosr/project/approval/match/${projectName}/${targetState}`,
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
export const projectApply = (data) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/project/approval/initiation/apply',
|
||||
|
||||
@@ -3,8 +3,17 @@
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="requirementName" label="征集名称">
|
||||
<el-input v-model="selectForm.requirementName" placeholder="请输入征集名称" clearable @keyup.enter.native="getList"
|
||||
style="width: 100%"/>
|
||||
<!-- <el-input v-model="selectForm.requirementName" placeholder="请输入征集名称" clearable @keyup.enter.native="getList"-->
|
||||
<!-- style="width: 100%"/>-->
|
||||
<el-select v-model="selectForm.requirementName" placeholder="请输入征集名称" filterable clearable remote :remote-method="getRequirementName"
|
||||
style="width: 100%" @change="changeName" >
|
||||
<el-option
|
||||
v-for="item in requirementNameOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5" :offset="1">
|
||||
@@ -53,11 +62,9 @@
|
||||
<script setup lang="jsx">
|
||||
import {useAuthStore} from '@/stores/userstore.js'
|
||||
import Tag from '@/components/Tag.vue'
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {ElNotification} from "element-plus";
|
||||
import {deleteDemand} from "@/api/project-demand";
|
||||
import {useCacheStore} from '@/stores/cache.js'
|
||||
import {getRequirementStatePerm} from "@/api/project-demand";
|
||||
import {getRequirementStatePerm,filterRequirementName,deleteDemand} from "@/api/project-demand";
|
||||
import {Refresh, Search} from '@element-plus/icons-vue'
|
||||
|
||||
const cacheStore = useCacheStore()
|
||||
@@ -66,6 +73,7 @@ const router = useRouter()
|
||||
const selectForm = ref({})
|
||||
const tableIns = ref()
|
||||
const formRef = ref()
|
||||
const requirementNameOptions = ref([])
|
||||
const stateOption = ref([])
|
||||
const userInfo = ref(authStore.userinfo)
|
||||
const auths = {
|
||||
@@ -187,6 +195,28 @@ const tableConfig = reactive({
|
||||
params: {}
|
||||
})
|
||||
|
||||
const changeName=(val)=>{
|
||||
selectForm.value.requirementName=val
|
||||
getList()
|
||||
}
|
||||
|
||||
const getRequirementName=async (val)=>{
|
||||
if(val){
|
||||
const res=await filterRequirementName(val)
|
||||
if(res.code==1000){
|
||||
let optionObj={}
|
||||
let options=[]
|
||||
res.data.forEach(item=>{
|
||||
optionObj={
|
||||
value:item,
|
||||
label:item
|
||||
}
|
||||
options.push(optionObj)
|
||||
})
|
||||
requirementNameOptions.value= options
|
||||
}
|
||||
}
|
||||
}
|
||||
const selectOptionVisibleChange = (value) => {
|
||||
console.log('value', value)
|
||||
}
|
||||
|
||||
@@ -51,8 +51,6 @@ const searchConfig = ref([
|
||||
options: [],
|
||||
remote: true,
|
||||
remoteMethod:async (val)=>{
|
||||
// requirementNameValue.value=val
|
||||
// search({requirementName:val})
|
||||
if(val){
|
||||
const res=await getRequirementName(val)
|
||||
if(res.code==1000){
|
||||
|
||||
@@ -13,6 +13,7 @@ import {toThousands} from '@/utils/changePrice.js'
|
||||
import {switchAttachmentState} from "@/api/project-manage/attachment";
|
||||
import {ElMessageBox} from "element-plus";
|
||||
import { getSubCompOpt } from '@/api/user/user.js';
|
||||
import {filterProjectName} from "@/api/project-manage";
|
||||
|
||||
const router = useRouter()
|
||||
const shortcuts = [
|
||||
@@ -61,11 +62,30 @@ const searchConfig = ref([
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
component: 'el-input',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请输入项目名称查询',
|
||||
clearable: true,
|
||||
checkStrictly: true
|
||||
filterable: true,
|
||||
options: [],
|
||||
remote: true,
|
||||
remoteMethod:async (val)=>{
|
||||
if(val){
|
||||
const res=await filterProjectName(val,'50')
|
||||
if(res.code==1000){
|
||||
let optionObj={}
|
||||
let options=[]
|
||||
res.data.forEach(item=>{
|
||||
optionObj={
|
||||
value:item,
|
||||
label:item
|
||||
}
|
||||
options.push(optionObj)
|
||||
})
|
||||
searchConfig.value.find(item => item.prop == 'projectName').props.options = options
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
import { getSubCompOpt } from '@/api/user/user.js';
|
||||
import {filterProjectName} from "@/api/project-manage";
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
@@ -60,12 +61,30 @@ const searchConfig = ref([
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
component: 'el-input',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请输入项目名称查询',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
checkStrictly: true
|
||||
options: [],
|
||||
remote: true,
|
||||
remoteMethod:async (val)=>{
|
||||
if(val){
|
||||
const res=await filterProjectName(val,'40')
|
||||
if(res.code==1000){
|
||||
let optionObj={}
|
||||
let options=[]
|
||||
res.data.forEach(item=>{
|
||||
optionObj={
|
||||
value:item,
|
||||
label:item
|
||||
}
|
||||
options.push(optionObj)
|
||||
})
|
||||
searchConfig.value.find(item => item.prop == 'projectName').props.options = options
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
import { getSubCompOpt } from '@/api/user/user.js';
|
||||
import {filterProjectName} from "@/api/project-manage";
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const shortcuts = [
|
||||
@@ -59,11 +60,30 @@ const searchConfig = ref([
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
component: 'el-input',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请输入项目名称查询',
|
||||
clearable: true,
|
||||
checkStrictly: true
|
||||
filterable: true,
|
||||
options: [],
|
||||
remote: true,
|
||||
remoteMethod:async (val)=>{
|
||||
if(val){
|
||||
const res=await filterProjectName(val,'20')
|
||||
if(res.code==1000){
|
||||
let optionObj={}
|
||||
let options=[]
|
||||
res.data.forEach(item=>{
|
||||
optionObj={
|
||||
value:item,
|
||||
label:item
|
||||
}
|
||||
options.push(optionObj)
|
||||
})
|
||||
searchConfig.value.find(item => item.prop == 'projectName').props.options = options
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user