mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 22:06:45 +08:00
-- 项目shenhe
This commit is contained in:
@@ -15,56 +15,48 @@
|
||||
<div class="inpbox">
|
||||
<div class="inpbox1">
|
||||
<a-input
|
||||
v-model:value="valueproj"
|
||||
style="
|
||||
v-model:value="valueproj"
|
||||
style="
|
||||
width: 270px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
margin-right: 14px;
|
||||
"
|
||||
placeholder="请输入项目名称/所属项目"
|
||||
placeholder="请输入项目名称/所属项目"
|
||||
/>
|
||||
</div>
|
||||
<div class="inpbox1">
|
||||
<a-input
|
||||
v-model:value="valuename"
|
||||
style="
|
||||
v-model:value="valuename"
|
||||
style="
|
||||
width: 270px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
margin-right: 14px;
|
||||
"
|
||||
placeholder="请输入项目经理"
|
||||
placeholder="请输入项目经理"
|
||||
/>
|
||||
</div>
|
||||
<div class="inpbox1">
|
||||
<a-input
|
||||
v-model:value="valuecreater"
|
||||
style="
|
||||
v-model:value="valuecreater"
|
||||
style="
|
||||
width: 270px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
margin-right: 14px;
|
||||
"
|
||||
placeholder="请输入创建人"
|
||||
placeholder="请输入创建人"
|
||||
/>
|
||||
</div>
|
||||
<div class="inpbox1">
|
||||
<a-range-picker
|
||||
v-model:value="valueDate"
|
||||
style="border-radius: 8px; height: 40px; margin-left: 5px"
|
||||
:placeholder="[' 开始时间', ' 结束时间']"
|
||||
@change="rankTimeChange"
|
||||
v-model:value="valueDate"
|
||||
style="border-radius: 8px; height: 40px; margin-left: 5px"
|
||||
:placeholder="[' 开始时间', ' 结束时间']"
|
||||
valueFormat="X"
|
||||
/>
|
||||
</div>
|
||||
<!-- <div class="inpbox1">-->
|
||||
<!-- <a-select-->
|
||||
<!-- v-model:value="valuestate"-->
|
||||
<!-- placeholder="请选择审核状态"-->
|
||||
<!-- @change="handleChangeproj"-->
|
||||
<!-- :options="optionsproj"-->
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="tmplh_btn">
|
||||
@@ -81,26 +73,26 @@
|
||||
<div class="tmpl_body">
|
||||
<div class="tmpl_tabbox">
|
||||
<a-table
|
||||
:columns="columns1"
|
||||
:data-source="tableData1"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
expandRowByClick="true"
|
||||
@expand="expandTable"
|
||||
:scroll="{ x: 1300 }"
|
||||
:pagination="false"
|
||||
:columns="columns1"
|
||||
:data-source="tableData1"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
expandRowByClick="true"
|
||||
@expand="expandTable"
|
||||
:scroll="{ x: 1300 }"
|
||||
:pagination="false"
|
||||
/>
|
||||
</div>
|
||||
<div class="tableBox">
|
||||
<div class="pa">
|
||||
<a-pagination
|
||||
v-if="total > 10"
|
||||
showSizeChanger="true"
|
||||
show-quick-jumper
|
||||
:pageSize="pageSize"
|
||||
v-model:current="currentPage"
|
||||
:total="total"
|
||||
class="pagination"
|
||||
@change="changePagination"
|
||||
v-if="total > 10"
|
||||
showSizeChanger="true"
|
||||
show-quick-jumper
|
||||
:pageSize="pageSize"
|
||||
v-model:current="currentPage"
|
||||
:total="total"
|
||||
class="pagination"
|
||||
@change="changePagination"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -108,11 +100,11 @@
|
||||
</div>
|
||||
<!-- 审核日志弹窗 -->
|
||||
<a-modal
|
||||
v-model:visible="projAuditModal"
|
||||
:footer="null"
|
||||
:closable="closeBack"
|
||||
wrapClassName="projAuditModal"
|
||||
centered="true"
|
||||
v-model:visible="projAuditModal"
|
||||
:footer="null"
|
||||
:closable="closeBack"
|
||||
wrapClassName="projAuditModal"
|
||||
centered="true"
|
||||
>
|
||||
<div class="delete">
|
||||
<div class="del_header"></div>
|
||||
@@ -124,14 +116,14 @@
|
||||
</div>
|
||||
<div class="body">
|
||||
<a-table
|
||||
style="width: 90%"
|
||||
:columns="columnsAudit"
|
||||
:data-source="tableDataAudit"
|
||||
:loading="tableDataTotalAudit === -1 ? true : false"
|
||||
expandRowByClick="true"
|
||||
:scroll="{ y: 150 }"
|
||||
@expand="expandTable"
|
||||
:pagination="false"
|
||||
style="width: 90%"
|
||||
:columns="columnsAudit"
|
||||
:data-source="tableDataAudit"
|
||||
:loading="tableDataTotalAudit === -1 ? true : false"
|
||||
expandRowByClick="true"
|
||||
:scroll="{ y: 150 }"
|
||||
@expand="expandTable"
|
||||
:pagination="false"
|
||||
/>
|
||||
</div>
|
||||
<div class="del_btnbox">
|
||||
@@ -148,9 +140,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, onMounted } from "vue";
|
||||
import { listView, auditList } from "../../api/indexAudit";
|
||||
import { toDate } from "@/api/method";
|
||||
import {reactive, toRefs, onMounted} from "vue";
|
||||
import {listView, auditList, auditlist, auditedlist} from "../../api/indexAudit";
|
||||
|
||||
export default {
|
||||
name: "ProjectViewed",
|
||||
@@ -180,8 +171,8 @@ export default {
|
||||
columns1: [
|
||||
{
|
||||
title: "序号",
|
||||
dataIndex: "number",
|
||||
key: "number",
|
||||
dataIndex: "projectId",
|
||||
key: "projectId",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
@@ -193,8 +184,8 @@ export default {
|
||||
|
||||
{
|
||||
title: "所属项目",
|
||||
dataIndex: "sourceBelongName",
|
||||
key: "sourceBelongName",
|
||||
dataIndex: "topName",
|
||||
key: "topName",
|
||||
align: "center",
|
||||
width: "10%",
|
||||
},
|
||||
@@ -209,23 +200,24 @@ export default {
|
||||
dataIndex: "status",
|
||||
key: "status",
|
||||
align: "center",
|
||||
customRender: ({record: {status}}) => <div>{{2: '审核通过', 3: '审核拒绝'}[status]}</div>,
|
||||
},
|
||||
{
|
||||
title: "创建人",
|
||||
dataIndex: "creater",
|
||||
key: "creater",
|
||||
dataIndex: "createName",
|
||||
key: "createName",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "审核时间",
|
||||
dataIndex: "time",
|
||||
key: "time",
|
||||
dataIndex: "updateTime",
|
||||
key: "updateTime",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "审核说明",
|
||||
dataIndex: "msg",
|
||||
key: "msg",
|
||||
dataIndex: "description",
|
||||
key: "description",
|
||||
align: "center",
|
||||
},
|
||||
|
||||
@@ -236,16 +228,16 @@ export default {
|
||||
align: "center",
|
||||
customRender: (value) => {
|
||||
return (
|
||||
<div>
|
||||
<div>
|
||||
<span
|
||||
onClick={() => {
|
||||
showProjAuditModal(value.record.id);
|
||||
}}
|
||||
style="cursor:pointer;color:#387DF7"
|
||||
onClick={() => {
|
||||
showProjAuditModal(value.record.auditList);
|
||||
}}
|
||||
style="cursor:pointer;color:#387DF7"
|
||||
>
|
||||
审核日志
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
@@ -254,22 +246,23 @@ export default {
|
||||
columnsAudit: [
|
||||
{
|
||||
title: "审核人",
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
dataIndex: "createName",
|
||||
key: "createName",
|
||||
align: "center",
|
||||
},
|
||||
|
||||
{
|
||||
title: "审核状态",
|
||||
dataIndex: "belong",
|
||||
key: "belong",
|
||||
dataIndex: "status",
|
||||
key: "status",
|
||||
align: "center",
|
||||
customRender: ({record: {status}}) => <div>{{'2': '审核通过', '-2': '审核拒绝'}[(status + '')]}</div>,
|
||||
},
|
||||
|
||||
{
|
||||
title: "审核时间",
|
||||
dataIndex: "time",
|
||||
key: "time",
|
||||
dataIndex: "createName",
|
||||
key: "createName",
|
||||
align: "center",
|
||||
},
|
||||
|
||||
@@ -286,124 +279,21 @@ export default {
|
||||
});
|
||||
const getProjList = () => {
|
||||
let objn = {
|
||||
beginTime: state.valueDate == undefined ? "" : Date.parse(state.valueDate[0]) ,
|
||||
endTime: state.valueDate == undefined ? "" : Date.parse(state.valueDate[1]),
|
||||
beginTime: state.valueDate ? state.valueDate[0] : '',
|
||||
endTime: state.valueDate ? state.valueDate[1] : '',
|
||||
createName: state.valuecreater,
|
||||
manager: state.valuename,
|
||||
name: state.valueproj,
|
||||
pageNo: state.currentPage,
|
||||
pageSize: state.pageSize,
|
||||
status: 0,
|
||||
status: 1,
|
||||
};
|
||||
listView(objn)
|
||||
.then((res) => {
|
||||
console.log("获取已审核项目成功", res.data.data.rows);
|
||||
let result = res.data.data;
|
||||
state.total = res.data.data.total;
|
||||
setTableData(result.rows);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取已审核项目失败", err);
|
||||
});
|
||||
auditedlist(objn).then((res) => {
|
||||
let result = res.data.data;
|
||||
state.total = res.data.data.total;
|
||||
state.tableData1 = result.rows
|
||||
})
|
||||
};
|
||||
const setTableData = (tabledata) => {
|
||||
let data = tabledata;
|
||||
let array = [];
|
||||
data.map((item,index) => {
|
||||
if(item.type == 3){
|
||||
let obj = {
|
||||
key:index+1,
|
||||
number: item.projectId,
|
||||
name: item.name,
|
||||
belong: "",
|
||||
manager: item.manager || "-",
|
||||
sourceBelongName: item.sourceBelongName,
|
||||
status:
|
||||
item.status == 0
|
||||
? "草稿"
|
||||
: item.status == 1
|
||||
? "已发布"
|
||||
: item.status == 2
|
||||
? "已结束"
|
||||
: "-",
|
||||
creater: item.createName,
|
||||
time: toDate(item.beginTime, "Y-M-D h:m"),
|
||||
msg: item.description || "-",
|
||||
id: item.projectId,
|
||||
};
|
||||
array.push(obj);
|
||||
} else {
|
||||
let obj = {
|
||||
key:index+1,
|
||||
number: item.projectId,
|
||||
name: item.name,
|
||||
belong: "",
|
||||
sourceBelongName: item.sourceBelongName,
|
||||
manager: item.manager || "-",
|
||||
status:
|
||||
item.status == 0
|
||||
? "草稿"
|
||||
: item.status == 1
|
||||
? "已发布"
|
||||
: item.status == 2
|
||||
? "已结束"
|
||||
: "-",
|
||||
creater: item.createName,
|
||||
time: toDate(item.beginTime, "Y-M-D h:m"),
|
||||
msg: item.description || "-",
|
||||
id: item.projectId,
|
||||
children: item.subList ? setTableData(item.subList) : [] ,
|
||||
};
|
||||
array.push(obj);
|
||||
}
|
||||
});
|
||||
state.tableData1 = array;
|
||||
return array
|
||||
};
|
||||
// const getName = (item) => {
|
||||
// if (
|
||||
// Object.prototype.hasOwnProperty.call(item.subList[0], "name") &&
|
||||
// !Object.prototype.hasOwnProperty.call(
|
||||
// item.subList[0].subList[0],
|
||||
// "name"
|
||||
// )
|
||||
// ) {
|
||||
// // 两层
|
||||
// return item.subList[0].name;
|
||||
// } else if (
|
||||
// Object.prototype.hasOwnProperty.call(item.subList[0], "name") &&
|
||||
// Object.prototype.hasOwnProperty.call(item.subList[0].subList[0], "name")
|
||||
// ) {
|
||||
// //三层
|
||||
// return item.subList[0].subList[0].name;
|
||||
// // return item.name
|
||||
// } else {
|
||||
// // 单层
|
||||
// return item.name;
|
||||
// }
|
||||
// };
|
||||
// const getBelong = (item) => {
|
||||
// if (
|
||||
// Object.prototype.hasOwnProperty.call(item.subList[0], "name") &&
|
||||
// !Object.prototype.hasOwnProperty.call(
|
||||
// item.subList[0].subList[0],
|
||||
// "name"
|
||||
// )
|
||||
// ) {
|
||||
// // 两层
|
||||
// return item.name;
|
||||
// } else if (
|
||||
// Object.prototype.hasOwnProperty.call(item.subList[0], "name") &&
|
||||
// Object.prototype.hasOwnProperty.call(item.subList[0].subList[0], "name")
|
||||
// ) {
|
||||
// //三层
|
||||
// return item.subList[0].name + "/" + item.subList[0].subList[0].name;
|
||||
// // return item.name
|
||||
// } else {
|
||||
// // 单层
|
||||
// return item.name;
|
||||
// }
|
||||
// };
|
||||
const changePagination = (pagina) => {
|
||||
state.currentPage = pagina;
|
||||
getProjList();
|
||||
@@ -419,21 +309,9 @@ export default {
|
||||
const closeProjAuditModal = () => {
|
||||
state.projAuditModal = false;
|
||||
};
|
||||
const showProjAuditModal = (id) => {
|
||||
const showProjAuditModal = (data) => {
|
||||
state.tableDataAudit = data
|
||||
state.projAuditModal = true;
|
||||
auditList({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
project_id: id,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("获取到了审核日志列表", res);
|
||||
let result = res.data.data;
|
||||
setAudit(result.rows);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("审核日志列表获取失败", err);
|
||||
});
|
||||
};
|
||||
const setAudit = (table) => {
|
||||
let data = table;
|
||||
@@ -442,13 +320,13 @@ export default {
|
||||
let obj = {
|
||||
name: item.create_name,
|
||||
belong:
|
||||
item.status == 1
|
||||
? "提交待审核"
|
||||
: item.status == 2
|
||||
? "通过"
|
||||
: item.status == 3
|
||||
? "拒绝"
|
||||
: "-",
|
||||
item.status == 1
|
||||
? "提交待审核"
|
||||
: item.status == 2
|
||||
? "通过"
|
||||
: item.status == 3
|
||||
? "拒绝"
|
||||
: "-",
|
||||
time: item.createTime,
|
||||
description: item.description,
|
||||
};
|
||||
@@ -464,7 +342,6 @@ export default {
|
||||
return {
|
||||
...toRefs(state),
|
||||
getProjList,
|
||||
setTableData,
|
||||
changePagination,
|
||||
reset,
|
||||
closeProjAuditModal,
|
||||
@@ -479,13 +356,16 @@ export default {
|
||||
.ant-modal {
|
||||
width: 816px !important;
|
||||
min-height: 420px !important;
|
||||
|
||||
.ant-modal-content {
|
||||
width: 816px !important;
|
||||
min-height: 420px !important;
|
||||
|
||||
.ant-modal-body {
|
||||
width: 816px !important;
|
||||
min-height: 420px !important;
|
||||
padding: 0 !important;
|
||||
|
||||
.delete {
|
||||
z-index: 999;
|
||||
width: 816px;
|
||||
@@ -502,19 +382,22 @@ export default {
|
||||
width: calc(100%);
|
||||
height: 68px;
|
||||
background: linear-gradient(
|
||||
rgba(78, 166, 255, 0.2) 0%,
|
||||
rgba(78, 166, 255, 0) 100%
|
||||
rgba(78, 166, 255, 0.2) 0%,
|
||||
rgba(78, 166, 255, 0) 100%
|
||||
);
|
||||
}
|
||||
|
||||
.del_main {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-top: 20px;
|
||||
padding-left: 26px;
|
||||
font-size: 16px;
|
||||
|
||||
.icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
@@ -522,6 +405,7 @@ export default {
|
||||
background-image: url(@/assets/images/taskpage/gan.png);
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.close_exit {
|
||||
position: absolute;
|
||||
right: 42px;
|
||||
@@ -532,6 +416,7 @@ export default {
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.body {
|
||||
width: 100%;
|
||||
margin: 34px auto 56px auto;
|
||||
@@ -541,9 +426,11 @@ export default {
|
||||
flex-direction: column;
|
||||
// background-color: red;
|
||||
position: relative;
|
||||
|
||||
.ant-table-empty {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.back {
|
||||
position: absolute;
|
||||
top: 30px;
|
||||
@@ -552,10 +439,12 @@ export default {
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.del_btnbox {
|
||||
display: flex;
|
||||
margin: 30px auto;
|
||||
justify-content: center;
|
||||
|
||||
.del_btn {
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
@@ -567,17 +456,20 @@ export default {
|
||||
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
|
||||
.btnText {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.btn1 {
|
||||
border: 1px solid rgba(64, 158, 255, 1);
|
||||
color: #4ea6ff;
|
||||
margin-right: 14px;
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
background-color: #4ea6ff;
|
||||
color: #ffffff;
|
||||
@@ -589,10 +481,13 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.projectviewed {
|
||||
width: 100%;
|
||||
|
||||
.tmpl {
|
||||
width: 100%;
|
||||
|
||||
.tmpl_header {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
@@ -601,33 +496,39 @@ export default {
|
||||
|
||||
margin-left: 32px;
|
||||
margin-right: 32px;
|
||||
|
||||
.tmplh_inp {
|
||||
.inpbox {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 42px;
|
||||
|
||||
.inpbox1 {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-right: 24px;
|
||||
margin-top: 10px;
|
||||
|
||||
.ant-select-selector {
|
||||
border-radius: 8px;
|
||||
width: 270px;
|
||||
height: 40px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
span {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tmplh_btn {
|
||||
display: flex;
|
||||
// margin-left: 38px;
|
||||
margin-top: 32px;
|
||||
|
||||
.btn {
|
||||
padding: 0px 26px 0px 26px;
|
||||
height: 38px;
|
||||
@@ -638,72 +539,90 @@ export default {
|
||||
margin-right: 14px;
|
||||
cursor: pointer;
|
||||
flex-shrink: 0;
|
||||
|
||||
.search {
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
.btnText {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 36px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.btnText1 {
|
||||
color: rgb(255, 255, 255);
|
||||
}
|
||||
|
||||
.btnText2 {
|
||||
color: rgba(64, 158, 255, 1);
|
||||
}
|
||||
}
|
||||
|
||||
.btn1 {
|
||||
background: #409eff;
|
||||
|
||||
.search {
|
||||
width: 15px;
|
||||
height: 17px;
|
||||
background-image: url("../../assets/images/courseManage/search0.png");
|
||||
}
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
background: #ffffff;
|
||||
border: 1px solid #388be1;
|
||||
|
||||
.search {
|
||||
width: 16px;
|
||||
height: 18px;
|
||||
background-image: url("../../assets/images/courseManage/reset1.png");
|
||||
}
|
||||
}
|
||||
|
||||
.btn1:hover {
|
||||
background: rgb(255, 255, 255);
|
||||
border: 1px solid #388be1;
|
||||
|
||||
.search {
|
||||
background-image: url("../../assets/images/courseManage/search1.png");
|
||||
}
|
||||
|
||||
.btnText {
|
||||
color: rgba(64, 158, 255, 1);
|
||||
}
|
||||
}
|
||||
|
||||
.btn2:hover {
|
||||
background: rgba(64, 158, 255, 1);
|
||||
|
||||
.search {
|
||||
background-image: url("../../assets/images/courseManage/reset0.png");
|
||||
}
|
||||
|
||||
.btnText {
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tmpl_body {
|
||||
padding: 0px 30px;
|
||||
|
||||
.tmpl_tabbox {
|
||||
.operation {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #4ea6ff;
|
||||
|
||||
.nselect {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
|
||||
.jc {
|
||||
margin-left: 20px;
|
||||
white-space: nowrap;
|
||||
@@ -712,6 +631,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pa {
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
|
||||
Reference in New Issue
Block a user