fix:修改案例无法显示问题

This commit is contained in:
lixg
2022-12-06 16:01:10 +08:00
parent eddf03ee75
commit a75f047bf2
3 changed files with 82 additions and 79 deletions

View File

@@ -51,12 +51,12 @@
<div class="qrmbtn" @click="downloadQr(200)"> <div class="qrmbtn" @click="downloadQr(200)">
<div class="btntext">200*200</div> <div class="btntext">200*200</div>
</div> </div>
<div class="qrmbtn" @click="downloadQr(200)"> <!-- <div class="qrmbtn" @click="downloadQr(200)">
<div class="btntext">400*400</div> <div class="btntext">400*400</div>
</div> </div>
<div class="qrmbtn" @click="downloadQr(200)"> <div class="qrmbtn" @click="downloadQr(200)">
<div class="btntext">800*800</div> <div class="btntext">800*800</div>
</div> </div> -->
</div> </div>
</div> </div>
</div> </div>

View File

@@ -47,13 +47,13 @@
<div class="main_table"> <div class="main_table">
<a-table <a-table
v-if="edit" v-if="edit"
class="ant-table-striped" class="ant-table-striped"
:row-class-name=" :row-class-name="
(_record, index) => (index % 2 === 1 ? 'table-striped' : null) (_record, index) => (index % 2 === 1 ? 'table-striped' : null)
" "
:row-selection="{ :row-selection="{
type:'radio', type: 'radio',
selectedRowKeys: selectedRowKeys, selectedRowKeys: selectedRowKeys,
onChange: onSelectChange, onChange: onSelectChange,
}" }"
@@ -63,7 +63,7 @@
:pagination="false" :pagination="false"
/> />
<a-table <a-table
v-else v-else
class="ant-table-striped" class="ant-table-striped"
:row-class-name=" :row-class-name="
(_record, index) => (index % 2 === 1 ? 'table-striped' : null) (_record, index) => (index % 2 === 1 ? 'table-striped' : null)
@@ -79,7 +79,7 @@
/> />
<div class="pa"> <div class="pa">
<a-pagination <a-pagination
v-if="tableDataTotal>10" v-if="tableDataTotal > 10"
showSizeChanger="true" showSizeChanger="true"
showQuickJumper="true" showQuickJumper="true"
hideOnSinglePage="true" hideOnSinglePage="true"
@@ -216,7 +216,7 @@ export default {
state.apiTaskList = selectedRows; state.apiTaskList = selectedRows;
}; };
const handelChangePage = (page, pageSize) => { const handelChangePage = (page, pageSize) => {
state.selectedRowKeys = [] state.selectedRowKeys = [];
state.currentPage = page; state.currentPage = page;
state.pageSize = pageSize; state.pageSize = pageSize;
getAllCaseText(); getAllCaseText();
@@ -224,7 +224,7 @@ export default {
const getTableDate = (tableData) => { const getTableDate = (tableData) => {
let data = tableData; let data = tableData;
let array = []; let array = [];
data.map((value, index) => { data.map((value, index) => {
let obj = { let obj = {
key: index, key: index,
authorId: value.authorId, authorId: value.authorId,
@@ -251,15 +251,15 @@ export default {
isTop: "", isTop: "",
}) })
.then((res) => { .then((res) => {
console.log('案例列表',res) console.log("案例列表", res);
if (res.status === 200) { if (res.data.code === 200) {
state.selectedRowKeys=[0] // state.selectedRowKeys = [0];
for(let i=0;i<res.data.data.length;i++){ for (let i = 0; i < res.data.data.list.length; i++) {
if(Number(res.data.data[i].casesId) == props.EditCaseId){ if (Number(res.data.data.list[i].casesId) == props.EditCaseId) {
state.selectedRowKeys = [i] state.selectedRowKeys = [i];
} }
} }
getTableDate(res.data.data); getTableDate(res.data.data.list);
} }
}) })
.catch(() => {}); .catch(() => {});
@@ -334,25 +334,25 @@ export default {
} }
}; };
//搜索案例列表 //搜索案例列表
const searchList = ()=> { const searchList = () => {
if(state.inputV1 !== ''){ if (state.inputV1 !== "") {
getAllCaseText() getAllCaseText();
}else { } else {
resetCase() resetCase();
} }
} };
//重置案例信息 //重置案例信息
const resetCase = () => { const resetCase = () => {
state.inputV1 = "" state.inputV1 = "";
state.selectedRowKeys=[] state.selectedRowKeys = [];
state.currentPage = 1 state.currentPage = 1;
getAllCaseText(); getAllCaseText();
}; };
onMounted(()=>{ onMounted(() => {
// let cookie = // let cookie =
// "eyJ0eXBlIjoidG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC91LmJvZS5jb20iLCJpYXQiOjE2Njk0MjgwNTAsImV4cCI6MTY2OTQzNTI1MCwiR2l2ZW5OYW1lIjoiYm9ldSIsInVzZXJJZCI6IjZCMDQ5RkFGLUMzMTQtN0NDRi0wRDI4LTBEMjNGNEM0MjUzMSIsInVJZCI6Ijk2NTM0MjAyNzQ5NzYwNzE2OCIsInBlcm1pc3Npb24iOiIifQ==.9ea5ce6d4cd43c2c17f21a293e4dc0d362c2a404b9d50fae5c49fed5a238fb1a"; // "eyJ0eXBlIjoidG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC91LmJvZS5jb20iLCJpYXQiOjE2Njk0MjgwNTAsImV4cCI6MTY2OTQzNTI1MCwiR2l2ZW5OYW1lIjoiYm9ldSIsInVzZXJJZCI6IjZCMDQ5RkFGLUMzMTQtN0NDRi0wRDI4LTBEMjNGNEM0MjUzMSIsInVJZCI6Ijk2NTM0MjAyNzQ5NzYwNzE2OCIsInBlcm1pc3Npb24iOiIifQ==.9ea5ce6d4cd43c2c17f21a293e4dc0d362c2a404b9d50fae5c49fed5a238fb1a";
// setCookie("token", cookie, 10); // setCookie("token", cookie, 10);
}) });
return { return {
...toRefs(state), ...toRefs(state),
afterVisibleChange, afterVisibleChange,

View File

@@ -1091,7 +1091,7 @@
<div class="set_content" v-if="isPass"> <div class="set_content" v-if="isPass">
<div class="setc_name"><span>审核意见:</span></div> <div class="setc_name"><span>审核意见:</span></div>
<div class="setc_main"> <div class="setc_main">
<span style="color: #333333">{{passInfo}}</span> <span style="color: #333333">{{ passInfo }}</span>
</div> </div>
</div> </div>
</div> </div>
@@ -1106,7 +1106,10 @@
<div class="box"></div> <div class="box"></div>
<div class="onetitle">上传共享文档</div> <div class="onetitle">上传共享文档</div>
<div class="oneedi"> <div class="oneedi">
<a-switch v-model:checked="docChecked" @change="checkedClose"></a-switch> <a-switch
v-model:checked="docChecked"
@change="checkedClose"
></a-switch>
</div> </div>
</div> </div>
<div class="btnbox" style="margin: 20px"> <div class="btnbox" style="margin: 20px">
@@ -2435,9 +2438,8 @@ export default {
authClassify: 3, authClassify: 3,
addAuthList: [], addAuthList: [],
switchopen: true, switchopen: true,
isPass:false, // 是否审核未通过 isPass: false, // 是否审核未通过
passInfo:null, // 审核未通过原因说明 passInfo: null, // 审核未通过原因说明
}); });
const levelList = reactive({ const levelList = reactive({
@@ -2511,10 +2513,10 @@ export default {
let leng = res.data.data.stageList.length; let leng = res.data.data.stageList.length;
if (leng > 0) { if (leng > 0) {
let taskarr = res.data.data.stageList; let taskarr = res.data.data.stageList;
console.log('11-22-33',taskarr) console.log("11-22-33", taskarr);
if(taskarr.length==1){ if (taskarr.length == 1) {
if(taskarr[0].stageId == '0'){ if (taskarr[0].stageId == "0") {
taskarr[0].name = '无阶段任务' taskarr[0].name = "无阶段任务";
} }
} }
state.taskSyllabus = taskarr; state.taskSyllabus = taskarr;
@@ -3370,13 +3372,13 @@ export default {
console.log("get task", res.data.data); console.log("get task", res.data.data);
if (res.data.code === 200) { if (res.data.code === 200) {
// 判断当前审核是否通过 // 判断当前审核是否通过
if(res.data.data.projectAuditLogDtoList!==null){ if (res.data.data.projectAuditLogDtoList !== null) {
console.log('审核信息是什么',res.data.data.projectAuditLogDtoList) console.log("审核信息是什么", res.data.data.projectAuditLogDtoList);
let dataset = res.data.data.projectAuditLogDtoList let dataset = res.data.data.projectAuditLogDtoList;
for(let i=0;i<dataset.length;i++){ for (let i = 0; i < dataset.length; i++) {
if(dataset[i].status==-5){ if (dataset[i].status == -5) {
state.isPass = true state.isPass = true;
state.passInfo = dataset[i].description state.passInfo = dataset[i].description;
} }
// isPass passInfo // isPass passInfo
} }
@@ -3411,8 +3413,8 @@ export default {
state.type = info.type; state.type = info.type;
state.category = info.category; state.category = info.category;
state.noticeFlag = info.noticeFlag; state.noticeFlag = info.noticeFlag;
state.switchopen = info.attachSwitch==1?true:false state.switchopen = info.attachSwitch == 1 ? true : false;
state.docChecked = info.attachSwitch==1?true:false; state.docChecked = info.attachSwitch == 1 ? true : false;
// state.attach = info.attach; // state.attach = info.attach;
// state.templateId = info.templateId; // state.templateId = info.templateId;
@@ -3483,11 +3485,13 @@ export default {
// projectGroupId: 0, // projectGroupId: 0,
projectId: state.projectId, projectId: state.projectId,
}; };
console.log("小组创建obj", obj);
editGroup(obj) editGroup(obj)
.then((res) => { .then((res) => {
console.log("小组创建成功", res); console.log("小组创建成功", res);
message.success("小组创建成功"); message.success("小组创建成功");
getGroup(); getGroup();
getStu();
}) })
.catch((err) => { .catch((err) => {
console.log("小组创建失败", err); console.log("小组创建失败", err);
@@ -3569,40 +3573,39 @@ export default {
}; };
//end---------项目概览 //end---------项目概览
// 设置上传图片开关
// 设置上传图片开关 const checkedClose = (data, a) => {
const checkedClose = (data, a) => {
console.log(data, a); console.log(data, a);
state.docChecked = data; state.docChecked = data;
state.switchopen = data state.switchopen = data;
// 更新开关状态 // 更新开关状态
editProj({ editProj({
attachSwitch:state.switchopen?1:-1, attachSwitch: state.switchopen ? 1 : -1,
boeFlag: state.boeFlag, boeFlag: state.boeFlag,
category: state.category, category: state.category,
courseSyncFlag: state.courseSyncFlag, courseSyncFlag: state.courseSyncFlag,
level: state.tlevel, level: state.tlevel,
manager: state.manager, manager: state.manager,
managerId: state.managerId, managerId: state.managerId,
name: state.name, name: state.name,
notice: state.notice, notice: state.notice,
noticeFlag: state.noticeFlag, noticeFlag: state.noticeFlag,
parentId: state.parentId, parentId: state.parentId,
picUrl: state.picUrl, picUrl: state.picUrl,
projectId: Number(state.projectId), projectId: Number(state.projectId),
remark: state.remark, remark: state.remark,
sourceBelongId: Number(state.tsourceBelong), sourceBelongId: Number(state.tsourceBelong),
status: state.status, status: state.status,
systemId: state.tsystemId, systemId: state.tsystemId,
templateId: state.templateId || 0, templateId: state.templateId || 0,
type: state.type, type: state.type,
})
.then((res) => {
console.log("上传成功", res);
}) })
.then((res) => { .catch((err) => {
console.log("上传成功", res); console.log("上传失败了", err);
}) });
.catch((err) => {
console.log("上传失败了", err);
});
}; };
const handleChange = ({ file, fileList }) => { const handleChange = ({ file, fileList }) => {
@@ -3615,7 +3618,7 @@ export default {
let str = JSON.stringify(list); let str = JSON.stringify(list);
console.log("str", str); console.log("str", str);
//要编辑项目 //要编辑项目
console.log('编辑的项目信息',{ console.log("编辑的项目信息", {
attach: str, attach: str,
// beginTime: state.tstartTime.slice(0, 10), // beginTime: state.tstartTime.slice(0, 10),
boeFlag: state.boeFlag, boeFlag: state.boeFlag,
@@ -3637,9 +3640,9 @@ export default {
systemId: state.tsystemId, systemId: state.tsystemId,
templateId: state.templateId || 0, templateId: state.templateId || 0,
type: state.type, type: state.type,
}) });
editProj({ editProj({
attachSwitch:state.switchopen?1:-1, attachSwitch: state.switchopen ? 1 : -1,
attach: str, attach: str,
boeFlag: state.boeFlag, boeFlag: state.boeFlag,
category: state.category, category: state.category,
@@ -4028,7 +4031,7 @@ export default {
deFile, deFile,
toDate, toDate,
routered, routered,
checkedClose checkedClose,
}; };
}, },
}; };