Merge pull request 'fix : 对接需求征集列表接口' (#130) from dd into master

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/130
This commit is contained in:
2024-05-11 09:41:04 +00:00
4 changed files with 69 additions and 36 deletions

View File

@@ -1,5 +1,12 @@
import request from '@/utils/request.js' import request from '@/utils/request.js'
//需求征集
export const getDemandInfo = (param) => {
return request({
url: '/workflow/mosr/requirement',
method: "get",
params: param
});
};
export const getWorkflowInfo = () => { export const getWorkflowInfo = () => {
return request({ return request({
url: '/workflow/mosr/requirement/process', url: '/workflow/mosr/requirement/process',

View File

@@ -58,7 +58,7 @@
<!-- <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="10">--> <!-- <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="10">-->
<div class="approval-record"> <div class="approval-record">
<baseTitle title="审批记录"></baseTitle> <baseTitle title="审批记录"></baseTitle>
<div class="process" id="approvalRecord"> <div class="process">
<process-diagram-viewer v-if="processDiagramViewer"/> <process-diagram-viewer v-if="processDiagramViewer"/>
</div> </div>
</div> </div>
@@ -167,12 +167,10 @@ getTree()
.approval-record { .approval-record {
flex: 0.4; flex: 0.4;
.process { .process {
//max-height: calc(100vh - 96px); //max-height: calc(100vh - 96px);
height: calc(100vh - 250px); //height: calc(100vh - 250px);
overflow: auto; overflow: hidden;
&::-webkit-scrollbar { &::-webkit-scrollbar {
width: 6px; width: 6px;

View File

@@ -6,12 +6,13 @@
<script setup lang="jsx"> <script setup lang="jsx">
import fvSelect from '@/fvcomponents/fvSelect/index.vue' import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import Tag from '@/components/Tag.vue' import Tag from '@/components/Tag.vue'
import {getDemandInfo} from "@/api/project-demand";
const router = useRouter() const router = useRouter()
const searchConfig = reactive([ const searchConfig = reactive([
{ {
label: '名称', label: '征集类型',
prop: 'roleName', prop: 'collectType',
component: 'el-input', component: 'el-input',
props: { props: {
placeholder: '请输入名称查询', placeholder: '请输入名称查询',
@@ -19,13 +20,12 @@ const searchConfig = reactive([
} }
}, },
{ {
label: '状态', label: '需求名称',
prop: 'state', prop: 'requirementName',
component: shallowRef(fvSelect), component: 'el-input',
props: { props: {
placeholder: '请选择', placeholder: '请输入名称查询',
clearable: true, clearable: true
cacheKey: 'normal_disable'
} }
} }
]) ])
@@ -43,26 +43,29 @@ const tableConfig = reactive({
prop: 'selection' prop: 'selection'
}, },
{ {
prop: 'roleName', prop: 'requirementName',
label: '名称', label: '需求名称',
align: 'center' align: 'center'
}, },
{ {
prop: 'roleKey', prop: 'collectType',
label: '所属公司', label: '征集类型',
align: 'center' align: 'center'
}, },
{ {
prop: 'time', prop: 'approveName',
label: '发布时间', label: '审批人',
align: 'center' align: 'center'
}, },
{ {
prop: 'state', prop: 'deadline',
label: '状态', label: '截止时间',
align: 'center', align: 'center'
showOverflowTooltip: false, },
currentRender: ({row, index}) => (<Tag dictType={'demand_collection'} value={row.state}/>) {
prop: 'taskNode',
label: '当前节点',
align: 'center'
}, },
{ {
prop: 'oper', prop: 'oper',
@@ -81,7 +84,7 @@ const tableConfig = reactive({
} }
} }
], ],
api: '/admin/role', api: '/workflow/mosr/requirement',
btns: [ btns: [
{name: '新增', key: 'add', auth: auths.add, color: '#DED0B2'}, {name: '新增', key: 'add', auth: auths.add, color: '#DED0B2'},
{name: '导出', key: 'add', auth: auths.add, type: ''}, {name: '导出', key: 'add', auth: auths.add, type: ''},

View File

@@ -6,7 +6,8 @@
<component :is="headerIcon"/> <component :is="headerIcon"/>
</el-icon> </el-icon>
<ellipsis class="name" hover-tip :content="title"/> <ellipsis class="name" hover-tip :content="title"/>
<el-icon v-if="!isRoot && designState" size="20" style="float:right;cursor: pointer" @click.stop="emit('delNode')"> <el-icon v-if="!isRoot && designState" size="20" style="float:right;cursor: pointer"
@click.stop="emit('delNode')">
<Close/> <Close/>
</el-icon> </el-icon>
</div> </div>
@@ -24,6 +25,10 @@
<span class="placeholder" v-if="userInfo.length === 0">{{ placeholder }}</span> <span class="placeholder" v-if="userInfo.length === 0">{{ placeholder }}</span>
<div v-else v-for="item in userInfo" class="circle-user"> <div v-else v-for="item in userInfo" class="circle-user">
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
<el-button v-if="item.state==='RUNNING'" type="warning" loading circle class="circle-icon"></el-button>
<el-button v-else-if="item.state==='UNACTIVATED'" type="info" :icon="More" circle
class="circle-icon"></el-button>
<el-button v-else type="success" :icon="Check" circle class="circle-icon"></el-button>
</div> </div>
<!-- <avatar-ellipsis :row="3" :user-info="userInfo"/>--> <!-- <avatar-ellipsis :row="3" :user-info="userInfo"/>-->
</template> </template>
@@ -62,7 +67,7 @@ import InsertButton from '../common/InsertButton.vue'
import Ellipsis from '../common/Ellipsis.vue' import Ellipsis from '../common/Ellipsis.vue'
import AvatarEllipsis from '../common/AvatarEllipsis.vue' import AvatarEllipsis from '../common/AvatarEllipsis.vue'
import SvgIcon from '@/components/svgIcon/index.vue' import SvgIcon from '@/components/svgIcon/index.vue'
import {Close, Warning, Plus} from '@element-plus/icons-vue' import {Close, Warning, Plus, Check, More} from '@element-plus/icons-vue'
const emit = defineEmits(['insertNode']) const emit = defineEmits(['insertNode'])
const props = defineProps({ const props = defineProps({
@@ -154,7 +159,16 @@ const props = defineProps({
const designState = computed(() => { const designState = computed(() => {
return props.mode === 'design' return props.mode === 'design'
}) })
const getState = (state) => {
switch (state) {
case 'finish':
return 'check'
case 'UNACTIVATED':
return 'more'
case 'RUNNING':
return 'loading'
}
}
const init = () => { const init = () => {
// let userInfo = this.$store.state.selectUserMap.get(this.nodeId); // let userInfo = this.$store.state.selectUserMap.get(this.nodeId);
@@ -184,7 +198,18 @@ const init = () => {
align-items: center; align-items: center;
border-radius: 50%; border-radius: 50%;
border: 1px solid #ACACAC; border: 1px solid #ACACAC;
position: relative;
.circle-icon {
width: 10px;
height: 10px;
position: absolute;
top: auto !important;
bottom: -9px;
right: 15px !important;
} }
}
.root { .root {
&:before { &:before {
display: none !important; display: none !important;