fit:添加案例 选择测评、试卷 、四个管理的获取列表接口请求条件 添加案例最多选择两条 选择试卷、测评最多选择一条可反选创建测评信息接口请求参数修改

This commit is contained in:
Ggysh-7
2022-11-22 18:25:24 +08:00
parent a8153029af
commit 6ecc8e01fd
9 changed files with 108 additions and 56 deletions

View File

@@ -150,8 +150,10 @@ export default {
localStorage.setItem("stageId", props.chooseStageId); localStorage.setItem("stageId", props.chooseStageId);
localStorage.setItem("chapterId", props.isactive); localStorage.setItem("chapterId", props.isactive);
}; };
const afterVisibleChange = () => { const afterVisibleChange = (bol) => {
getAllCaseText() if ( bol == true ) {
getAllCaseText()
}
}; };
const tableDataFunc = () => { const tableDataFunc = () => {
const columns = [ const columns = [
@@ -182,6 +184,9 @@ export default {
return columns; return columns;
}; };
const onSelectChange = (selectedRowKeys,selectedRows)=> { const onSelectChange = (selectedRowKeys,selectedRows)=> {
if(selectedRowKeys.length>2){
return
}
state.selectedRowKeys = selectedRowKeys; state.selectedRowKeys = selectedRowKeys;
state.apiTaskList = selectedRows; state.apiTaskList = selectedRows;
}; };
@@ -251,18 +256,6 @@ export default {
}); });
} else if (props.isLevel == 2) { } else if (props.isLevel == 2) {
if(state.apiTaskList.length > 1){ if(state.apiTaskList.length > 1){
// for((item,index) in state.apiTaskList){
// apiTask
// .addTask({
// "courseId": item.caseId,
// "duration": 0,
// "flag": true,
// "name": item.caseName,
// "projectId": props.projectId,
// "projectTaskId": props.projectTaskId,
// "stageId": props.chooseStageId,
// "type": 3,
// })
for(let i = 0;i <= state.apiTaskList.length;i++){ for(let i = 0;i <= state.apiTaskList.length;i++){
apiTask apiTask
.addTask({ .addTask({
@@ -455,6 +448,9 @@ export default {
.ant-table-selection-column { .ant-table-selection-column {
padding: 0px !important; padding: 0px !important;
padding-left: 15px !important; padding-left: 15px !important;
.ant-table-selection{
display: none;
}
} }
.ant-table-thead > tr > th { .ant-table-thead > tr > th {
background-color: rgba(239, 244, 252, 1); background-color: rgba(239, 244, 252, 1);

View File

@@ -215,6 +215,8 @@ export default {
projectId: props.projectId, projectId: props.projectId,
projectTaskId: props.projectTaskId || 0, projectTaskId: props.projectTaskId || 0,
stageId: props.chooseStageId, stageId: props.chooseStageId,
evaluationTypeId: state.evaluationTypeId,
evaluationTypeName: state.evaluationTypeName,
type: 10, type: 10,
}) })
.then(( ) => { .then(( ) => {
@@ -230,6 +232,8 @@ export default {
name: res.data.data.evaluationName, name: res.data.data.evaluationName,
routerId: props.routerId, routerId: props.routerId,
routerTaskId: props.routerTaskId || 0, routerTaskId: props.routerTaskId || 0,
evaluationTypeId: state.evaluationTypeId,
evaluationTypeName: state.evaluationTypeName,
type: 10, type: 10,
}) })
.then(( ) => { .then(( ) => {

View File

@@ -78,15 +78,16 @@
<div class="main_item"> <div class="main_item">
<div class="btnbox"> <div class="btnbox">
<a-form-item has-feedback label="选择试卷" name="choosedTest"> <a-form-item has-feedback label="选择试卷" name="choosedTest">
<!-- <a-select <a-button
dropdownClassName="dropdown-style" type="primary"
placeholder="请输入考试名称" style="width: 100px; margin-left: 35px"
:options="options1" class="outer"
v-model:value="formState.choosedTest" @click.prevent
allowClear @click="selectTest()"
showSearch >
/> --> 选择试卷
<a-dropdown> </a-button>
<!-- <a-dropdown>
<a-button <a-button
type="primary" type="primary"
style="width: 100px; margin-left: 35px" style="width: 100px; margin-left: 35px"
@@ -109,16 +110,22 @@
</a-menu-item> </a-menu-item>
</a-menu> </a-menu>
</template> </template>
</a-dropdown> </a-dropdown> -->
<span style="margin-left: 10px"> <span style="margin-left: 10px">
<a-tag <a-tag
class="tag-style"
v-if="paperName != ''"
:closable="true"
>{{ paperName }}</a-tag
>
<!-- <a-tag
class="tag-style" class="tag-style"
v-for="item in choosedTestList" v-for="item in choosedTestList"
:closable="true" :closable="true"
@close="closeTag(item.key)" @close="closeTag(item.key)"
:key="item.key" :key="item.key"
>{{ item.value }}</a-tag >{{ item.value }}</a-tag
> > -->
</span> </span>
</a-form-item> </a-form-item>
</div> </div>
@@ -709,8 +716,8 @@ export default {
.catch(() => { .catch(() => {
message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`); message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`);
}); });
} else if (props.isLevel == 3) { } else if (props.isLevel == 3) {
console.log(""); console.log("");
} }
}; };

View File

@@ -36,7 +36,7 @@
<div class="search"></div> <div class="search"></div>
<div class="btnText">搜索</div> <div class="btnText">搜索</div>
</div> </div>
<div class="btn btn2"> <div class="btn btn2" @click="resetData">
<div class="search"></div> <div class="search"></div>
<div class="btnText">重置</div> <div class="btnText">重置</div>
</div> </div>
@@ -50,7 +50,7 @@
:data-source="tableData" :data-source="tableData"
:loading="tableDataTotal === -1 ? true : false" :loading="tableDataTotal === -1 ? true : false"
:pagination="false" :pagination="false"
:row-selection="{ selectedRowKeys:selectedRowKeys,onSelect:onSelect,onChange:onSelectChange}" :row-selection="{ selectedRowKeys:selectedRowKeys,onChange:onSelectChange}"
/> />
<div class="pa"> <div class="pa">
<a-pagination <a-pagination
@@ -148,18 +148,25 @@
}, },
] ]
}); });
const onSelect = (record)=> { // const onSelect = (record)=> {
state.evaluationTypeName = record.title // state.evaluationTypeName = record.title
state.evaluationTypeId = record.quiz_code // state.evaluationTypeId = record.quiz_code
}; // };
const onSelectChange = (selectedRowKeys)=> { const onSelectChange = (selectedRowKeys,selectedRows)=> {
if(state.selectedRowKeys.length>1){
return
}
state.selectedRowKeys = selectedRowKeys state.selectedRowKeys = selectedRowKeys
state.evaluationTypeName = selectedRows[0].record.title
state.evaluationTypeId = selectedRows[0].quiz_code
} }
const closeDrawer = () => { const closeDrawer = () => {
ctx.emit("update:EvalListVisible", false); ctx.emit("update:EvalListVisible", false);
}; };
const afterVisibleChange = () => { const afterVisibleChange = (bol) => {
getAllEvalText(); if ( bol == true ) {
getAllEvalText();
}
}; };
const checkFinish =() =>{ const checkFinish =() =>{
let EvListDate = { let EvListDate = {
@@ -204,15 +211,24 @@
.catch(()=>{ .catch(()=>{
}) })
} }
//重置测评列表
const resetData = ()=> {
state.currentPage = 1;
state.tableData = [];
state.selectedRowKeys = [];
state.evaluationTypeId = null;
state.evaluationTypeName = "";
getAllEvalText();
}
return { return {
...toRefs(state), ...toRefs(state),
afterVisibleChange, afterVisibleChange,
closeDrawer, closeDrawer,
onSelectChange, onSelectChange,
onSelect,
getTableDataList, getTableDataList,
checkFinish, checkFinish,
changePagination, changePagination,
resetData,
}; };
}, },
}; };

View File

@@ -98,7 +98,6 @@
:row-selection="{ :row-selection="{
selectedRowKeys: selectedRowKeys, selectedRowKeys: selectedRowKeys,
onChange: onSelectChange, onChange: onSelectChange,
onSelect: onSelect,
}" }"
/> />
<div class="pa"> <div class="pa">
@@ -194,12 +193,20 @@ export default {
selectedRowKeys: [], selectedRowKeys: [],
tabledata: [ tabledata: [
{ {
key:1,
workNum:1, workNum:1,
status:"已完成", status:"已完成",
operation:"", operation:"",
}, },
{ {
workNum:1, key:2,
workNum:2,
status:"未完成",
operation:"",
},
{
key:3,
workNum:2,
status:"未完成", status:"未完成",
operation:"", operation:"",
} }
@@ -341,18 +348,21 @@ export default {
const closeDrawer = () => { const closeDrawer = () => {
ctx.emit("update:Fvisible", false); ctx.emit("update:Fvisible", false);
}; };
const afterVisibleChange = () => { const afterVisibleChange = (bol) => {
getManageList() if ( bol == true ) {
getManageList()
}
}; };
const selectProjectName = (value) => { const selectProjectName = (value) => {
state.projectName = value; state.projectName = value;
}; };
const onSelectChange = (selectedRowKeys) => { const onSelectChange = (selectedRowKeys) => {
state.selectedRowKeys = selectedRowKeys; if(selectedRowKeys.length > 2){
return
}
state.selectedRowKeys = selectedRowKeys;
}; };
const onSelect = (record) => {
console.log(record);
}
const allStuOver = ()=> { const allStuOver = ()=> {
state.ASOvervisible = true state.ASOvervisible = true
@@ -457,7 +467,6 @@ export default {
closeDrawer, closeDrawer,
afterVisibleChange, afterVisibleChange,
onSelectChange, onSelectChange,
onSelect,
allStuOver, allStuOver,
showEntryScore, showEntryScore,
godie, godie,
@@ -672,7 +681,6 @@ export default {
.tableBox { .tableBox {
.ant-table-selection-column { .ant-table-selection-column {
padding: 0px !important; padding: 0px !important;
// padding-left: 45px !important;
} }
.ant-pagination-item, .ant-pagination-item,
.ant-pagination-prev, .ant-pagination-prev,

View File

@@ -126,8 +126,10 @@
ctx.emit("update:STvisible", false); ctx.emit("update:STvisible", false);
}; };
const afterVisibleChange = () => { const afterVisibleChange = (bol) => {
if (bol == true) {
getManageList() getManageList()
}
}; };
const tableDataFunc = ()=> { const tableDataFunc = ()=> {
@@ -186,6 +188,9 @@
state.SelectTestData = record state.SelectTestData = record
}; };
const onSelectChange = (selectedRowKeys) => { const onSelectChange = (selectedRowKeys) => {
if(selectedRowKeys.length>1){
return
}
state.selectedRowKeys = selectedRowKeys; state.selectedRowKeys = selectedRowKeys;
} }
@@ -232,7 +237,7 @@
}); });
}; };
//搜索任务列表 //搜索任务列表 没接口
const searchTaskList = () => { const searchTaskList = () => {
let objser = { let objser = {
name: "", name: "",
@@ -264,9 +269,12 @@
//重置任务列表 //重置任务列表
const resetTaskList = () => { const resetTaskList = () => {
state.name = ""; state.inputPname = "";
state.projectName = ""; state.inputCname = "";
state.tabledata = []; state.tableData = [];
state.selectedRowKeys = [];
state.SelectTestData = [];
state.currentPage = 1;
getManageList(); getManageList();
}; };
return { return {
@@ -398,6 +406,12 @@
} }
} }
.tab { .tab {
.ant-table-selection-column {
.ant-table-selection{
display: none;
}
}
th.h { th.h {
background-color: #eff4fc !important; background-color: #eff4fc !important;
} }

View File

@@ -394,8 +394,11 @@ export default {
const closeDrawer = () => { const closeDrawer = () => {
ctx.emit("update:TMvisible", false); ctx.emit("update:TMvisible", false);
}; };
const afterVisibleChange = () => { const afterVisibleChange = (bol) => {
if ( bol == true ) {
getManageList(); getManageList();
}
}; };
const selectProjectName = (value, index) => { const selectProjectName = (value, index) => {
console.log("value", value, index); console.log("value", value, index);

View File

@@ -345,8 +345,10 @@ export default {
const closeDrawer = () => { const closeDrawer = () => {
ctx.emit("update:Tvisible", false); ctx.emit("update:Tvisible", false);
}; };
const afterVisibleChange = () => { const afterVisibleChange = (bol) => {
if ( bol == true ) {
getManageList(); getManageList();
}
}; };
const selectProjectName = (value) => { const selectProjectName = (value) => {
state.projectName = value; state.projectName = value;

View File

@@ -299,8 +299,10 @@ export default {
const closeDrawer = () => { const closeDrawer = () => {
ctx.emit("update:Wvisible", false); ctx.emit("update:Wvisible", false);
}; };
const afterVisibleChange = () => { const afterVisibleChange = (bol) => {
getManageList(); if ( bol == true ) {
getManageList();
}
}; };
const selectProjectName = (value) => { const selectProjectName = (value) => {
state.projectName = value; state.projectName = value;