mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 19:36:46 +08:00
-- 项目创建修改
This commit is contained in:
@@ -65,6 +65,8 @@ export default defineComponent({
|
||||
initDict("projectLevel");
|
||||
initDict("projectSys");
|
||||
initDict("pathmapPic");
|
||||
initDict('projectClass')
|
||||
initDict('projectPic')
|
||||
getOrgTree();
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,9 @@ export const list = (obj) => http.post('/admin/offcourse/list', obj)
|
||||
//获取待审核项目列表
|
||||
export const projlist = (obj) => http.post('/admin/project/list', obj)
|
||||
|
||||
//获取待审核项目列表
|
||||
export const auditlist = (obj) => http.post('/admin/project/auditlist', obj)
|
||||
|
||||
//获取已审核项目列表
|
||||
export const listView = (obj) => http.post('/admin/project/listView', obj)
|
||||
|
||||
|
||||
62
src/components/project/OrgClass.vue
Normal file
62
src/components/project/OrgClass.vue
Normal file
@@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<a-tree-select
|
||||
v-model:value="id"
|
||||
style="width: 100%"
|
||||
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
||||
placeholder="自动带出 可修改"
|
||||
allow-clear
|
||||
:tree-data="options"
|
||||
:fieldNames="{
|
||||
children: 'treeChildList',
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
}"
|
||||
:disabled="viewDetail ? true : false"
|
||||
@change="change"
|
||||
dropdownClassName="treeDropdown"
|
||||
>
|
||||
</a-tree-select>
|
||||
</template>
|
||||
<script>
|
||||
import {onMounted, reactive, toRefs, watch} from "vue";
|
||||
import {useStore} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "OrgClass",
|
||||
|
||||
props: {
|
||||
modelValue: {
|
||||
type: Number,
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const store = useStore();
|
||||
|
||||
const state = reactive({
|
||||
options: [],
|
||||
id: props.value
|
||||
});
|
||||
watch(state.id, () => {
|
||||
ctx.emit('update:modelValue', state.id)
|
||||
})
|
||||
onMounted(() => {
|
||||
state.options = [{id: props.modelValue, name: props.name}, ...store.state.orgtreeList]
|
||||
})
|
||||
function change(key, obj) {
|
||||
ctx.emit('update:name', obj[0])
|
||||
}
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
change
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
48
src/components/project/ProjectClass.vue
Normal file
48
src/components/project/ProjectClass.vue
Normal file
@@ -0,0 +1,48 @@
|
||||
<!-- 评估管理-创建评估页面 -->
|
||||
<template>
|
||||
<a-select
|
||||
v-model:value="id"
|
||||
placeholder="请选择分类"
|
||||
style="width: 100%"
|
||||
:options="options"
|
||||
allowClear
|
||||
:disabled="disabled"
|
||||
>
|
||||
</a-select>
|
||||
</template>
|
||||
<script>
|
||||
import {onMounted, reactive, toRefs, watch} from "vue";
|
||||
import {useStore} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "ProjectClass",
|
||||
|
||||
props: {
|
||||
modelValue: {
|
||||
type: Number,
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const store = useStore();
|
||||
|
||||
const state = reactive({
|
||||
options: [],
|
||||
id: props.modelValue
|
||||
});
|
||||
watch(state.id,()=>{
|
||||
ctx.emit('update:modelValue',state.id)
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
state.options = store.state.projectClass.map(e => ({value: parseInt(e.dictCode), label: e.dictName}))
|
||||
})
|
||||
return {
|
||||
...toRefs(state),
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
45
src/components/project/ProjectLevel.vue
Normal file
45
src/components/project/ProjectLevel.vue
Normal file
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<a-select
|
||||
v-model:value="id"
|
||||
:options="options"
|
||||
style="width: 100%"
|
||||
placeholder="请选择项目级别"
|
||||
:disabled="disabled"
|
||||
/>
|
||||
</template>
|
||||
<script>
|
||||
import {onMounted, reactive, toRefs, watch} from "vue";
|
||||
import {useStore} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "ProjectClass",
|
||||
|
||||
props: {
|
||||
modelValue: {
|
||||
type: Number,
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const store = useStore();
|
||||
|
||||
const state = reactive({
|
||||
options: [],
|
||||
id: props.modelValue
|
||||
});
|
||||
watch(state.id, () => {
|
||||
ctx.emit('update:modelValue', state.id)
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
state.options = store.state.projectLevel.map(e => ({value: parseInt(e.dictCode), label: e.dictName}))
|
||||
})
|
||||
return {
|
||||
...toRefs(state),
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
104
src/components/project/ProjectManager.vue
Normal file
104
src/components/project/ProjectManager.vue
Normal file
@@ -0,0 +1,104 @@
|
||||
<template>
|
||||
<a-select
|
||||
v-model:value="managerArray"
|
||||
placeholder="请选择项目经理"
|
||||
:filterOption="false"
|
||||
style="width: 100%"
|
||||
:options="options"
|
||||
allowClear
|
||||
showSearch
|
||||
mode="multiple"
|
||||
:disabled="disabled"
|
||||
@popupScroll="memberScroll"
|
||||
@search="searchMember"
|
||||
@change="change"
|
||||
>
|
||||
<template v-if="loading" #notFoundContent>
|
||||
<a-spin size="small"/>
|
||||
</template>
|
||||
</a-select>
|
||||
</template>
|
||||
<script>
|
||||
import {reactive, toRefs, watch} from "vue";
|
||||
import {scrollLoad} from "@/api/method";
|
||||
import * as api1 from "@/api/index1";
|
||||
|
||||
export default {
|
||||
name: "ProjectClass",
|
||||
|
||||
props: {
|
||||
value: {
|
||||
type: Number,
|
||||
},
|
||||
name: {
|
||||
type: Number,
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
options: [],
|
||||
managerArray: [],
|
||||
memberParam: {keyWord: '', pageNo: 1, pageSize: 10},
|
||||
loading: false,
|
||||
init: false
|
||||
});
|
||||
|
||||
watch(() => state.memberParam, getMember)
|
||||
watch(() => props.value, init)
|
||||
|
||||
function getMember() {
|
||||
state.loading = true
|
||||
api1.getMemberInfo(state.memberParam).then((res) => {
|
||||
const list = res.data.data.rows.filter(e => !props.value?.includes(e.id + '')).map(e => ({
|
||||
label: e.realName,
|
||||
value: e.id
|
||||
}));
|
||||
state.options.push(...list)
|
||||
state.loading = false
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
const memberScroll = (e) => {
|
||||
let num = scrollLoad(e);
|
||||
if (num === 2) {
|
||||
// 如果滑到底部,则加载下一页
|
||||
state.memberParam.pageNo++;
|
||||
}
|
||||
};
|
||||
|
||||
//搜索学员
|
||||
const searchMember = (keyWord) => {
|
||||
keyWord && (state.memberParam = {keyWord, pageNo: 1, pageSize: 10});
|
||||
};
|
||||
|
||||
function init() {
|
||||
if (props.value && props.name) {
|
||||
const arrManager = props.name.split(',')
|
||||
const arrManagerId = props.value.split(',')
|
||||
state.managerArray = arrManagerId
|
||||
state.options = arrManager.map((e, i) => ({label: e, value: arrManagerId[i]}))
|
||||
state.init = true
|
||||
getMember()
|
||||
}
|
||||
}
|
||||
|
||||
function change(e, l) {
|
||||
console.log('change')
|
||||
ctx.emit('update:value', e.join(','))
|
||||
ctx.emit('update:name', l.map(t => t.label).join(','))
|
||||
}
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
searchMember,
|
||||
memberScroll,
|
||||
change
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
44
src/components/project/TrainClass.vue
Normal file
44
src/components/project/TrainClass.vue
Normal file
@@ -0,0 +1,44 @@
|
||||
<template>
|
||||
<a-select
|
||||
v-model:value="id"
|
||||
:options="options"
|
||||
style="width: 100%"
|
||||
placeholder="请选择分类"
|
||||
:disabled="disabled"
|
||||
/>
|
||||
</template>
|
||||
<script>
|
||||
import {onMounted, reactive, toRefs, watch} from "vue";
|
||||
import {useStore} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "TrainClass",
|
||||
|
||||
props: {
|
||||
modelValue: {
|
||||
type: Number,
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const store = useStore();
|
||||
|
||||
const state = reactive({
|
||||
options: [],
|
||||
id: props.modelValue
|
||||
});
|
||||
watch(state.id, () => {
|
||||
ctx.emit('update:modelValue', state.id)
|
||||
})
|
||||
onMounted(() => {
|
||||
state.options = store.state.projectSys.map(e => ({value: parseInt(e.dictCode), label: e.dictName}))
|
||||
})
|
||||
return {
|
||||
...toRefs(state),
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -37,10 +37,10 @@
|
||||
margin-right: 14px;
|
||||
" placeholder="请输入创建人" />
|
||||
</div>
|
||||
<div class="inpbox1">
|
||||
<a-range-picker v-model:value="valueDate" style="border-radius: 8px; height: 40px; margin-left: 5px"
|
||||
:placeholder="[' 开始时间', ' 结束时间']" @change="rankTimeChange" />
|
||||
</div>
|
||||
<!-- <div class="inpbox1">-->
|
||||
<!-- <a-range-picker v-model:value="valueDate" style="border-radius: 8px; height: 40px; margin-left: 5px"-->
|
||||
<!-- :placeholder="[' 开始时间', ' 结束时间']" @change="rankTimeChange" />-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="tmplh_btn">
|
||||
@@ -75,8 +75,8 @@
|
||||
<script>
|
||||
import {onMounted, reactive, toRefs} from "vue";
|
||||
import ProjectAudit from "../../components/drawers/ProjectAudit";
|
||||
import { projlist } from "../../api/indexAudit";
|
||||
import { toDate } from "@/api/method";
|
||||
import {auditlist} from "../../api/indexAudit";
|
||||
|
||||
export default {
|
||||
name: "ProjectViewedN",
|
||||
components: { ProjectAudit },
|
||||
@@ -106,8 +106,8 @@ export default {
|
||||
columns1: [
|
||||
{
|
||||
title: "序号",
|
||||
dataIndex: "number",
|
||||
key: "number",
|
||||
dataIndex: "projectId",
|
||||
key: "projectId",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
@@ -135,17 +135,18 @@ export default {
|
||||
dataIndex: "status",
|
||||
key: "status",
|
||||
align: "center",
|
||||
customRender: ()=><div>待审核</div>,
|
||||
},
|
||||
{
|
||||
title: "创建人",
|
||||
dataIndex: "creater",
|
||||
key: "creater",
|
||||
dataIndex: "createName",
|
||||
key: "createName",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "创建时间",
|
||||
dataIndex: "time",
|
||||
key: "time",
|
||||
dataIndex: "createTime",
|
||||
key: "createTime",
|
||||
align: "center",
|
||||
},
|
||||
|
||||
@@ -163,7 +164,7 @@ export default {
|
||||
showProjAudit(
|
||||
value.record.projectId,
|
||||
value.record.createId,
|
||||
value.record.creater
|
||||
value.record.createName
|
||||
);
|
||||
}}
|
||||
>
|
||||
@@ -194,12 +195,13 @@ export default {
|
||||
pageSize: state.pageSize,
|
||||
status: 1,
|
||||
};
|
||||
projlist(objn)
|
||||
auditlist(objn)
|
||||
.then((res) => {
|
||||
console.log("获取待审核项目成功", res);
|
||||
let result = res.data.data;
|
||||
state.total = result.total;
|
||||
setProjList(result.rows);
|
||||
state.tableData1 = result.rows
|
||||
// setProjList(result.rows);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取待审核项目失败", err);
|
||||
@@ -232,7 +234,7 @@ export default {
|
||||
? "拒绝"
|
||||
: "-",
|
||||
creater: item.createName,
|
||||
time: toDate(item.createTime, "Y-M-D h-m"),
|
||||
time: item.createTime,
|
||||
projectId: item.projectId,
|
||||
createId: item.createId,
|
||||
};
|
||||
@@ -260,7 +262,7 @@ export default {
|
||||
? "拒绝"
|
||||
: "-",
|
||||
creater: item.createName,
|
||||
time: toDate(item.createTime, "Y-M-D h-m"),
|
||||
time: item.createTime,
|
||||
projectId: item.projectId,
|
||||
createId: item.createId,
|
||||
children: item.subList ? setProjList(item.subList) : [],
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user