2723 changed files with 438186 additions and 1613 deletions
@ -0,0 +1,150 @@ |
|||
import request from '@/utils/request'; |
|||
import { addtabledetailslist, delsontarget, del_son_tar, edit_details_cont, edit_details_state, edit_newson_target, edit_post_detailscont, edit_table_depart_man, eidtposttardetailsstrte, getcompanydeparment, getdetail, getnew_target_depart_postman, getonedetailed, getplanversionvalid, getsontargetcont, get_organdpost_three, govthreeing, look_scheme_for_deparment, newsummarydetails, orgtrant, table_add_detailses } from './type'; |
|||
export function orgtranscript(data?:orgtrant){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/orgtranscript', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getplanvers(data?:getplanversionvalid){ |
|||
return request({ |
|||
url:'api/ststic/getplanversionvalid', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummary(data?:newsummarydetails){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/newsummarydetails', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function govthree(data?:govthreeing){ |
|||
return request({ |
|||
url:'hrapi/org/govthreeing', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getonedetailedtarget(data?:getonedetailed){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getonedetailedtarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getcompany(data?:getcompanydeparment){ |
|||
return request({ |
|||
url:'hrapi/org/getcompanydeparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_details(data?:edit_details_state){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_state', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getsontarget(data?:getsontargetcont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getsontargetcont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function table_add(data?:table_add_detailses){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/table_add_detailses', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_table(data?:edit_table_depart_man){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_table_depart_man', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function delsontar(data?:delsontarget){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/delsontarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getdetailscont(data?:getdetail){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getdetailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_detail(data?:edit_details_cont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getnew_target(data?:getnew_target_depart_postman){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getnew_target_depart_postman', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_post(data?:edit_post_detailscont){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_post_detailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function eidtposttardetail(data?:eidtposttardetailsstrte){ |
|||
return request({ |
|||
url:'kpiapi/postpc/eidtposttardetailsstrte', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function addtabledetail(data?:addtabledetailslist){ |
|||
return request({ |
|||
url:'kpiapi/postpc/addtabledetailslist', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_newson(data?:edit_newson_target){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_newson_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function del_son(data?:del_son_tar){ |
|||
return request({ |
|||
url:'kpiapi/postpc/del_son_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function look_scheme(data?:look_scheme_for_deparment){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/look_scheme_for_deparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function get_organdpost(data?:get_organdpost_three){ |
|||
return request({ |
|||
url:'hrapi/org/get_organdpost_three', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
newsummary |
|||
@ -0,0 +1,157 @@ |
|||
import request from '@/utils/request'; |
|||
import { addtabledetailslist, delsontarget, del_son_tar, edit_details_cont, edit_details_state, edit_newson_target, edit_post_detailscont, edit_table_depart_man, eidtposttardetailsstrte, getcompanydeparment, getdetail, getnew_target_depart_postman, getonedetailed, getplanversionvalid, getsontargetcont, get_organdpost_three, govthreeing, look_scheme_for_deparment, newsummarydetails, orgtrant, table_add_detailses } from './type'; |
|||
export function orgtranscript(data?:orgtrant){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/orgtranscript', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getplanvers(data?:getplanversionvalid){ |
|||
return request({ |
|||
url:'api/ststic/getplanversionvalid', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummary(data?:newsummarydetails){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/newsummarydetails', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function govthree(data?:govthreeing){ |
|||
return request({ |
|||
url:'hrapi/org/govthreeing', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getonedetailedtarget(data?:getonedetailed){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getonedetailedtarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getcompany(data?:getcompanydeparment){ |
|||
return request({ |
|||
url:'hrapi/org/getcompanydeparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_details(data?:edit_details_state){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_state', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getsontarget(data?:getsontargetcont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getsontargetcont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function table_add(data?:table_add_detailses){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/table_add_detailses', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_table(data?:edit_table_depart_man){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_table_depart_man', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function delsontar(data?:delsontarget){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/delsontarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getdetailscont(data?:getdetail){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getdetailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_detail(data?:edit_details_cont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getnew_target(data?:getnew_target_depart_postman){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getnew_target_depart_postman', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_post(data?:edit_post_detailscont){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_post_detailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function eidtposttardetail(data?:eidtposttardetailsstrte){ |
|||
return request({ |
|||
url:'kpiapi/postpc/eidtposttardetailsstrte', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function addtabledetail(data?:addtabledetailslist){ |
|||
return request({ |
|||
url:'kpiapi/postpc/addtabledetailslist', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_newson(data?:edit_newson_target){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_newson_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function del_son(data?:del_son_tar){ |
|||
return request({ |
|||
url:'kpiapi/postpc/del_son_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function look_scheme(data?:look_scheme_for_deparment){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/look_scheme_for_deparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function get_organdpost(data?:get_organdpost_three){ |
|||
return request({ |
|||
url:'hrapi/org/get_organdpost_three', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
newsummary |
|||
export function get_organdpost(data?:get_organdpost_three){ |
|||
return request({ |
|||
url:'hrapi/org/get_organdpost_three', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
@ -0,0 +1,156 @@ |
|||
import request from '@/utils/request'; |
|||
import { addtabledetailslist, delsontarget, del_son_tar, edit_details_cont, edit_details_state, edit_newson_target, edit_post_detailscont, edit_table_depart_man, eidtposttardetailsstrte, getcompanydeparment, getdetail, getnew_target_depart_postman, getonedetailed, getplanversionvalid, getsontargetcont, get_organdpost_three, govthreeing, look_scheme_for_deparment, newsummarydetails, orgtrant, table_add_detailses } from './type'; |
|||
export function orgtranscript(data?:orgtrant){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/orgtranscript', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getplanvers(data?:getplanversionvalid){ |
|||
return request({ |
|||
url:'api/ststic/getplanversionvalid', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummary(data?:newsummarydetails){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/newsummarydetails', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function govthree(data?:govthreeing){ |
|||
return request({ |
|||
url:'hrapi/org/govthreeing', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getonedetailedtarget(data?:getonedetailed){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getonedetailedtarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getcompany(data?:getcompanydeparment){ |
|||
return request({ |
|||
url:'hrapi/org/getcompanydeparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_details(data?:edit_details_state){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_state', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getsontarget(data?:getsontargetcont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getsontargetcont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function table_add(data?:table_add_detailses){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/table_add_detailses', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_table(data?:edit_table_depart_man){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_table_depart_man', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function delsontar(data?:delsontarget){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/delsontarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getdetailscont(data?:getdetail){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getdetailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_detail(data?:edit_details_cont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getnew_target(data?:getnew_target_depart_postman){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getnew_target_depart_postman', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_post(data?:edit_post_detailscont){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_post_detailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function eidtposttardetail(data?:eidtposttardetailsstrte){ |
|||
return request({ |
|||
url:'kpiapi/postpc/eidtposttardetailsstrte', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function addtabledetail(data?:addtabledetailslist){ |
|||
return request({ |
|||
url:'kpiapi/postpc/addtabledetailslist', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_newson(data?:edit_newson_target){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_newson_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function del_son(data?:del_son_tar){ |
|||
return request({ |
|||
url:'kpiapi/postpc/del_son_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function look_scheme(data?:look_scheme_for_deparment){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/look_scheme_for_deparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function get_organdpost(data?:get_organdpost_three){ |
|||
return request({ |
|||
url:'hrapi/org/get_organdpost_three', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function get_organdpost(data?:get_organdpost_three){ |
|||
return request({ |
|||
url:'hrapi/org/get_organdpost_three', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
@ -0,0 +1,156 @@ |
|||
import request from '@/utils/request'; |
|||
import { addtabledetailslist, delsontarget, del_son_tar, edit_details_cont, edit_details_state, edit_newson_target, edit_post_detailscont, edit_table_depart_man, eidtposttardetailsstrte, getcompanydeparment, getdetail, getnew_target_depart_postman, getonedetailed, getplanversionvalid, getsontargetcont, get_organdpost_three, govthreeing, look_scheme_for_deparment, newsummarydetails, orgtrant, table_add_detailses } from './type'; |
|||
export function orgtranscript(data?:orgtrant){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/orgtranscript', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getplanvers(data?:getplanversionvalid){ |
|||
return request({ |
|||
url:'api/ststic/getplanversionvalid', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummary(data?:newsummarydetails){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/newsummarydetails', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function govthree(data?:govthreeing){ |
|||
return request({ |
|||
url:'hrapi/org/govthreeing', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getonedetailedtarget(data?:getonedetailed){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getonedetailedtarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getcompany(data?:getcompanydeparment){ |
|||
return request({ |
|||
url:'hrapi/org/getcompanydeparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_details(data?:edit_details_state){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_state', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getsontarget(data?:getsontargetcont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getsontargetcont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function table_add(data?:table_add_detailses){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/table_add_detailses', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_table(data?:edit_table_depart_man){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_table_depart_man', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function delsontar(data?:delsontarget){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/delsontarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getdetailscont(data?:getdetail){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getdetailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_detail(data?:edit_details_cont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getnew_target(data?:getnew_target_depart_postman){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getnew_target_depart_postman', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_post(data?:edit_post_detailscont){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_post_detailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function eidtposttardetail(data?:eidtposttardetailsstrte){ |
|||
return request({ |
|||
url:'kpiapi/postpc/eidtposttardetailsstrte', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function addtabledetail(data?:addtabledetailslist){ |
|||
return request({ |
|||
url:'kpiapi/postpc/addtabledetailslist', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_newson(data?:edit_newson_target){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_newson_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function del_son(data?:del_son_tar){ |
|||
return request({ |
|||
url:'kpiapi/postpc/del_son_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function look_scheme(data?:look_scheme_for_deparment){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/look_scheme_for_deparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function get_organdpost(data?:get_organdpost_three){ |
|||
return request({ |
|||
url:'hrapi/org/get_organdpost_three', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function get_organdpost(data?:get_organdpost_three){ |
|||
return request({ |
|||
url:'hrapi/org/newsummary', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
@ -0,0 +1,156 @@ |
|||
import request from '@/utils/request'; |
|||
import { addtabledetailslist, delsontarget, del_son_tar, edit_details_cont, edit_details_state, edit_newson_target, edit_post_detailscont, edit_table_depart_man, eidtposttardetailsstrte, getcompanydeparment, getdetail, getnew_target_depart_postman, getonedetailed, getplanversionvalid, getsontargetcont, get_organdpost_three, govthreeing, look_scheme_for_deparment, newsummarydetails, orgtrant, table_add_detailses } from './type'; |
|||
export function orgtranscript(data?:orgtrant){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/orgtranscript', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getplanvers(data?:getplanversionvalid){ |
|||
return request({ |
|||
url:'api/ststic/getplanversionvalid', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummary(data?:newsummarydetails){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/newsummarydetails', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function govthree(data?:govthreeing){ |
|||
return request({ |
|||
url:'hrapi/org/govthreeing', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getonedetailedtarget(data?:getonedetailed){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getonedetailedtarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getcompany(data?:getcompanydeparment){ |
|||
return request({ |
|||
url:'hrapi/org/getcompanydeparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_details(data?:edit_details_state){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_state', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getsontarget(data?:getsontargetcont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getsontargetcont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function table_add(data?:table_add_detailses){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/table_add_detailses', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_table(data?:edit_table_depart_man){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_table_depart_man', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function delsontar(data?:delsontarget){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/delsontarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getdetailscont(data?:getdetail){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getdetailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_detail(data?:edit_details_cont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getnew_target(data?:getnew_target_depart_postman){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getnew_target_depart_postman', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_post(data?:edit_post_detailscont){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_post_detailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function eidtposttardetail(data?:eidtposttardetailsstrte){ |
|||
return request({ |
|||
url:'kpiapi/postpc/eidtposttardetailsstrte', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function addtabledetail(data?:addtabledetailslist){ |
|||
return request({ |
|||
url:'kpiapi/postpc/addtabledetailslist', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_newson(data?:edit_newson_target){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_newson_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function del_son(data?:del_son_tar){ |
|||
return request({ |
|||
url:'kpiapi/postpc/del_son_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function look_scheme(data?:look_scheme_for_deparment){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/look_scheme_for_deparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function get_organdpost(data?:get_organdpost_three){ |
|||
return request({ |
|||
url:'hrapi/org/get_organdpost_three', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummary(data?:get_organdpost_three){ |
|||
return request({ |
|||
url:'hrapi/org/newsummary', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
@ -0,0 +1,156 @@ |
|||
import request from '@/utils/request'; |
|||
import { addtabledetailslist, delsontarget, del_son_tar, edit_details_cont, edit_details_state, edit_newson_target, edit_post_detailscont, edit_table_depart_man, eidtposttardetailsstrte, getcompanydeparment, getdetail, getnew_target_depart_postman, getonedetailed, getplanversionvalid, getsontargetcont, get_organdpost_three, govthreeing, look_scheme_for_deparment, newsummarydetails, orgtrant, table_add_detailses } from './type'; |
|||
export function orgtranscript(data?:orgtrant){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/orgtranscript', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getplanvers(data?:getplanversionvalid){ |
|||
return request({ |
|||
url:'api/ststic/getplanversionvalid', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummary(data?:newsummarydetails){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/newsummarydetails', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function govthree(data?:govthreeing){ |
|||
return request({ |
|||
url:'hrapi/org/govthreeing', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getonedetailedtarget(data?:getonedetailed){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getonedetailedtarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getcompany(data?:getcompanydeparment){ |
|||
return request({ |
|||
url:'hrapi/org/getcompanydeparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_details(data?:edit_details_state){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_state', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getsontarget(data?:getsontargetcont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getsontargetcont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function table_add(data?:table_add_detailses){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/table_add_detailses', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_table(data?:edit_table_depart_man){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_table_depart_man', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function delsontar(data?:delsontarget){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/delsontarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getdetailscont(data?:getdetail){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getdetailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_detail(data?:edit_details_cont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getnew_target(data?:getnew_target_depart_postman){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getnew_target_depart_postman', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_post(data?:edit_post_detailscont){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_post_detailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function eidtposttardetail(data?:eidtposttardetailsstrte){ |
|||
return request({ |
|||
url:'kpiapi/postpc/eidtposttardetailsstrte', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function addtabledetail(data?:addtabledetailslist){ |
|||
return request({ |
|||
url:'kpiapi/postpc/addtabledetailslist', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_newson(data?:edit_newson_target){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_newson_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function del_son(data?:del_son_tar){ |
|||
return request({ |
|||
url:'kpiapi/postpc/del_son_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function look_scheme(data?:look_scheme_for_deparment){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/look_scheme_for_deparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function get_organdpost(data?:get_organdpost_three){ |
|||
return request({ |
|||
url:'hrapi/org/get_organdpost_three', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummaryas(data?:get_organdpost_three){ |
|||
return request({ |
|||
url:'hrapi/org/newsummary', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
@ -0,0 +1,156 @@ |
|||
import request from '@/utils/request'; |
|||
import { addtabledetailslist, delsontarget, del_son_tar, edit_details_cont, edit_details_state, edit_newson_target, edit_post_detailscont, edit_table_depart_man, eidtposttardetailsstrte, getcompanydeparment, getdetail, getnew_target_depart_postman, getonedetailed, getplanversionvalid, getsontargetcont, get_organdpost_three, govthreeing, look_scheme_for_deparment, newsummarydetails, orgtrant, table_add_detailses } from './type'; |
|||
export function orgtranscript(data?:orgtrant){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/orgtranscript', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getplanvers(data?:getplanversionvalid){ |
|||
return request({ |
|||
url:'api/ststic/getplanversionvalid', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummary(data?:newsummarydetails){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/newsummarydetails', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function govthree(data?:govthreeing){ |
|||
return request({ |
|||
url:'hrapi/org/govthreeing', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getonedetailedtarget(data?:getonedetailed){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getonedetailedtarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getcompany(data?:getcompanydeparment){ |
|||
return request({ |
|||
url:'hrapi/org/getcompanydeparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_details(data?:edit_details_state){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_state', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getsontarget(data?:getsontargetcont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getsontargetcont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function table_add(data?:table_add_detailses){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/table_add_detailses', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_table(data?:edit_table_depart_man){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_table_depart_man', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function delsontar(data?:delsontarget){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/delsontarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getdetailscont(data?:getdetail){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getdetailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_detail(data?:edit_details_cont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getnew_target(data?:getnew_target_depart_postman){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getnew_target_depart_postman', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_post(data?:edit_post_detailscont){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_post_detailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function eidtposttardetail(data?:eidtposttardetailsstrte){ |
|||
return request({ |
|||
url:'kpiapi/postpc/eidtposttardetailsstrte', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function addtabledetail(data?:addtabledetailslist){ |
|||
return request({ |
|||
url:'kpiapi/postpc/addtabledetailslist', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_newson(data?:edit_newson_target){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_newson_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function del_son(data?:del_son_tar){ |
|||
return request({ |
|||
url:'kpiapi/postpc/del_son_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function look_scheme(data?:look_scheme_for_deparment){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/look_scheme_for_deparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function get_organdpost(data?:get_organdpost_three){ |
|||
return request({ |
|||
url:'hrapi/org/get_organdpost_three', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummaryas(data?:get_organdpost_three){ |
|||
return request({ |
|||
url:'api/quant/summarydetailsxinglog', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
@ -0,0 +1,156 @@ |
|||
import request from '@/utils/request'; |
|||
import { addtabledetailslist, delsontarget, del_son_tar, edit_details_cont, edit_details_state, edit_newson_target, edit_post_detailscont, edit_table_depart_man, eidtposttardetailsstrte, getcompanydeparment, getdetail, getnew_target_depart_postman, getonedetailed, getplanversionvalid, getsontargetcont, get_organdpost_three, govthreeing, look_scheme_for_deparment, newsummarydetails, orgtrant, table_add_detailses } from './type'; |
|||
export function orgtranscript(data?:orgtrant){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/orgtranscript', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getplanvers(data?:getplanversionvalid){ |
|||
return request({ |
|||
url:'api/ststic/getplanversionvalid', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummary(data?:newsummarydetails){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/newsummarydetails', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function govthree(data?:govthreeing){ |
|||
return request({ |
|||
url:'hrapi/org/govthreeing', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getonedetailedtarget(data?:getonedetailed){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getonedetailedtarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getcompany(data?:getcompanydeparment){ |
|||
return request({ |
|||
url:'hrapi/org/getcompanydeparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_details(data?:edit_details_state){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_state', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getsontarget(data?:getsontargetcont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getsontargetcont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function table_add(data?:table_add_detailses){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/table_add_detailses', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_table(data?:edit_table_depart_man){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_table_depart_man', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function delsontar(data?:delsontarget){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/delsontarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getdetailscont(data?:getdetail){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getdetailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_detail(data?:edit_details_cont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getnew_target(data?:getnew_target_depart_postman){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getnew_target_depart_postman', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_post(data?:edit_post_detailscont){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_post_detailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function eidtposttardetail(data?:eidtposttardetailsstrte){ |
|||
return request({ |
|||
url:'kpiapi/postpc/eidtposttardetailsstrte', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function addtabledetail(data?:addtabledetailslist){ |
|||
return request({ |
|||
url:'kpiapi/postpc/addtabledetailslist', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_newson(data?:edit_newson_target){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_newson_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function del_son(data?:del_son_tar){ |
|||
return request({ |
|||
url:'kpiapi/postpc/del_son_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function look_scheme(data?:look_scheme_for_deparment){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/look_scheme_for_deparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function get_organdpost(data?:get_organdpost_three){ |
|||
return request({ |
|||
url:'hrapi/org/get_organdpost_three', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummaryas(data?:summarydetailsxinglog){ |
|||
return request({ |
|||
url:'api/quant/summarydetailsxinglog', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
@ -0,0 +1,156 @@ |
|||
import request from '@/utils/request'; |
|||
import { addtabledetailslist, delsontarget, del_son_tar, edit_details_cont, edit_details_state, edit_newson_target, edit_post_detailscont, edit_table_depart_man, eidtposttardetailsstrte, getcompanydeparment, getdetail, getnew_target_depart_postman, getonedetailed, getplanversionvalid, getsontargetcont, get_organdpost_three, govthreeing, look_scheme_for_deparment, newsummarydetails, orgtrant, table_add_detailses } from './type'; |
|||
export function orgtranscript(data?:orgtrant){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/orgtranscript', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getplanvers(data?:getplanversionvalid){ |
|||
return request({ |
|||
url:'api/ststic/getplanversionvalid', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummary(data?:newsummarydetails){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/newsummarydetails', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function govthree(data?:govthreeing){ |
|||
return request({ |
|||
url:'hrapi/org/govthreeing', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getonedetailedtarget(data?:getonedetailed){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getonedetailedtarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getcompany(data?:getcompanydeparment){ |
|||
return request({ |
|||
url:'hrapi/org/getcompanydeparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_details(data?:edit_details_state){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_state', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getsontarget(data?:getsontargetcont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getsontargetcont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function table_add(data?:table_add_detailses){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/table_add_detailses', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_table(data?:edit_table_depart_man){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_table_depart_man', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function delsontar(data?:delsontarget){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/delsontarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getdetailscont(data?:getdetail){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getdetailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_detail(data?:edit_details_cont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getnew_target(data?:getnew_target_depart_postman){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getnew_target_depart_postman', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_post(data?:edit_post_detailscont){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_post_detailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function eidtposttardetail(data?:eidtposttardetailsstrte){ |
|||
return request({ |
|||
url:'kpiapi/postpc/eidtposttardetailsstrte', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function addtabledetail(data?:addtabledetailslist){ |
|||
return request({ |
|||
url:'kpiapi/postpc/addtabledetailslist', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_newson(data?:edit_newson_target){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_newson_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function del_son(data?:del_son_tar){ |
|||
return request({ |
|||
url:'kpiapi/postpc/del_son_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function look_scheme(data?:look_scheme_for_deparment){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/look_scheme_for_deparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function get_organdpost(data?:get_organdpost_three){ |
|||
return request({ |
|||
url:'hrapi/org/get_organdpost_three', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummaryas(data?:summarydetail){ |
|||
return request({ |
|||
url:'api/quant/summarydetailsxinglog', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
@ -0,0 +1,156 @@ |
|||
import request from '@/utils/request'; |
|||
import { addtabledetailslist, delsontarget, del_son_tar, edit_details_cont, edit_details_state, edit_newson_target, edit_post_detailscont, edit_table_depart_man, eidtposttardetailsstrte, getcompanydeparment, getdetail, getnew_target_depart_postman, getonedetailed, getplanversionvalid, getsontargetcont, get_organdpost_three, govthreeing, look_scheme_for_deparment, newsummarydetails, orgtrant, summarydetail, table_add_detailses } from './type'; |
|||
export function orgtranscript(data?:orgtrant){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/orgtranscript', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getplanvers(data?:getplanversionvalid){ |
|||
return request({ |
|||
url:'api/ststic/getplanversionvalid', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummary(data?:newsummarydetails){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/newsummarydetails', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function govthree(data?:govthreeing){ |
|||
return request({ |
|||
url:'hrapi/org/govthreeing', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getonedetailedtarget(data?:getonedetailed){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getonedetailedtarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getcompany(data?:getcompanydeparment){ |
|||
return request({ |
|||
url:'hrapi/org/getcompanydeparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_details(data?:edit_details_state){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_state', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getsontarget(data?:getsontargetcont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getsontargetcont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function table_add(data?:table_add_detailses){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/table_add_detailses', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_table(data?:edit_table_depart_man){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_table_depart_man', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function delsontar(data?:delsontarget){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/delsontarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getdetailscont(data?:getdetail){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getdetailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_detail(data?:edit_details_cont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getnew_target(data?:getnew_target_depart_postman){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getnew_target_depart_postman', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_post(data?:edit_post_detailscont){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_post_detailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function eidtposttardetail(data?:eidtposttardetailsstrte){ |
|||
return request({ |
|||
url:'kpiapi/postpc/eidtposttardetailsstrte', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function addtabledetail(data?:addtabledetailslist){ |
|||
return request({ |
|||
url:'kpiapi/postpc/addtabledetailslist', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_newson(data?:edit_newson_target){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_newson_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function del_son(data?:del_son_tar){ |
|||
return request({ |
|||
url:'kpiapi/postpc/del_son_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function look_scheme(data?:look_scheme_for_deparment){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/look_scheme_for_deparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function get_organdpost(data?:get_organdpost_three){ |
|||
return request({ |
|||
url:'hrapi/org/get_organdpost_three', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummaryas(data?:summarydetail){ |
|||
return request({ |
|||
url:'api/quant/summarydetailsxinglog', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
@ -0,0 +1,157 @@ |
|||
import request from '@/utils/request'; |
|||
import { addtabledetailslist, delsontarget, del_son_tar, edit_details_cont, edit_details_state, edit_newson_target, edit_post_detailscont, edit_table_depart_man, eidtposttardetailsstrte, getcompanydeparment, getdetail, getnew_target_depart_postman, getonedetailed, getplanversionvalid, getsontargetcont, get_organdpost_three, govthreeing, look_scheme_for_deparment, newsummarydetails, orgtrant, summarydetail, table_add_detailses } from './type'; |
|||
export function orgtranscript(data?:orgtrant){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/orgtranscript', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getplanvers(data?:getplanversionvalid){ |
|||
return request({ |
|||
url:'api/ststic/getplanversionvalid', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummary(data?:newsummarydetails){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/newsummarydetails', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function govthree(data?:govthreeing){ |
|||
return request({ |
|||
url:'hrapi/org/govthreeing', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getonedetailedtarget(data?:getonedetailed){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getonedetailedtarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getcompany(data?:getcompanydeparment){ |
|||
return request({ |
|||
url:'hrapi/org/getcompanydeparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_details(data?:edit_details_state){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_state', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getsontarget(data?:getsontargetcont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getsontargetcont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function table_add(data?:table_add_detailses){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/table_add_detailses', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_table(data?:edit_table_depart_man){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_table_depart_man', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function delsontar(data?:delsontarget){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/delsontarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getdetailscont(data?:getdetail){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getdetailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_detail(data?:edit_details_cont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getnew_target(data?:getnew_target_depart_postman){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getnew_target_depart_postman', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_post(data?:edit_post_detailscont){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_post_detailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function eidtposttardetail(data?:eidtposttardetailsstrte){ |
|||
return request({ |
|||
url:'kpiapi/postpc/eidtposttardetailsstrte', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function addtabledetail(data?:addtabledetailslist){ |
|||
return request({ |
|||
url:'kpiapi/postpc/addtabledetailslist', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_newson(data?:edit_newson_target){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_newson_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function del_son(data?:del_son_tar){ |
|||
return request({ |
|||
url:'kpiapi/postpc/del_son_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function look_scheme(data?:look_scheme_for_deparment){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/look_scheme_for_deparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function get_organdpost(data?:get_organdpost_three){ |
|||
return request({ |
|||
url:'hrapi/org/get_organdpost_three', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummaryas(data?:summarydetail){ |
|||
return request({ |
|||
url:'api/quant/summarydetailsxinglog', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
summaryplanrecord |
|||
@ -0,0 +1,164 @@ |
|||
import request from '@/utils/request'; |
|||
import { addtabledetailslist, delsontarget, del_son_tar, edit_details_cont, edit_details_state, edit_newson_target, edit_post_detailscont, edit_table_depart_man, eidtposttardetailsstrte, getcompanydeparment, getdetail, getnew_target_depart_postman, getonedetailed, getplanversionvalid, getsontargetcont, get_organdpost_three, govthreeing, look_scheme_for_deparment, newsummarydetails, orgtrant, summarydetail, table_add_detailses } from './type'; |
|||
export function orgtranscript(data?:orgtrant){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/orgtranscript', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getplanvers(data?:getplanversionvalid){ |
|||
return request({ |
|||
url:'api/ststic/getplanversionvalid', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummary(data?:newsummarydetails){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/newsummarydetails', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function govthree(data?:govthreeing){ |
|||
return request({ |
|||
url:'hrapi/org/govthreeing', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getonedetailedtarget(data?:getonedetailed){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getonedetailedtarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getcompany(data?:getcompanydeparment){ |
|||
return request({ |
|||
url:'hrapi/org/getcompanydeparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_details(data?:edit_details_state){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_state', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getsontarget(data?:getsontargetcont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getsontargetcont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function table_add(data?:table_add_detailses){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/table_add_detailses', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_table(data?:edit_table_depart_man){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_table_depart_man', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function delsontar(data?:delsontarget){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/delsontarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getdetailscont(data?:getdetail){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getdetailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_detail(data?:edit_details_cont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getnew_target(data?:getnew_target_depart_postman){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getnew_target_depart_postman', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_post(data?:edit_post_detailscont){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_post_detailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function eidtposttardetail(data?:eidtposttardetailsstrte){ |
|||
return request({ |
|||
url:'kpiapi/postpc/eidtposttardetailsstrte', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function addtabledetail(data?:addtabledetailslist){ |
|||
return request({ |
|||
url:'kpiapi/postpc/addtabledetailslist', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_newson(data?:edit_newson_target){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_newson_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function del_son(data?:del_son_tar){ |
|||
return request({ |
|||
url:'kpiapi/postpc/del_son_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function look_scheme(data?:look_scheme_for_deparment){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/look_scheme_for_deparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function get_organdpost(data?:get_organdpost_three){ |
|||
return request({ |
|||
url:'hrapi/org/get_organdpost_three', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummaryas(data?:summarydetail){ |
|||
return request({ |
|||
url:'api/quant/summarydetailsxinglog', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummaryas(data?:summarydetail){ |
|||
return request({ |
|||
url:'api/quant/summarydetailsxinglog', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
|
|||
@ -0,0 +1,164 @@ |
|||
import request from '@/utils/request'; |
|||
import { addtabledetailslist, delsontarget, del_son_tar, edit_details_cont, edit_details_state, edit_newson_target, edit_post_detailscont, edit_table_depart_man, eidtposttardetailsstrte, getcompanydeparment, getdetail, getnew_target_depart_postman, getonedetailed, getplanversionvalid, getsontargetcont, get_organdpost_three, govthreeing, look_scheme_for_deparment, newsummarydetails, orgtrant, summarydetail, table_add_detailses } from './type'; |
|||
export function orgtranscript(data?:orgtrant){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/orgtranscript', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getplanvers(data?:getplanversionvalid){ |
|||
return request({ |
|||
url:'api/ststic/getplanversionvalid', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummary(data?:newsummarydetails){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/newsummarydetails', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function govthree(data?:govthreeing){ |
|||
return request({ |
|||
url:'hrapi/org/govthreeing', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getonedetailedtarget(data?:getonedetailed){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getonedetailedtarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getcompany(data?:getcompanydeparment){ |
|||
return request({ |
|||
url:'hrapi/org/getcompanydeparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_details(data?:edit_details_state){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_state', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getsontarget(data?:getsontargetcont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getsontargetcont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function table_add(data?:table_add_detailses){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/table_add_detailses', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_table(data?:edit_table_depart_man){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_table_depart_man', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function delsontar(data?:delsontarget){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/delsontarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getdetailscont(data?:getdetail){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getdetailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_detail(data?:edit_details_cont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getnew_target(data?:getnew_target_depart_postman){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getnew_target_depart_postman', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_post(data?:edit_post_detailscont){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_post_detailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function eidtposttardetail(data?:eidtposttardetailsstrte){ |
|||
return request({ |
|||
url:'kpiapi/postpc/eidtposttardetailsstrte', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function addtabledetail(data?:addtabledetailslist){ |
|||
return request({ |
|||
url:'kpiapi/postpc/addtabledetailslist', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_newson(data?:edit_newson_target){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_newson_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function del_son(data?:del_son_tar){ |
|||
return request({ |
|||
url:'kpiapi/postpc/del_son_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function look_scheme(data?:look_scheme_for_deparment){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/look_scheme_for_deparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function get_organdpost(data?:get_organdpost_three){ |
|||
return request({ |
|||
url:'hrapi/org/get_organdpost_three', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummaryas(data?:summarydetail){ |
|||
return request({ |
|||
url:'api/quant/summarydetailsxinglog', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
summaryplanrecord |
|||
export function newsummaryas(data?:summarydetail){ |
|||
return request({ |
|||
url:'api/quant/summarydetailsxinglog', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
@ -0,0 +1,163 @@ |
|||
import request from '@/utils/request'; |
|||
import { addtabledetailslist, delsontarget, del_son_tar, edit_details_cont, edit_details_state, edit_newson_target, edit_post_detailscont, edit_table_depart_man, eidtposttardetailsstrte, getcompanydeparment, getdetail, getnew_target_depart_postman, getonedetailed, getplanversionvalid, getsontargetcont, get_organdpost_three, govthreeing, look_scheme_for_deparment, newsummarydetails, orgtrant, summarydetail, table_add_detailses } from './type'; |
|||
export function orgtranscript(data?:orgtrant){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/orgtranscript', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getplanvers(data?:getplanversionvalid){ |
|||
return request({ |
|||
url:'api/ststic/getplanversionvalid', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummary(data?:newsummarydetails){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/newsummarydetails', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function govthree(data?:govthreeing){ |
|||
return request({ |
|||
url:'hrapi/org/govthreeing', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getonedetailedtarget(data?:getonedetailed){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getonedetailedtarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getcompany(data?:getcompanydeparment){ |
|||
return request({ |
|||
url:'hrapi/org/getcompanydeparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_details(data?:edit_details_state){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_state', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getsontarget(data?:getsontargetcont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getsontargetcont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function table_add(data?:table_add_detailses){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/table_add_detailses', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_table(data?:edit_table_depart_man){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_table_depart_man', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function delsontar(data?:delsontarget){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/delsontarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getdetailscont(data?:getdetail){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getdetailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_detail(data?:edit_details_cont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getnew_target(data?:getnew_target_depart_postman){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getnew_target_depart_postman', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_post(data?:edit_post_detailscont){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_post_detailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function eidtposttardetail(data?:eidtposttardetailsstrte){ |
|||
return request({ |
|||
url:'kpiapi/postpc/eidtposttardetailsstrte', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function addtabledetail(data?:addtabledetailslist){ |
|||
return request({ |
|||
url:'kpiapi/postpc/addtabledetailslist', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_newson(data?:edit_newson_target){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_newson_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function del_son(data?:del_son_tar){ |
|||
return request({ |
|||
url:'kpiapi/postpc/del_son_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function look_scheme(data?:look_scheme_for_deparment){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/look_scheme_for_deparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function get_organdpost(data?:get_organdpost_three){ |
|||
return request({ |
|||
url:'hrapi/org/get_organdpost_three', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummaryas(data?:summarydetail){ |
|||
return request({ |
|||
url:'api/quant/summarydetailsxinglog', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummaryas(data?:summarydetail){ |
|||
return request({ |
|||
url:'api/quant/summarydetailsxinglog', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
@ -0,0 +1,163 @@ |
|||
import request from '@/utils/request'; |
|||
import { addtabledetailslist, delsontarget, del_son_tar, edit_details_cont, edit_details_state, edit_newson_target, edit_post_detailscont, edit_table_depart_man, eidtposttardetailsstrte, getcompanydeparment, getdetail, getnew_target_depart_postman, getonedetailed, getplanversionvalid, getsontargetcont, get_organdpost_three, govthreeing, look_scheme_for_deparment, newsummarydetails, orgtrant, summarydetail, table_add_detailses } from './type'; |
|||
export function orgtranscript(data?:orgtrant){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/orgtranscript', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getplanvers(data?:getplanversionvalid){ |
|||
return request({ |
|||
url:'api/ststic/getplanversionvalid', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummary(data?:newsummarydetails){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/newsummarydetails', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function govthree(data?:govthreeing){ |
|||
return request({ |
|||
url:'hrapi/org/govthreeing', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getonedetailedtarget(data?:getonedetailed){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getonedetailedtarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getcompany(data?:getcompanydeparment){ |
|||
return request({ |
|||
url:'hrapi/org/getcompanydeparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_details(data?:edit_details_state){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_state', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getsontarget(data?:getsontargetcont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getsontargetcont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function table_add(data?:table_add_detailses){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/table_add_detailses', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_table(data?:edit_table_depart_man){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_table_depart_man', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function delsontar(data?:delsontarget){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/delsontarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getdetailscont(data?:getdetail){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getdetailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_detail(data?:edit_details_cont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getnew_target(data?:getnew_target_depart_postman){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getnew_target_depart_postman', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_post(data?:edit_post_detailscont){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_post_detailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function eidtposttardetail(data?:eidtposttardetailsstrte){ |
|||
return request({ |
|||
url:'kpiapi/postpc/eidtposttardetailsstrte', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function addtabledetail(data?:addtabledetailslist){ |
|||
return request({ |
|||
url:'kpiapi/postpc/addtabledetailslist', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_newson(data?:edit_newson_target){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_newson_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function del_son(data?:del_son_tar){ |
|||
return request({ |
|||
url:'kpiapi/postpc/del_son_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function look_scheme(data?:look_scheme_for_deparment){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/look_scheme_for_deparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function get_organdpost(data?:get_organdpost_three){ |
|||
return request({ |
|||
url:'hrapi/org/get_organdpost_three', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummaryas(data?:summarydetail){ |
|||
return request({ |
|||
url:'api/quant/summarydetailsxinglog', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function summaryplanreco(data?:summarydetail){ |
|||
return request({ |
|||
url:'api/quant/summaryplanrecord', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
@ -0,0 +1,163 @@ |
|||
import request from '@/utils/request'; |
|||
import { addtabledetailslist, delsontarget, del_son_tar, edit_details_cont, edit_details_state, edit_newson_target, edit_post_detailscont, edit_table_depart_man, eidtposttardetailsstrte, getcompanydeparment, getdetail, getnew_target_depart_postman, getonedetailed, getplanversionvalid, getsontargetcont, get_organdpost_three, govthreeing, look_scheme_for_deparment, newsummarydetails, orgtrant, summarydetail, table_add_detailses } from './type'; |
|||
export function orgtranscript(data?:orgtrant){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/orgtranscript', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getplanvers(data?:getplanversionvalid){ |
|||
return request({ |
|||
url:'api/ststic/getplanversionvalid', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummary(data?:newsummarydetails){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/newsummarydetails', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function govthree(data?:govthreeing){ |
|||
return request({ |
|||
url:'hrapi/org/govthreeing', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getonedetailedtarget(data?:getonedetailed){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getonedetailedtarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getcompany(data?:getcompanydeparment){ |
|||
return request({ |
|||
url:'hrapi/org/getcompanydeparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_details(data?:edit_details_state){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_state', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getsontarget(data?:getsontargetcont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getsontargetcont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function table_add(data?:table_add_detailses){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/table_add_detailses', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_table(data?:edit_table_depart_man){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_table_depart_man', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function delsontar(data?:delsontarget){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/delsontarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getdetailscont(data?:getdetail){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getdetailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_detail(data?:edit_details_cont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getnew_target(data?:getnew_target_depart_postman){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getnew_target_depart_postman', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_post(data?:edit_post_detailscont){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_post_detailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function eidtposttardetail(data?:eidtposttardetailsstrte){ |
|||
return request({ |
|||
url:'kpiapi/postpc/eidtposttardetailsstrte', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function addtabledetail(data?:addtabledetailslist){ |
|||
return request({ |
|||
url:'kpiapi/postpc/addtabledetailslist', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_newson(data?:edit_newson_target){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_newson_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function del_son(data?:del_son_tar){ |
|||
return request({ |
|||
url:'kpiapi/postpc/del_son_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function look_scheme(data?:look_scheme_for_deparment){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/look_scheme_for_deparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function get_organdpost(data?:get_organdpost_three){ |
|||
return request({ |
|||
url:'hrapi/org/get_organdpost_three', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummaryas(data?:summarydetail){ |
|||
return request({ |
|||
url:'api/quant/summarydetailsxinglog', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function summaryplanre(data?:summarydetail){ |
|||
return request({ |
|||
url:'api/quant/summaryplanrecord', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
@ -0,0 +1,163 @@ |
|||
import request from '@/utils/request'; |
|||
import { addtabledetailslist, delsontarget, del_son_tar, edit_details_cont, edit_details_state, edit_newson_target, edit_post_detailscont, edit_table_depart_man, eidtposttardetailsstrte, getcompanydeparment, getdetail, getnew_target_depart_postman, getonedetailed, getplanversionvalid, getsontargetcont, get_organdpost_three, govthreeing, look_scheme_for_deparment, newsummarydetails, orgtrant, summarydetail, table_add_detailses } from './type'; |
|||
export function orgtranscript(data?:orgtrant){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/orgtranscript', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getplanvers(data?:getplanversionvalid){ |
|||
return request({ |
|||
url:'api/ststic/getplanversionvalid', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummary(data?:newsummarydetails){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/newsummarydetails', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function govthree(data?:govthreeing){ |
|||
return request({ |
|||
url:'hrapi/org/govthreeing', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getonedetailedtarget(data?:getonedetailed){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getonedetailedtarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getcompany(data?:getcompanydeparment){ |
|||
return request({ |
|||
url:'hrapi/org/getcompanydeparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_details(data?:edit_details_state){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_state', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getsontarget(data?:getsontargetcont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getsontargetcont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function table_add(data?:table_add_detailses){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/table_add_detailses', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_table(data?:edit_table_depart_man){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_table_depart_man', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function delsontar(data?:delsontarget){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/delsontarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getdetailscont(data?:getdetail){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getdetailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_detail(data?:edit_details_cont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getnew_target(data?:getnew_target_depart_postman){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getnew_target_depart_postman', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_post(data?:edit_post_detailscont){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_post_detailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function eidtposttardetail(data?:eidtposttardetailsstrte){ |
|||
return request({ |
|||
url:'kpiapi/postpc/eidtposttardetailsstrte', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function addtabledetail(data?:addtabledetailslist){ |
|||
return request({ |
|||
url:'kpiapi/postpc/addtabledetailslist', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_newson(data?:edit_newson_target){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_newson_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function del_son(data?:del_son_tar){ |
|||
return request({ |
|||
url:'kpiapi/postpc/del_son_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function look_scheme(data?:look_scheme_for_deparment){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/look_scheme_for_deparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function get_organdpost(data?:get_organdpost_three){ |
|||
return request({ |
|||
url:'hrapi/org/get_organdpost_three', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummaryas(data?:summarydetail){ |
|||
return request({ |
|||
url:'api/quant/summarydetailsxinglog', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function summaryplanre(data?:summaryplanrecord){ |
|||
return request({ |
|||
url:'api/quant/summaryplanrecord', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
@ -0,0 +1,163 @@ |
|||
import request from '@/utils/request'; |
|||
import { addtabledetailslist, delsontarget, del_son_tar, edit_details_cont, edit_details_state, edit_newson_target, edit_post_detailscont, edit_table_depart_man, eidtposttardetailsstrte, getcompanydeparment, getdetail, getnew_target_depart_postman, getonedetailed, getplanversionvalid, getsontargetcont, get_organdpost_three, govthreeing, look_scheme_for_deparment, newsummarydetails, orgtrant, summarydetail, summaryplanrecord, table_add_detailses } from './type'; |
|||
export function orgtranscript(data?:orgtrant){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/orgtranscript', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getplanvers(data?:getplanversionvalid){ |
|||
return request({ |
|||
url:'api/ststic/getplanversionvalid', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummary(data?:newsummarydetails){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/newsummarydetails', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function govthree(data?:govthreeing){ |
|||
return request({ |
|||
url:'hrapi/org/govthreeing', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getonedetailedtarget(data?:getonedetailed){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getonedetailedtarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getcompany(data?:getcompanydeparment){ |
|||
return request({ |
|||
url:'hrapi/org/getcompanydeparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_details(data?:edit_details_state){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_state', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getsontarget(data?:getsontargetcont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getsontargetcont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function table_add(data?:table_add_detailses){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/table_add_detailses', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_table(data?:edit_table_depart_man){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_table_depart_man', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function delsontar(data?:delsontarget){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/delsontarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getdetailscont(data?:getdetail){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getdetailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_detail(data?:edit_details_cont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getnew_target(data?:getnew_target_depart_postman){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getnew_target_depart_postman', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_post(data?:edit_post_detailscont){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_post_detailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function eidtposttardetail(data?:eidtposttardetailsstrte){ |
|||
return request({ |
|||
url:'kpiapi/postpc/eidtposttardetailsstrte', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function addtabledetail(data?:addtabledetailslist){ |
|||
return request({ |
|||
url:'kpiapi/postpc/addtabledetailslist', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_newson(data?:edit_newson_target){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_newson_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function del_son(data?:del_son_tar){ |
|||
return request({ |
|||
url:'kpiapi/postpc/del_son_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function look_scheme(data?:look_scheme_for_deparment){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/look_scheme_for_deparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function get_organdpost(data?:get_organdpost_three){ |
|||
return request({ |
|||
url:'hrapi/org/get_organdpost_three', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummaryas(data?:summarydetail){ |
|||
return request({ |
|||
url:'api/quant/summarydetailsxinglog', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function summaryplanre(data?:summaryplanrecord){ |
|||
return request({ |
|||
url:'api/quant/summaryplanrecord', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
@ -0,0 +1,163 @@ |
|||
import request from '@/utils/request'; |
|||
import { addtabledetailslist, delsontarget, del_son_tar, edit_details_cont, edit_details_state, edit_newson_target, edit_post_detailscont, edit_table_depart_man, eidtposttardetailsstrte, getcompanydeparment, getdetail, getnew_target_depart_postman, getonedetailed, getplanversionvalid, getsontargetcont, get_organdpost_three, govthreeing, look_scheme_for_deparment, newsummarydetails, orgtrant, summarydetail, summaryplanrecord, table_add_detailses } from './type'; |
|||
export function orgtranscript(data?:orgtrant){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/orgtranscript', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getplanvers(data?:getplanversionvalid){ |
|||
return request({ |
|||
url:'api/ststic/getplanversionvalid', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummary(data?:newsummarydetails){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/newsummarydetails', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function govthree(data?:govthreeing){ |
|||
return request({ |
|||
url:'hrapi/org/govthreeing', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getonedetailedtarget(data?:getonedetailed){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getonedetailedtarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getcompany(data?:getcompanydeparment){ |
|||
return request({ |
|||
url:'hrapi/org/getcompanydeparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_details(data?:edit_details_state){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_state', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getsontarget(data?:getsontargetcont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getsontargetcont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function table_add(data?:table_add_detailses){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/table_add_detailses', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_table(data?:edit_table_depart_man){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_table_depart_man', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function delsontar(data?:delsontarget){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/delsontarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getdetailscont(data?:getdetail){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getdetailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_detail(data?:edit_details_cont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getnew_target(data?:getnew_target_depart_postman){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getnew_target_depart_postman', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_post(data?:edit_post_detailscont){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_post_detailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function eidtposttardetail(data?:eidtposttardetailsstrte){ |
|||
return request({ |
|||
url:'kpiapi/postpc/eidtposttardetailsstrte', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function addtabledetail(data?:addtabledetailslist){ |
|||
return request({ |
|||
url:'kpiapi/postpc/addtabledetailslist', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_newson(data?:edit_newson_target){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_newson_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function del_son(data?:del_son_tar){ |
|||
return request({ |
|||
url:'kpiapi/postpc/del_son_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function look_scheme(data?:look_scheme_for_deparment){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/look_scheme_for_deparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function get_organdpost(data?:get_organdpost_three){ |
|||
return request({ |
|||
url:'hrapi/org/get_organdpost_three', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummaryas(data?:summarydetail){ |
|||
return request({ |
|||
url:'api/quant/summarydetailsxinglog', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function summaryplanre(data?:summaryplanrecord){ |
|||
return request({ |
|||
url:'kpiapi/quant/summaryplanrecord', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
@ -0,0 +1,163 @@ |
|||
import request from '@/utils/request'; |
|||
import { addtabledetailslist, delsontarget, del_son_tar, edit_details_cont, edit_details_state, edit_newson_target, edit_post_detailscont, edit_table_depart_man, eidtposttardetailsstrte, getcompanydeparment, getdetail, getnew_target_depart_postman, getonedetailed, getplanversionvalid, getsontargetcont, get_organdpost_three, govthreeing, look_scheme_for_deparment, newsummarydetails, orgtrant, summarydetail, summaryplanrecord, table_add_detailses } from './type'; |
|||
export function orgtranscript(data?:orgtrant){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/orgtranscript', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getplanvers(data?:getplanversionvalid){ |
|||
return request({ |
|||
url:'api/ststic/getplanversionvalid', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummary(data?:newsummarydetails){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/newsummarydetails', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function govthree(data?:govthreeing){ |
|||
return request({ |
|||
url:'hrapi/org/govthreeing', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getonedetailedtarget(data?:getonedetailed){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getonedetailedtarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getcompany(data?:getcompanydeparment){ |
|||
return request({ |
|||
url:'hrapi/org/getcompanydeparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_details(data?:edit_details_state){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_state', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getsontarget(data?:getsontargetcont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/getsontargetcont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function table_add(data?:table_add_detailses){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/table_add_detailses', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_table(data?:edit_table_depart_man){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_table_depart_man', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function delsontar(data?:delsontarget){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/delsontarget', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getdetailscont(data?:getdetail){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getdetailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_detail(data?:edit_details_cont){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/edit_details_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function getnew_target(data?:getnew_target_depart_postman){ |
|||
return request({ |
|||
url:'kpiapi/postpc/getnew_target_depart_postman', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_post(data?:edit_post_detailscont){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_post_detailscont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function eidtposttardetail(data?:eidtposttardetailsstrte){ |
|||
return request({ |
|||
url:'kpiapi/postpc/eidtposttardetailsstrte', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function addtabledetail(data?:addtabledetailslist){ |
|||
return request({ |
|||
url:'kpiapi/postpc/addtabledetailslist', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function edit_newson(data?:edit_newson_target){ |
|||
return request({ |
|||
url:'kpiapi/postpc/edit_newson_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function del_son(data?:del_son_tar){ |
|||
return request({ |
|||
url:'kpiapi/postpc/del_son_target_cont', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function look_scheme(data?:look_scheme_for_deparment){ |
|||
return request({ |
|||
url:'kpiapi/department_pc/look_scheme_for_deparment', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function get_organdpost(data?:get_organdpost_three){ |
|||
return request({ |
|||
url:'hrapi/org/get_organdpost_three', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function newsummaryas(data?:summarydetail){ |
|||
return request({ |
|||
url:'api/quant/summarydetailsxinglog', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
export function summaryplanre(data?:summaryplanrecord){ |
|||
return request({ |
|||
url:'kpiapi/strtistics/summaryplanrecord', |
|||
method:'post', |
|||
data:data |
|||
}) |
|||
} |
|||
@ -0,0 +1,115 @@ |
|||
export interface orgtrant{ |
|||
year?:string; |
|||
} |
|||
export interface getplanversionvalid{ |
|||
group: string; |
|||
deaprtid: string; |
|||
year:string; |
|||
class: string; |
|||
title:string; |
|||
} |
|||
export interface newsummarydetails{ |
|||
department:string; |
|||
year: number, |
|||
month: number; |
|||
} |
|||
export interface govthreeing{ |
|||
all: number, |
|||
id: number; |
|||
} |
|||
export interface getonedetailed{ |
|||
id: number; |
|||
} |
|||
export interface getcompanydeparment{ |
|||
id: number; |
|||
idstr: number; |
|||
} |
|||
export interface edit_details_state{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getsontargetcont{ |
|||
id: string; |
|||
} |
|||
export interface table_add_detailses{ |
|||
targetid: string; |
|||
tableid:string; |
|||
detailslist:Array<any>; |
|||
} |
|||
|
|||
export interface edit_table_depart_man{ |
|||
id: string; |
|||
title:string; |
|||
departmentint:Array<any>; |
|||
userlist:Array<any>; |
|||
} |
|||
export interface delsontarget{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getdetail{ |
|||
id: string; |
|||
} |
|||
export interface edit_details_cont{ |
|||
cycle:number; |
|||
department:Array<any>; |
|||
evidence:string; |
|||
executor:Array<any>; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any>; |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface getnew_target_depart_postman{ |
|||
id: string; |
|||
} |
|||
export interface edit_post_detailscont{ |
|||
cashstandard:string; |
|||
cycle:number; |
|||
evidence:string; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any> |
|||
punishtype:number; |
|||
relevantpostsman:Array<any> |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface eidtposttardetailsstrte{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface addtabledetailslist{ |
|||
detailslist:Array<any>; |
|||
tableid:string; |
|||
targetid:string; |
|||
} |
|||
export interface edit_newson_target{ |
|||
repostlist:Array<any>; |
|||
title:string; |
|||
id:string; |
|||
} |
|||
export interface del_son_tar{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface look_scheme_for_deparment{ |
|||
id: string; |
|||
} |
|||
export interface get_organdpost_three{ |
|||
id: string; |
|||
all:number; |
|||
levelL:number; |
|||
} |
|||
summarydetail |
|||
@ -0,0 +1,120 @@ |
|||
export interface orgtrant{ |
|||
year?:string; |
|||
} |
|||
export interface getplanversionvalid{ |
|||
group: string; |
|||
deaprtid: string; |
|||
year:string; |
|||
class: string; |
|||
title:string; |
|||
} |
|||
export interface newsummarydetails{ |
|||
department:string; |
|||
year: number, |
|||
month: number; |
|||
} |
|||
export interface govthreeing{ |
|||
all: number, |
|||
id: number; |
|||
} |
|||
export interface getonedetailed{ |
|||
id: number; |
|||
} |
|||
export interface getcompanydeparment{ |
|||
id: number; |
|||
idstr: number; |
|||
} |
|||
export interface edit_details_state{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getsontargetcont{ |
|||
id: string; |
|||
} |
|||
export interface table_add_detailses{ |
|||
targetid: string; |
|||
tableid:string; |
|||
detailslist:Array<any>; |
|||
} |
|||
|
|||
export interface edit_table_depart_man{ |
|||
id: string; |
|||
title:string; |
|||
departmentint:Array<any>; |
|||
userlist:Array<any>; |
|||
} |
|||
export interface delsontarget{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getdetail{ |
|||
id: string; |
|||
} |
|||
export interface edit_details_cont{ |
|||
cycle:number; |
|||
department:Array<any>; |
|||
evidence:string; |
|||
executor:Array<any>; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any>; |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface getnew_target_depart_postman{ |
|||
id: string; |
|||
} |
|||
export interface edit_post_detailscont{ |
|||
cashstandard:string; |
|||
cycle:number; |
|||
evidence:string; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any> |
|||
punishtype:number; |
|||
relevantpostsman:Array<any> |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface eidtposttardetailsstrte{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface addtabledetailslist{ |
|||
detailslist:Array<any>; |
|||
tableid:string; |
|||
targetid:string; |
|||
} |
|||
export interface edit_newson_target{ |
|||
repostlist:Array<any>; |
|||
title:string; |
|||
id:string; |
|||
} |
|||
export interface del_son_tar{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface look_scheme_for_deparment{ |
|||
id: string; |
|||
} |
|||
export interface get_organdpost_three{ |
|||
id: string; |
|||
all:number; |
|||
levelL:number; |
|||
} |
|||
summarydetail |
|||
export interface get_organdpost_three{ |
|||
id: string; |
|||
all:number; |
|||
levelL:number; |
|||
} |
|||
@ -0,0 +1,119 @@ |
|||
export interface orgtrant{ |
|||
year?:string; |
|||
} |
|||
export interface getplanversionvalid{ |
|||
group: string; |
|||
deaprtid: string; |
|||
year:string; |
|||
class: string; |
|||
title:string; |
|||
} |
|||
export interface newsummarydetails{ |
|||
department:string; |
|||
year: number, |
|||
month: number; |
|||
} |
|||
export interface govthreeing{ |
|||
all: number, |
|||
id: number; |
|||
} |
|||
export interface getonedetailed{ |
|||
id: number; |
|||
} |
|||
export interface getcompanydeparment{ |
|||
id: number; |
|||
idstr: number; |
|||
} |
|||
export interface edit_details_state{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getsontargetcont{ |
|||
id: string; |
|||
} |
|||
export interface table_add_detailses{ |
|||
targetid: string; |
|||
tableid:string; |
|||
detailslist:Array<any>; |
|||
} |
|||
|
|||
export interface edit_table_depart_man{ |
|||
id: string; |
|||
title:string; |
|||
departmentint:Array<any>; |
|||
userlist:Array<any>; |
|||
} |
|||
export interface delsontarget{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getdetail{ |
|||
id: string; |
|||
} |
|||
export interface edit_details_cont{ |
|||
cycle:number; |
|||
department:Array<any>; |
|||
evidence:string; |
|||
executor:Array<any>; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any>; |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface getnew_target_depart_postman{ |
|||
id: string; |
|||
} |
|||
export interface edit_post_detailscont{ |
|||
cashstandard:string; |
|||
cycle:number; |
|||
evidence:string; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any> |
|||
punishtype:number; |
|||
relevantpostsman:Array<any> |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface eidtposttardetailsstrte{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface addtabledetailslist{ |
|||
detailslist:Array<any>; |
|||
tableid:string; |
|||
targetid:string; |
|||
} |
|||
export interface edit_newson_target{ |
|||
repostlist:Array<any>; |
|||
title:string; |
|||
id:string; |
|||
} |
|||
export interface del_son_tar{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface look_scheme_for_deparment{ |
|||
id: string; |
|||
} |
|||
export interface get_organdpost_three{ |
|||
id: string; |
|||
all:number; |
|||
levelL:number; |
|||
} |
|||
export interface get_organdpost_three{ |
|||
id: string; |
|||
all:number; |
|||
levelL:number; |
|||
} |
|||
@ -0,0 +1,119 @@ |
|||
export interface orgtrant{ |
|||
year?:string; |
|||
} |
|||
export interface getplanversionvalid{ |
|||
group: string; |
|||
deaprtid: string; |
|||
year:string; |
|||
class: string; |
|||
title:string; |
|||
} |
|||
export interface newsummarydetails{ |
|||
department:string; |
|||
year: number, |
|||
month: number; |
|||
} |
|||
export interface govthreeing{ |
|||
all: number, |
|||
id: number; |
|||
} |
|||
export interface getonedetailed{ |
|||
id: number; |
|||
} |
|||
export interface getcompanydeparment{ |
|||
id: number; |
|||
idstr: number; |
|||
} |
|||
export interface edit_details_state{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getsontargetcont{ |
|||
id: string; |
|||
} |
|||
export interface table_add_detailses{ |
|||
targetid: string; |
|||
tableid:string; |
|||
detailslist:Array<any>; |
|||
} |
|||
|
|||
export interface edit_table_depart_man{ |
|||
id: string; |
|||
title:string; |
|||
departmentint:Array<any>; |
|||
userlist:Array<any>; |
|||
} |
|||
export interface delsontarget{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getdetail{ |
|||
id: string; |
|||
} |
|||
export interface edit_details_cont{ |
|||
cycle:number; |
|||
department:Array<any>; |
|||
evidence:string; |
|||
executor:Array<any>; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any>; |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface getnew_target_depart_postman{ |
|||
id: string; |
|||
} |
|||
export interface edit_post_detailscont{ |
|||
cashstandard:string; |
|||
cycle:number; |
|||
evidence:string; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any> |
|||
punishtype:number; |
|||
relevantpostsman:Array<any> |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface eidtposttardetailsstrte{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface addtabledetailslist{ |
|||
detailslist:Array<any>; |
|||
tableid:string; |
|||
targetid:string; |
|||
} |
|||
export interface edit_newson_target{ |
|||
repostlist:Array<any>; |
|||
title:string; |
|||
id:string; |
|||
} |
|||
export interface del_son_tar{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface look_scheme_for_deparment{ |
|||
id: string; |
|||
} |
|||
export interface get_organdpost_three{ |
|||
id: string; |
|||
all:number; |
|||
levelL:number; |
|||
} |
|||
export interface summarydetail{ |
|||
id: string; |
|||
all:number; |
|||
levelL:number; |
|||
} |
|||
@ -0,0 +1,119 @@ |
|||
export interface orgtrant{ |
|||
year?:string; |
|||
} |
|||
export interface getplanversionvalid{ |
|||
group: string; |
|||
deaprtid: string; |
|||
year:string; |
|||
class: string; |
|||
title:string; |
|||
} |
|||
export interface newsummarydetails{ |
|||
department:string; |
|||
year: number, |
|||
month: number; |
|||
} |
|||
export interface govthreeing{ |
|||
all: number, |
|||
id: number; |
|||
} |
|||
export interface getonedetailed{ |
|||
id: number; |
|||
} |
|||
export interface getcompanydeparment{ |
|||
id: number; |
|||
idstr: number; |
|||
} |
|||
export interface edit_details_state{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getsontargetcont{ |
|||
id: string; |
|||
} |
|||
export interface table_add_detailses{ |
|||
targetid: string; |
|||
tableid:string; |
|||
detailslist:Array<any>; |
|||
} |
|||
|
|||
export interface edit_table_depart_man{ |
|||
id: string; |
|||
title:string; |
|||
departmentint:Array<any>; |
|||
userlist:Array<any>; |
|||
} |
|||
export interface delsontarget{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getdetail{ |
|||
id: string; |
|||
} |
|||
export interface edit_details_cont{ |
|||
cycle:number; |
|||
department:Array<any>; |
|||
evidence:string; |
|||
executor:Array<any>; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any>; |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface getnew_target_depart_postman{ |
|||
id: string; |
|||
} |
|||
export interface edit_post_detailscont{ |
|||
cashstandard:string; |
|||
cycle:number; |
|||
evidence:string; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any> |
|||
punishtype:number; |
|||
relevantpostsman:Array<any> |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface eidtposttardetailsstrte{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface addtabledetailslist{ |
|||
detailslist:Array<any>; |
|||
tableid:string; |
|||
targetid:string; |
|||
} |
|||
export interface edit_newson_target{ |
|||
repostlist:Array<any>; |
|||
title:string; |
|||
id:string; |
|||
} |
|||
export interface del_son_tar{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface look_scheme_for_deparment{ |
|||
id: string; |
|||
} |
|||
export interface get_organdpost_three{ |
|||
id: string; |
|||
all:number; |
|||
levelL:number; |
|||
} |
|||
export interface summarydetail{ |
|||
department: string; |
|||
all:number; |
|||
levelL:number; |
|||
} |
|||
@ -0,0 +1,119 @@ |
|||
export interface orgtrant{ |
|||
year?:string; |
|||
} |
|||
export interface getplanversionvalid{ |
|||
group: string; |
|||
deaprtid: string; |
|||
year:string; |
|||
class: string; |
|||
title:string; |
|||
} |
|||
export interface newsummarydetails{ |
|||
department:string; |
|||
year: number, |
|||
month: number; |
|||
} |
|||
export interface govthreeing{ |
|||
all: number, |
|||
id: number; |
|||
} |
|||
export interface getonedetailed{ |
|||
id: number; |
|||
} |
|||
export interface getcompanydeparment{ |
|||
id: number; |
|||
idstr: number; |
|||
} |
|||
export interface edit_details_state{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getsontargetcont{ |
|||
id: string; |
|||
} |
|||
export interface table_add_detailses{ |
|||
targetid: string; |
|||
tableid:string; |
|||
detailslist:Array<any>; |
|||
} |
|||
|
|||
export interface edit_table_depart_man{ |
|||
id: string; |
|||
title:string; |
|||
departmentint:Array<any>; |
|||
userlist:Array<any>; |
|||
} |
|||
export interface delsontarget{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getdetail{ |
|||
id: string; |
|||
} |
|||
export interface edit_details_cont{ |
|||
cycle:number; |
|||
department:Array<any>; |
|||
evidence:string; |
|||
executor:Array<any>; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any>; |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface getnew_target_depart_postman{ |
|||
id: string; |
|||
} |
|||
export interface edit_post_detailscont{ |
|||
cashstandard:string; |
|||
cycle:number; |
|||
evidence:string; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any> |
|||
punishtype:number; |
|||
relevantpostsman:Array<any> |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface eidtposttardetailsstrte{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface addtabledetailslist{ |
|||
detailslist:Array<any>; |
|||
tableid:string; |
|||
targetid:string; |
|||
} |
|||
export interface edit_newson_target{ |
|||
repostlist:Array<any>; |
|||
title:string; |
|||
id:string; |
|||
} |
|||
export interface del_son_tar{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface look_scheme_for_deparment{ |
|||
id: string; |
|||
} |
|||
export interface get_organdpost_three{ |
|||
id: string; |
|||
all:number; |
|||
levelL:number; |
|||
} |
|||
export interface summarydetail{ |
|||
department: string; |
|||
month:number; |
|||
levelL:number; |
|||
} |
|||
@ -0,0 +1,120 @@ |
|||
export interface orgtrant{ |
|||
year?:string; |
|||
} |
|||
export interface getplanversionvalid{ |
|||
group: string; |
|||
deaprtid: string; |
|||
year:string; |
|||
class: string; |
|||
title:string; |
|||
} |
|||
export interface newsummarydetails{ |
|||
department:string; |
|||
year: number, |
|||
month: number; |
|||
} |
|||
export interface govthreeing{ |
|||
all: number, |
|||
id: number; |
|||
} |
|||
export interface getonedetailed{ |
|||
id: number; |
|||
} |
|||
export interface getcompanydeparment{ |
|||
id: number; |
|||
idstr: number; |
|||
} |
|||
export interface edit_details_state{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getsontargetcont{ |
|||
id: string; |
|||
} |
|||
export interface table_add_detailses{ |
|||
targetid: string; |
|||
tableid:string; |
|||
detailslist:Array<any>; |
|||
} |
|||
|
|||
export interface edit_table_depart_man{ |
|||
id: string; |
|||
title:string; |
|||
departmentint:Array<any>; |
|||
userlist:Array<any>; |
|||
} |
|||
export interface delsontarget{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getdetail{ |
|||
id: string; |
|||
} |
|||
export interface edit_details_cont{ |
|||
cycle:number; |
|||
department:Array<any>; |
|||
evidence:string; |
|||
executor:Array<any>; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any>; |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface getnew_target_depart_postman{ |
|||
id: string; |
|||
} |
|||
export interface edit_post_detailscont{ |
|||
cashstandard:string; |
|||
cycle:number; |
|||
evidence:string; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any> |
|||
punishtype:number; |
|||
relevantpostsman:Array<any> |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface eidtposttardetailsstrte{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface addtabledetailslist{ |
|||
detailslist:Array<any>; |
|||
tableid:string; |
|||
targetid:string; |
|||
} |
|||
export interface edit_newson_target{ |
|||
repostlist:Array<any>; |
|||
title:string; |
|||
id:string; |
|||
} |
|||
export interface del_son_tar{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface look_scheme_for_deparment{ |
|||
id: string; |
|||
} |
|||
export interface get_organdpost_three{ |
|||
id: string; |
|||
all:number; |
|||
levelL:number; |
|||
} |
|||
export interface summarydetail{ |
|||
department: string; |
|||
month:number; |
|||
targetid |
|||
levelL:number; |
|||
} |
|||
@ -0,0 +1,120 @@ |
|||
export interface orgtrant{ |
|||
year?:string; |
|||
} |
|||
export interface getplanversionvalid{ |
|||
group: string; |
|||
deaprtid: string; |
|||
year:string; |
|||
class: string; |
|||
title:string; |
|||
} |
|||
export interface newsummarydetails{ |
|||
department:string; |
|||
year: number, |
|||
month: number; |
|||
} |
|||
export interface govthreeing{ |
|||
all: number, |
|||
id: number; |
|||
} |
|||
export interface getonedetailed{ |
|||
id: number; |
|||
} |
|||
export interface getcompanydeparment{ |
|||
id: number; |
|||
idstr: number; |
|||
} |
|||
export interface edit_details_state{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getsontargetcont{ |
|||
id: string; |
|||
} |
|||
export interface table_add_detailses{ |
|||
targetid: string; |
|||
tableid:string; |
|||
detailslist:Array<any>; |
|||
} |
|||
|
|||
export interface edit_table_depart_man{ |
|||
id: string; |
|||
title:string; |
|||
departmentint:Array<any>; |
|||
userlist:Array<any>; |
|||
} |
|||
export interface delsontarget{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getdetail{ |
|||
id: string; |
|||
} |
|||
export interface edit_details_cont{ |
|||
cycle:number; |
|||
department:Array<any>; |
|||
evidence:string; |
|||
executor:Array<any>; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any>; |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface getnew_target_depart_postman{ |
|||
id: string; |
|||
} |
|||
export interface edit_post_detailscont{ |
|||
cashstandard:string; |
|||
cycle:number; |
|||
evidence:string; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any> |
|||
punishtype:number; |
|||
relevantpostsman:Array<any> |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface eidtposttardetailsstrte{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface addtabledetailslist{ |
|||
detailslist:Array<any>; |
|||
tableid:string; |
|||
targetid:string; |
|||
} |
|||
export interface edit_newson_target{ |
|||
repostlist:Array<any>; |
|||
title:string; |
|||
id:string; |
|||
} |
|||
export interface del_son_tar{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface look_scheme_for_deparment{ |
|||
id: string; |
|||
} |
|||
export interface get_organdpost_three{ |
|||
id: string; |
|||
all:number; |
|||
levelL:number; |
|||
} |
|||
export interface summarydetail{ |
|||
department: string; |
|||
month:number; |
|||
targetid:string; |
|||
levelL:number; |
|||
} |
|||
@ -0,0 +1,120 @@ |
|||
export interface orgtrant{ |
|||
year?:string; |
|||
} |
|||
export interface getplanversionvalid{ |
|||
group: string; |
|||
deaprtid: string; |
|||
year:string; |
|||
class: string; |
|||
title:string; |
|||
} |
|||
export interface newsummarydetails{ |
|||
department:string; |
|||
year: number, |
|||
month: number; |
|||
} |
|||
export interface govthreeing{ |
|||
all: number, |
|||
id: number; |
|||
} |
|||
export interface getonedetailed{ |
|||
id: number; |
|||
} |
|||
export interface getcompanydeparment{ |
|||
id: number; |
|||
idstr: number; |
|||
} |
|||
export interface edit_details_state{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getsontargetcont{ |
|||
id: string; |
|||
} |
|||
export interface table_add_detailses{ |
|||
targetid: string; |
|||
tableid:string; |
|||
detailslist:Array<any>; |
|||
} |
|||
|
|||
export interface edit_table_depart_man{ |
|||
id: string; |
|||
title:string; |
|||
departmentint:Array<any>; |
|||
userlist:Array<any>; |
|||
} |
|||
export interface delsontarget{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getdetail{ |
|||
id: string; |
|||
} |
|||
export interface edit_details_cont{ |
|||
cycle:number; |
|||
department:Array<any>; |
|||
evidence:string; |
|||
executor:Array<any>; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any>; |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface getnew_target_depart_postman{ |
|||
id: string; |
|||
} |
|||
export interface edit_post_detailscont{ |
|||
cashstandard:string; |
|||
cycle:number; |
|||
evidence:string; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any> |
|||
punishtype:number; |
|||
relevantpostsman:Array<any> |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface eidtposttardetailsstrte{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface addtabledetailslist{ |
|||
detailslist:Array<any>; |
|||
tableid:string; |
|||
targetid:string; |
|||
} |
|||
export interface edit_newson_target{ |
|||
repostlist:Array<any>; |
|||
title:string; |
|||
id:string; |
|||
} |
|||
export interface del_son_tar{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface look_scheme_for_deparment{ |
|||
id: string; |
|||
} |
|||
export interface get_organdpost_three{ |
|||
id: string; |
|||
all:number; |
|||
levelL:number; |
|||
} |
|||
export interface summarydetail{ |
|||
department: string; |
|||
month:number; |
|||
targetid:string; |
|||
year:number; |
|||
} |
|||
@ -0,0 +1,120 @@ |
|||
export interface orgtrant{ |
|||
year?:string; |
|||
} |
|||
export interface getplanversionvalid{ |
|||
group: string; |
|||
deaprtid: string; |
|||
year:string; |
|||
class: string; |
|||
title:string; |
|||
} |
|||
export interface newsummarydetails{ |
|||
department:string; |
|||
year: number, |
|||
month: number; |
|||
} |
|||
export interface govthreeing{ |
|||
all: number, |
|||
id: number; |
|||
} |
|||
export interface getonedetailed{ |
|||
id: number; |
|||
} |
|||
export interface getcompanydeparment{ |
|||
id: number; |
|||
idstr: number; |
|||
} |
|||
export interface edit_details_state{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getsontargetcont{ |
|||
id: string; |
|||
} |
|||
export interface table_add_detailses{ |
|||
targetid: string; |
|||
tableid:string; |
|||
detailslist:Array<any>; |
|||
} |
|||
|
|||
export interface edit_table_depart_man{ |
|||
id: string; |
|||
title:string; |
|||
departmentint:Array<any>; |
|||
userlist:Array<any>; |
|||
} |
|||
export interface delsontarget{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getdetail{ |
|||
id: string; |
|||
} |
|||
export interface edit_details_cont{ |
|||
cycle:number; |
|||
department:Array<any>; |
|||
evidence:string; |
|||
executor:Array<any>; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any>; |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface getnew_target_depart_postman{ |
|||
id: string; |
|||
} |
|||
export interface edit_post_detailscont{ |
|||
cashstandard:string; |
|||
cycle:number; |
|||
evidence:string; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any> |
|||
punishtype:number; |
|||
relevantpostsman:Array<any> |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface eidtposttardetailsstrte{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface addtabledetailslist{ |
|||
detailslist:Array<any>; |
|||
tableid:string; |
|||
targetid:string; |
|||
} |
|||
export interface edit_newson_target{ |
|||
repostlist:Array<any>; |
|||
title:string; |
|||
id:string; |
|||
} |
|||
export interface del_son_tar{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface look_scheme_for_deparment{ |
|||
id: string; |
|||
} |
|||
export interface get_organdpost_three{ |
|||
id: string; |
|||
all:number; |
|||
levelL:number; |
|||
} |
|||
export interface summarydetail{ |
|||
department: string; |
|||
month:number; |
|||
targetid:string; |
|||
year:Number; |
|||
} |
|||
@ -0,0 +1,120 @@ |
|||
export interface orgtrant{ |
|||
year?:string; |
|||
} |
|||
export interface getplanversionvalid{ |
|||
group: string; |
|||
deaprtid: string; |
|||
year:string; |
|||
class: string; |
|||
title:string; |
|||
} |
|||
export interface newsummarydetails{ |
|||
department:string; |
|||
year: Number, |
|||
month: number; |
|||
} |
|||
export interface govthreeing{ |
|||
all: number, |
|||
id: number; |
|||
} |
|||
export interface getonedetailed{ |
|||
id: number; |
|||
} |
|||
export interface getcompanydeparment{ |
|||
id: number; |
|||
idstr: number; |
|||
} |
|||
export interface edit_details_state{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getsontargetcont{ |
|||
id: string; |
|||
} |
|||
export interface table_add_detailses{ |
|||
targetid: string; |
|||
tableid:string; |
|||
detailslist:Array<any>; |
|||
} |
|||
|
|||
export interface edit_table_depart_man{ |
|||
id: string; |
|||
title:string; |
|||
departmentint:Array<any>; |
|||
userlist:Array<any>; |
|||
} |
|||
export interface delsontarget{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getdetail{ |
|||
id: string; |
|||
} |
|||
export interface edit_details_cont{ |
|||
cycle:number; |
|||
department:Array<any>; |
|||
evidence:string; |
|||
executor:Array<any>; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any>; |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface getnew_target_depart_postman{ |
|||
id: string; |
|||
} |
|||
export interface edit_post_detailscont{ |
|||
cashstandard:string; |
|||
cycle:number; |
|||
evidence:string; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any> |
|||
punishtype:number; |
|||
relevantpostsman:Array<any> |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface eidtposttardetailsstrte{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface addtabledetailslist{ |
|||
detailslist:Array<any>; |
|||
tableid:string; |
|||
targetid:string; |
|||
} |
|||
export interface edit_newson_target{ |
|||
repostlist:Array<any>; |
|||
title:string; |
|||
id:string; |
|||
} |
|||
export interface del_son_tar{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface look_scheme_for_deparment{ |
|||
id: string; |
|||
} |
|||
export interface get_organdpost_three{ |
|||
id: string; |
|||
all:number; |
|||
levelL:number; |
|||
} |
|||
export interface summarydetail{ |
|||
department: string; |
|||
month:number; |
|||
targetid:string; |
|||
year:Number; |
|||
} |
|||
@ -0,0 +1,121 @@ |
|||
export interface orgtrant{ |
|||
year?:string; |
|||
} |
|||
export interface getplanversionvalid{ |
|||
group: string; |
|||
deaprtid: string; |
|||
year:string; |
|||
class: string; |
|||
title:string; |
|||
} |
|||
export interface newsummarydetails{ |
|||
department:string; |
|||
year: Number, |
|||
month: number; |
|||
} |
|||
export interface govthreeing{ |
|||
all: number, |
|||
id: number; |
|||
} |
|||
export interface getonedetailed{ |
|||
id: number; |
|||
} |
|||
export interface getcompanydeparment{ |
|||
id: number; |
|||
idstr: number; |
|||
} |
|||
export interface edit_details_state{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getsontargetcont{ |
|||
id: string; |
|||
} |
|||
export interface table_add_detailses{ |
|||
targetid: string; |
|||
tableid:string; |
|||
detailslist:Array<any>; |
|||
} |
|||
|
|||
export interface edit_table_depart_man{ |
|||
id: string; |
|||
title:string; |
|||
departmentint:Array<any>; |
|||
userlist:Array<any>; |
|||
} |
|||
export interface delsontarget{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getdetail{ |
|||
id: string; |
|||
} |
|||
export interface edit_details_cont{ |
|||
cycle:number; |
|||
department:Array<any>; |
|||
evidence:string; |
|||
executor:Array<any>; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any>; |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface getnew_target_depart_postman{ |
|||
id: string; |
|||
} |
|||
export interface edit_post_detailscont{ |
|||
cashstandard:string; |
|||
cycle:number; |
|||
evidence:string; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any> |
|||
punishtype:number; |
|||
relevantpostsman:Array<any> |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface eidtposttardetailsstrte{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface addtabledetailslist{ |
|||
detailslist:Array<any>; |
|||
tableid:string; |
|||
targetid:string; |
|||
} |
|||
export interface edit_newson_target{ |
|||
repostlist:Array<any>; |
|||
title:string; |
|||
id:string; |
|||
} |
|||
export interface del_son_tar{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface look_scheme_for_deparment{ |
|||
id: string; |
|||
} |
|||
export interface get_organdpost_three{ |
|||
id: string; |
|||
all:number; |
|||
levelL:number; |
|||
} |
|||
export interface summarydetail{ |
|||
department: string; |
|||
month:number; |
|||
targetid:string; |
|||
year:Number; |
|||
} |
|||
summaryplanrecord |
|||
@ -0,0 +1,127 @@ |
|||
export interface orgtrant{ |
|||
year?:string; |
|||
} |
|||
export interface getplanversionvalid{ |
|||
group: string; |
|||
deaprtid: string; |
|||
year:string; |
|||
class: string; |
|||
title:string; |
|||
} |
|||
export interface newsummarydetails{ |
|||
department:string; |
|||
year: Number, |
|||
month: number; |
|||
} |
|||
export interface govthreeing{ |
|||
all: number, |
|||
id: number; |
|||
} |
|||
export interface getonedetailed{ |
|||
id: number; |
|||
} |
|||
export interface getcompanydeparment{ |
|||
id: number; |
|||
idstr: number; |
|||
} |
|||
export interface edit_details_state{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getsontargetcont{ |
|||
id: string; |
|||
} |
|||
export interface table_add_detailses{ |
|||
targetid: string; |
|||
tableid:string; |
|||
detailslist:Array<any>; |
|||
} |
|||
|
|||
export interface edit_table_depart_man{ |
|||
id: string; |
|||
title:string; |
|||
departmentint:Array<any>; |
|||
userlist:Array<any>; |
|||
} |
|||
export interface delsontarget{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getdetail{ |
|||
id: string; |
|||
} |
|||
export interface edit_details_cont{ |
|||
cycle:number; |
|||
department:Array<any>; |
|||
evidence:string; |
|||
executor:Array<any>; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any>; |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface getnew_target_depart_postman{ |
|||
id: string; |
|||
} |
|||
export interface edit_post_detailscont{ |
|||
cashstandard:string; |
|||
cycle:number; |
|||
evidence:string; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any> |
|||
punishtype:number; |
|||
relevantpostsman:Array<any> |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface eidtposttardetailsstrte{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface addtabledetailslist{ |
|||
detailslist:Array<any>; |
|||
tableid:string; |
|||
targetid:string; |
|||
} |
|||
export interface edit_newson_target{ |
|||
repostlist:Array<any>; |
|||
title:string; |
|||
id:string; |
|||
} |
|||
export interface del_son_tar{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface look_scheme_for_deparment{ |
|||
id: string; |
|||
} |
|||
export interface get_organdpost_three{ |
|||
id: string; |
|||
all:number; |
|||
levelL:number; |
|||
} |
|||
export interface summarydetail{ |
|||
department: string; |
|||
month:number; |
|||
targetid:string; |
|||
year:Number; |
|||
} |
|||
summaryplanrecord |
|||
export interface summarydetail{ |
|||
department: string; |
|||
month:number; |
|||
targetid:string; |
|||
year:Number; |
|||
} |
|||
@ -0,0 +1,126 @@ |
|||
export interface orgtrant{ |
|||
year?:string; |
|||
} |
|||
export interface getplanversionvalid{ |
|||
group: string; |
|||
deaprtid: string; |
|||
year:string; |
|||
class: string; |
|||
title:string; |
|||
} |
|||
export interface newsummarydetails{ |
|||
department:string; |
|||
year: Number, |
|||
month: number; |
|||
} |
|||
export interface govthreeing{ |
|||
all: number, |
|||
id: number; |
|||
} |
|||
export interface getonedetailed{ |
|||
id: number; |
|||
} |
|||
export interface getcompanydeparment{ |
|||
id: number; |
|||
idstr: number; |
|||
} |
|||
export interface edit_details_state{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getsontargetcont{ |
|||
id: string; |
|||
} |
|||
export interface table_add_detailses{ |
|||
targetid: string; |
|||
tableid:string; |
|||
detailslist:Array<any>; |
|||
} |
|||
|
|||
export interface edit_table_depart_man{ |
|||
id: string; |
|||
title:string; |
|||
departmentint:Array<any>; |
|||
userlist:Array<any>; |
|||
} |
|||
export interface delsontarget{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getdetail{ |
|||
id: string; |
|||
} |
|||
export interface edit_details_cont{ |
|||
cycle:number; |
|||
department:Array<any>; |
|||
evidence:string; |
|||
executor:Array<any>; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any>; |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface getnew_target_depart_postman{ |
|||
id: string; |
|||
} |
|||
export interface edit_post_detailscont{ |
|||
cashstandard:string; |
|||
cycle:number; |
|||
evidence:string; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any> |
|||
punishtype:number; |
|||
relevantpostsman:Array<any> |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface eidtposttardetailsstrte{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface addtabledetailslist{ |
|||
detailslist:Array<any>; |
|||
tableid:string; |
|||
targetid:string; |
|||
} |
|||
export interface edit_newson_target{ |
|||
repostlist:Array<any>; |
|||
title:string; |
|||
id:string; |
|||
} |
|||
export interface del_son_tar{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface look_scheme_for_deparment{ |
|||
id: string; |
|||
} |
|||
export interface get_organdpost_three{ |
|||
id: string; |
|||
all:number; |
|||
levelL:number; |
|||
} |
|||
export interface summarydetail{ |
|||
department: string; |
|||
month:number; |
|||
targetid:string; |
|||
year:Number; |
|||
} |
|||
export interface summarydetail{ |
|||
department: string; |
|||
month:number; |
|||
targetid:string; |
|||
year:Number; |
|||
} |
|||
@ -0,0 +1,126 @@ |
|||
export interface orgtrant{ |
|||
year?:string; |
|||
} |
|||
export interface getplanversionvalid{ |
|||
group: string; |
|||
deaprtid: string; |
|||
year:string; |
|||
class: string; |
|||
title:string; |
|||
} |
|||
export interface newsummarydetails{ |
|||
department:string; |
|||
year: Number, |
|||
month: number; |
|||
} |
|||
export interface govthreeing{ |
|||
all: number, |
|||
id: number; |
|||
} |
|||
export interface getonedetailed{ |
|||
id: number; |
|||
} |
|||
export interface getcompanydeparment{ |
|||
id: number; |
|||
idstr: number; |
|||
} |
|||
export interface edit_details_state{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getsontargetcont{ |
|||
id: string; |
|||
} |
|||
export interface table_add_detailses{ |
|||
targetid: string; |
|||
tableid:string; |
|||
detailslist:Array<any>; |
|||
} |
|||
|
|||
export interface edit_table_depart_man{ |
|||
id: string; |
|||
title:string; |
|||
departmentint:Array<any>; |
|||
userlist:Array<any>; |
|||
} |
|||
export interface delsontarget{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getdetail{ |
|||
id: string; |
|||
} |
|||
export interface edit_details_cont{ |
|||
cycle:number; |
|||
department:Array<any>; |
|||
evidence:string; |
|||
executor:Array<any>; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any>; |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface getnew_target_depart_postman{ |
|||
id: string; |
|||
} |
|||
export interface edit_post_detailscont{ |
|||
cashstandard:string; |
|||
cycle:number; |
|||
evidence:string; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any> |
|||
punishtype:number; |
|||
relevantpostsman:Array<any> |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface eidtposttardetailsstrte{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface addtabledetailslist{ |
|||
detailslist:Array<any>; |
|||
tableid:string; |
|||
targetid:string; |
|||
} |
|||
export interface edit_newson_target{ |
|||
repostlist:Array<any>; |
|||
title:string; |
|||
id:string; |
|||
} |
|||
export interface del_son_tar{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface look_scheme_for_deparment{ |
|||
id: string; |
|||
} |
|||
export interface get_organdpost_three{ |
|||
id: string; |
|||
all:number; |
|||
levelL:number; |
|||
} |
|||
export interface summarydetail{ |
|||
department: string; |
|||
month:number; |
|||
targetid:string; |
|||
year:Number; |
|||
} |
|||
export interface summaryplanrecord{ |
|||
department: string; |
|||
month:number; |
|||
targetid:string; |
|||
year:Number; |
|||
} |
|||
@ -0,0 +1,127 @@ |
|||
export interface orgtrant{ |
|||
year?:string; |
|||
} |
|||
export interface getplanversionvalid{ |
|||
group: string; |
|||
deaprtid: string; |
|||
year:string; |
|||
class: string; |
|||
title:string; |
|||
} |
|||
export interface newsummarydetails{ |
|||
department:string; |
|||
year: Number, |
|||
month: number; |
|||
} |
|||
export interface govthreeing{ |
|||
all: number, |
|||
id: number; |
|||
} |
|||
export interface getonedetailed{ |
|||
id: number; |
|||
} |
|||
export interface getcompanydeparment{ |
|||
id: number; |
|||
idstr: number; |
|||
} |
|||
export interface edit_details_state{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getsontargetcont{ |
|||
id: string; |
|||
} |
|||
export interface table_add_detailses{ |
|||
targetid: string; |
|||
tableid:string; |
|||
detailslist:Array<any>; |
|||
} |
|||
|
|||
export interface edit_table_depart_man{ |
|||
id: string; |
|||
title:string; |
|||
departmentint:Array<any>; |
|||
userlist:Array<any>; |
|||
} |
|||
export interface delsontarget{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getdetail{ |
|||
id: string; |
|||
} |
|||
export interface edit_details_cont{ |
|||
cycle:number; |
|||
department:Array<any>; |
|||
evidence:string; |
|||
executor:Array<any>; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any>; |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface getnew_target_depart_postman{ |
|||
id: string; |
|||
} |
|||
export interface edit_post_detailscont{ |
|||
cashstandard:string; |
|||
cycle:number; |
|||
evidence:string; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any> |
|||
punishtype:number; |
|||
relevantpostsman:Array<any> |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface eidtposttardetailsstrte{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface addtabledetailslist{ |
|||
detailslist:Array<any>; |
|||
tableid:string; |
|||
targetid:string; |
|||
} |
|||
export interface edit_newson_target{ |
|||
repostlist:Array<any>; |
|||
title:string; |
|||
id:string; |
|||
} |
|||
export interface del_son_tar{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface look_scheme_for_deparment{ |
|||
id: string; |
|||
} |
|||
export interface get_organdpost_three{ |
|||
id: string; |
|||
all:number; |
|||
levelL:number; |
|||
} |
|||
export interface summarydetail{ |
|||
department: string; |
|||
month:number; |
|||
targetid:string; |
|||
year:Number; |
|||
} |
|||
export interface summaryplanrecord{ |
|||
department: string; |
|||
month:number; |
|||
targetid:string; |
|||
year:Number; |
|||
versio |
|||
} |
|||
@ -0,0 +1,127 @@ |
|||
export interface orgtrant{ |
|||
year?:string; |
|||
} |
|||
export interface getplanversionvalid{ |
|||
group: string; |
|||
deaprtid: string; |
|||
year:string; |
|||
class: string; |
|||
title:string; |
|||
} |
|||
export interface newsummarydetails{ |
|||
department:string; |
|||
year: Number, |
|||
month: number; |
|||
} |
|||
export interface govthreeing{ |
|||
all: number, |
|||
id: number; |
|||
} |
|||
export interface getonedetailed{ |
|||
id: number; |
|||
} |
|||
export interface getcompanydeparment{ |
|||
id: number; |
|||
idstr: number; |
|||
} |
|||
export interface edit_details_state{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getsontargetcont{ |
|||
id: string; |
|||
} |
|||
export interface table_add_detailses{ |
|||
targetid: string; |
|||
tableid:string; |
|||
detailslist:Array<any>; |
|||
} |
|||
|
|||
export interface edit_table_depart_man{ |
|||
id: string; |
|||
title:string; |
|||
departmentint:Array<any>; |
|||
userlist:Array<any>; |
|||
} |
|||
export interface delsontarget{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getdetail{ |
|||
id: string; |
|||
} |
|||
export interface edit_details_cont{ |
|||
cycle:number; |
|||
department:Array<any>; |
|||
evidence:string; |
|||
executor:Array<any>; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any>; |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface getnew_target_depart_postman{ |
|||
id: string; |
|||
} |
|||
export interface edit_post_detailscont{ |
|||
cashstandard:string; |
|||
cycle:number; |
|||
evidence:string; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any> |
|||
punishtype:number; |
|||
relevantpostsman:Array<any> |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface eidtposttardetailsstrte{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface addtabledetailslist{ |
|||
detailslist:Array<any>; |
|||
tableid:string; |
|||
targetid:string; |
|||
} |
|||
export interface edit_newson_target{ |
|||
repostlist:Array<any>; |
|||
title:string; |
|||
id:string; |
|||
} |
|||
export interface del_son_tar{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface look_scheme_for_deparment{ |
|||
id: string; |
|||
} |
|||
export interface get_organdpost_three{ |
|||
id: string; |
|||
all:number; |
|||
levelL:number; |
|||
} |
|||
export interface summarydetail{ |
|||
department: string; |
|||
month:number; |
|||
targetid:string; |
|||
year:Number; |
|||
} |
|||
export interface summaryplanrecord{ |
|||
department: string; |
|||
month:number; |
|||
targetid:string; |
|||
year:Number; |
|||
versio:string |
|||
} |
|||
@ -0,0 +1,127 @@ |
|||
export interface orgtrant{ |
|||
year?:string; |
|||
} |
|||
export interface getplanversionvalid{ |
|||
group: string; |
|||
deaprtid: string; |
|||
year:string; |
|||
class: string; |
|||
title:string; |
|||
} |
|||
export interface newsummarydetails{ |
|||
department:string; |
|||
year: Number, |
|||
month: number; |
|||
} |
|||
export interface govthreeing{ |
|||
all: number, |
|||
id: number; |
|||
} |
|||
export interface getonedetailed{ |
|||
id: number; |
|||
} |
|||
export interface getcompanydeparment{ |
|||
id: number; |
|||
idstr: number; |
|||
} |
|||
export interface edit_details_state{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getsontargetcont{ |
|||
id: string; |
|||
} |
|||
export interface table_add_detailses{ |
|||
targetid: string; |
|||
tableid:string; |
|||
detailslist:Array<any>; |
|||
} |
|||
|
|||
export interface edit_table_depart_man{ |
|||
id: string; |
|||
title:string; |
|||
departmentint:Array<any>; |
|||
userlist:Array<any>; |
|||
} |
|||
export interface delsontarget{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface getdetail{ |
|||
id: string; |
|||
} |
|||
export interface edit_details_cont{ |
|||
cycle:number; |
|||
department:Array<any>; |
|||
evidence:string; |
|||
executor:Array<any>; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any>; |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface getnew_target_depart_postman{ |
|||
id: string; |
|||
} |
|||
export interface edit_post_detailscont{ |
|||
cashstandard:string; |
|||
cycle:number; |
|||
evidence:string; |
|||
frequency:number; |
|||
id:string; |
|||
inspemethod:Array<any> |
|||
punishtype:number; |
|||
relevantpostsman:Array<any> |
|||
remarks:string; |
|||
standard:string; |
|||
title:string; |
|||
types:number; |
|||
unit:string; |
|||
} |
|||
export interface eidtposttardetailsstrte{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface addtabledetailslist{ |
|||
detailslist:Array<any>; |
|||
tableid:string; |
|||
targetid:string; |
|||
} |
|||
export interface edit_newson_target{ |
|||
repostlist:Array<any>; |
|||
title:string; |
|||
id:string; |
|||
} |
|||
export interface del_son_tar{ |
|||
id: string; |
|||
state: number; |
|||
istrue:number; |
|||
} |
|||
export interface look_scheme_for_deparment{ |
|||
id: string; |
|||
} |
|||
export interface get_organdpost_three{ |
|||
id: string; |
|||
all:number; |
|||
levelL:number; |
|||
} |
|||
export interface summarydetail{ |
|||
department: string; |
|||
month:number; |
|||
targetid:string; |
|||
year:Number; |
|||
} |
|||
export interface summaryplanrecord{ |
|||
department: string; |
|||
month:number; |
|||
targetid:string; |
|||
year:Number; |
|||
versio:string; |
|||
} |
|||
@ -0,0 +1,131 @@ |
|||
export interface postinfp{ |
|||
id?:number, |
|||
number?: string, |
|||
name?:string, |
|||
superior?:number, |
|||
organizationtype?: number, |
|||
abbreviation?: string, |
|||
time?: number, |
|||
state?: number, |
|||
wechatorganizationid?: number, |
|||
superiorsun?: string, |
|||
schoole?: number, |
|||
kingdeeid?: string, |
|||
ispower?: number, |
|||
sort?: number, |
|||
classname?: string, |
|||
level?: number, |
|||
isman?: number, |
|||
status?: boolean, |
|||
child?: null, |
|||
type?:number; |
|||
} |
|||
export interface tarData{ |
|||
page?:number; |
|||
pageSize?:number; |
|||
name?:string; |
|||
dimension?:string; |
|||
attribute?:string; |
|||
orgidlist?:Array<any>; |
|||
} |
|||
export interface addlist{ |
|||
name?:string; |
|||
share?:number; |
|||
acceptdepartmentid?:Array<any>; |
|||
userlist?:Array<any>; |
|||
dimension?:string; |
|||
nature?:number; |
|||
unit?:string; |
|||
cycle?:number; |
|||
cycleattr?:Number; |
|||
scoringmethod?:number; |
|||
visiblerangegroup?:Array<any>; |
|||
visiblerangedepart?:Array<any>; |
|||
} |
|||
export interface deltarget{ |
|||
id?:String; |
|||
state?:number; |
|||
istrue?:number; |
|||
} |
|||
export interface getgroupData{ |
|||
id?:number; |
|||
all:number; |
|||
} |
|||
export interface edittarget{ |
|||
acceptdepartmentid?:Array<any> |
|||
cycle?:Number; |
|||
cycleattr:number; |
|||
dimension:string; |
|||
id:string; |
|||
name:string; |
|||
nature:number; |
|||
scoringmethod:Number; |
|||
unit:string; |
|||
userlist:Array<any> |
|||
} |
|||
export interface position{ |
|||
page?:number; |
|||
pagesize?:number; |
|||
organization?:string; |
|||
} |
|||
export interface getgroup{ |
|||
id?:number; |
|||
level?:number; |
|||
} |
|||
export interface organd{ |
|||
all?:number; |
|||
id?:string; |
|||
levelL:number; |
|||
} |
|||
export interface postsss{ |
|||
attribute?:string; |
|||
dimension?:string; |
|||
page?:number; |
|||
pageSize?:number; |
|||
title?:string; |
|||
postidlist?:Array<any>; |
|||
} |
|||
export interface addposttar{ |
|||
title?:string; |
|||
dimension?: String; |
|||
unit?:String; |
|||
type?: number; |
|||
scoringmethod?: number; |
|||
cycle?:number; |
|||
cycleattr?: number; |
|||
departmentPostOther?:Array<any> |
|||
otherposttarget?:Array<any>; |
|||
|
|||
} |
|||
export interface searchorgpos{ |
|||
name?:string; |
|||
orgid?:string; |
|||
} |
|||
export interface setposttarget{ |
|||
id?:string; |
|||
state?:number; |
|||
istrue?:number; |
|||
} |
|||
export interface table_base_post_target{ |
|||
id?:string; |
|||
} |
|||
export interface getdetails{ |
|||
targetid: string; |
|||
inspect: Array<any>; |
|||
postlist: Array<any>; |
|||
|
|||
} |
|||
export interface neweditposttarget{ |
|||
title?:string; |
|||
dimension?: String; |
|||
unit?:String; |
|||
type?: number; |
|||
scoringmethod?: Number; |
|||
cycle?:Number; |
|||
cycleattr?: Number; |
|||
otherposttarget?:Array<any>; |
|||
id:string; |
|||
} |
|||
export interface get_organdpost_ary{ |
|||
id: string; |
|||
} |
|||
@ -0,0 +1,131 @@ |
|||
export interface postinfp{ |
|||
id?:number, |
|||
number?: string, |
|||
name?:string, |
|||
superior?:number, |
|||
organizationtype?: number, |
|||
abbreviation?: string, |
|||
time?: number, |
|||
state?: number, |
|||
wechatorganizationid?: number, |
|||
superiorsun?: string, |
|||
schoole?: number, |
|||
kingdeeid?: string, |
|||
ispower?: number, |
|||
sort?: number, |
|||
classname?: string, |
|||
level?: number, |
|||
isman?: number, |
|||
status?: boolean, |
|||
child?: null, |
|||
type?:number; |
|||
} |
|||
export interface tarData{ |
|||
page?:number; |
|||
pageSize?:number; |
|||
name?:string; |
|||
dimension?:string; |
|||
attribute?:string; |
|||
orgidlist?:Array<any>; |
|||
} |
|||
export interface addlist{ |
|||
name?:string; |
|||
share?:number; |
|||
acceptdepartmentid?:Array<any>; |
|||
userlist?:Array<any>; |
|||
dimension?:string; |
|||
nature?:number; |
|||
unit?:string; |
|||
cycle?:number; |
|||
cycleattr?:Number; |
|||
scoringmethod?:number; |
|||
visiblerangegroup?:Array<any>; |
|||
visiblerangedepart?:Array<any>; |
|||
} |
|||
export interface deltarget{ |
|||
id?:String; |
|||
state?:number; |
|||
istrue?:number; |
|||
} |
|||
export interface getgroupData{ |
|||
id?:number; |
|||
all:number; |
|||
} |
|||
export interface edittarget{ |
|||
acceptdepartmentid?:Array<any> |
|||
cycle?:Number; |
|||
cycleattr:number; |
|||
dimension:string; |
|||
id:string; |
|||
name:string; |
|||
nature:number; |
|||
scoringmethod:Number; |
|||
unit:string; |
|||
userlist:Array<any> |
|||
} |
|||
export interface position{ |
|||
page?:number; |
|||
pagesize?:number; |
|||
organization?:string; |
|||
} |
|||
export interface getgroup{ |
|||
id?:number; |
|||
level?:number; |
|||
} |
|||
export interface organd{ |
|||
all?:number; |
|||
id?:string; |
|||
levelL:number; |
|||
} |
|||
export interface postsss{ |
|||
attribute?:string; |
|||
dimension?:string; |
|||
page?:number; |
|||
pageSize?:number; |
|||
title?:string; |
|||
postidlist?:Array<any>; |
|||
} |
|||
export interface addposttar{ |
|||
title?:string; |
|||
dimension?: String; |
|||
unit?:String; |
|||
type?: number; |
|||
scoringmethod?: number; |
|||
cycle?:number; |
|||
cycleattr?: number; |
|||
departmentPostOther?:Array<any> |
|||
otherposttarget?:Array<any>; |
|||
|
|||
} |
|||
export interface searchorgpos{ |
|||
name?:string; |
|||
orgid?:string; |
|||
} |
|||
export interface setposttarget{ |
|||
id?:string; |
|||
state?:number; |
|||
istrue?:number; |
|||
} |
|||
export interface table_base_post_target{ |
|||
id?:string; |
|||
} |
|||
export interface getdetails{ |
|||
targetid: string; |
|||
inspect: Array<any>; |
|||
postlist: Array<any>; |
|||
cycle |
|||
} |
|||
export interface neweditposttarget{ |
|||
title?:string; |
|||
dimension?: String; |
|||
unit?:String; |
|||
type?: number; |
|||
scoringmethod?: Number; |
|||
cycle?:Number; |
|||
cycleattr?: Number; |
|||
otherposttarget?:Array<any>; |
|||
id:string; |
|||
} |
|||
export interface get_organdpost_ary{ |
|||
id: string; |
|||
} |
|||
@ -0,0 +1,131 @@ |
|||
export interface postinfp{ |
|||
id?:number, |
|||
number?: string, |
|||
name?:string, |
|||
superior?:number, |
|||
organizationtype?: number, |
|||
abbreviation?: string, |
|||
time?: number, |
|||
state?: number, |
|||
wechatorganizationid?: number, |
|||
superiorsun?: string, |
|||
schoole?: number, |
|||
kingdeeid?: string, |
|||
ispower?: number, |
|||
sort?: number, |
|||
classname?: string, |
|||
level?: number, |
|||
isman?: number, |
|||
status?: boolean, |
|||
child?: null, |
|||
type?:number; |
|||
} |
|||
export interface tarData{ |
|||
page?:number; |
|||
pageSize?:number; |
|||
name?:string; |
|||
dimension?:string; |
|||
attribute?:string; |
|||
orgidlist?:Array<any>; |
|||
} |
|||
export interface addlist{ |
|||
name?:string; |
|||
share?:number; |
|||
acceptdepartmentid?:Array<any>; |
|||
userlist?:Array<any>; |
|||
dimension?:string; |
|||
nature?:number; |
|||
unit?:string; |
|||
cycle?:number; |
|||
cycleattr?:Number; |
|||
scoringmethod?:number; |
|||
visiblerangegroup?:Array<any>; |
|||
visiblerangedepart?:Array<any>; |
|||
} |
|||
export interface deltarget{ |
|||
id?:String; |
|||
state?:number; |
|||
istrue?:number; |
|||
} |
|||
export interface getgroupData{ |
|||
id?:number; |
|||
all:number; |
|||
} |
|||
export interface edittarget{ |
|||
acceptdepartmentid?:Array<any> |
|||
cycle?:Number; |
|||
cycleattr:number; |
|||
dimension:string; |
|||
id:string; |
|||
name:string; |
|||
nature:number; |
|||
scoringmethod:Number; |
|||
unit:string; |
|||
userlist:Array<any> |
|||
} |
|||
export interface position{ |
|||
page?:number; |
|||
pagesize?:number; |
|||
organization?:string; |
|||
} |
|||
export interface getgroup{ |
|||
id?:number; |
|||
level?:number; |
|||
} |
|||
export interface organd{ |
|||
all?:number; |
|||
id?:string; |
|||
levelL:number; |
|||
} |
|||
export interface postsss{ |
|||
attribute?:string; |
|||
dimension?:string; |
|||
page?:number; |
|||
pageSize?:number; |
|||
title?:string; |
|||
postidlist?:Array<any>; |
|||
} |
|||
export interface addposttar{ |
|||
title?:string; |
|||
dimension?: String; |
|||
unit?:String; |
|||
type?: number; |
|||
scoringmethod?: number; |
|||
cycle?:number; |
|||
cycleattr?: number; |
|||
departmentPostOther?:Array<any> |
|||
otherposttarget?:Array<any>; |
|||
|
|||
} |
|||
export interface searchorgpos{ |
|||
name?:string; |
|||
orgid?:string; |
|||
} |
|||
export interface setposttarget{ |
|||
id?:string; |
|||
state?:number; |
|||
istrue?:number; |
|||
} |
|||
export interface table_base_post_target{ |
|||
id?:string; |
|||
} |
|||
export interface getdetails{ |
|||
targetid: string; |
|||
inspect: Array<any>; |
|||
postlist: Array<any>; |
|||
cycle: |
|||
} |
|||
export interface neweditposttarget{ |
|||
title?:string; |
|||
dimension?: String; |
|||
unit?:String; |
|||
type?: number; |
|||
scoringmethod?: Number; |
|||
cycle?:Number; |
|||
cycleattr?: Number; |
|||
otherposttarget?:Array<any>; |
|||
id:string; |
|||
} |
|||
export interface get_organdpost_ary{ |
|||
id: string; |
|||
} |
|||
@ -0,0 +1,131 @@ |
|||
export interface postinfp{ |
|||
id?:number, |
|||
number?: string, |
|||
name?:string, |
|||
superior?:number, |
|||
organizationtype?: number, |
|||
abbreviation?: string, |
|||
time?: number, |
|||
state?: number, |
|||
wechatorganizationid?: number, |
|||
superiorsun?: string, |
|||
schoole?: number, |
|||
kingdeeid?: string, |
|||
ispower?: number, |
|||
sort?: number, |
|||
classname?: string, |
|||
level?: number, |
|||
isman?: number, |
|||
status?: boolean, |
|||
child?: null, |
|||
type?:number; |
|||
} |
|||
export interface tarData{ |
|||
page?:number; |
|||
pageSize?:number; |
|||
name?:string; |
|||
dimension?:string; |
|||
attribute?:string; |
|||
orgidlist?:Array<any>; |
|||
} |
|||
export interface addlist{ |
|||
name?:string; |
|||
share?:number; |
|||
acceptdepartmentid?:Array<any>; |
|||
userlist?:Array<any>; |
|||
dimension?:string; |
|||
nature?:number; |
|||
unit?:string; |
|||
cycle?:number; |
|||
cycleattr?:Number; |
|||
scoringmethod?:number; |
|||
visiblerangegroup?:Array<any>; |
|||
visiblerangedepart?:Array<any>; |
|||
} |
|||
export interface deltarget{ |
|||
id?:String; |
|||
state?:number; |
|||
istrue?:number; |
|||
} |
|||
export interface getgroupData{ |
|||
id?:number; |
|||
all:number; |
|||
} |
|||
export interface edittarget{ |
|||
acceptdepartmentid?:Array<any> |
|||
cycle?:Number; |
|||
cycleattr:number; |
|||
dimension:string; |
|||
id:string; |
|||
name:string; |
|||
nature:number; |
|||
scoringmethod:Number; |
|||
unit:string; |
|||
userlist:Array<any> |
|||
} |
|||
export interface position{ |
|||
page?:number; |
|||
pagesize?:number; |
|||
organization?:string; |
|||
} |
|||
export interface getgroup{ |
|||
id?:number; |
|||
level?:number; |
|||
} |
|||
export interface organd{ |
|||
all?:number; |
|||
id?:string; |
|||
levelL:number; |
|||
} |
|||
export interface postsss{ |
|||
attribute?:string; |
|||
dimension?:string; |
|||
page?:number; |
|||
pageSize?:number; |
|||
title?:string; |
|||
postidlist?:Array<any>; |
|||
} |
|||
export interface addposttar{ |
|||
title?:string; |
|||
dimension?: String; |
|||
unit?:String; |
|||
type?: number; |
|||
scoringmethod?: number; |
|||
cycle?:number; |
|||
cycleattr?: number; |
|||
departmentPostOther?:Array<any> |
|||
otherposttarget?:Array<any>; |
|||
|
|||
} |
|||
export interface searchorgpos{ |
|||
name?:string; |
|||
orgid?:string; |
|||
} |
|||
export interface setposttarget{ |
|||
id?:string; |
|||
state?:number; |
|||
istrue?:number; |
|||
} |
|||
export interface table_base_post_target{ |
|||
id?:string; |
|||
} |
|||
export interface getdetails{ |
|||
targetid: string; |
|||
inspect: Array<any>; |
|||
postlist: Array<any>; |
|||
cycle?: |
|||
} |
|||
export interface neweditposttarget{ |
|||
title?:string; |
|||
dimension?: String; |
|||
unit?:String; |
|||
type?: number; |
|||
scoringmethod?: Number; |
|||
cycle?:Number; |
|||
cycleattr?: Number; |
|||
otherposttarget?:Array<any>; |
|||
id:string; |
|||
} |
|||
export interface get_organdpost_ary{ |
|||
id: string; |
|||
} |
|||
@ -0,0 +1,131 @@ |
|||
export interface postinfp{ |
|||
id?:number, |
|||
number?: string, |
|||
name?:string, |
|||
superior?:number, |
|||
organizationtype?: number, |
|||
abbreviation?: string, |
|||
time?: number, |
|||
state?: number, |
|||
wechatorganizationid?: number, |
|||
superiorsun?: string, |
|||
schoole?: number, |
|||
kingdeeid?: string, |
|||
ispower?: number, |
|||
sort?: number, |
|||
classname?: string, |
|||
level?: number, |
|||
isman?: number, |
|||
status?: boolean, |
|||
child?: null, |
|||
type?:number; |
|||
} |
|||
export interface tarData{ |
|||
page?:number; |
|||
pageSize?:number; |
|||
name?:string; |
|||
dimension?:string; |
|||
attribute?:string; |
|||
orgidlist?:Array<any>; |
|||
} |
|||
export interface addlist{ |
|||
name?:string; |
|||
share?:number; |
|||
acceptdepartmentid?:Array<any>; |
|||
userlist?:Array<any>; |
|||
dimension?:string; |
|||
nature?:number; |
|||
unit?:string; |
|||
cycle?:number; |
|||
cycleattr?:Number; |
|||
scoringmethod?:number; |
|||
visiblerangegroup?:Array<any>; |
|||
visiblerangedepart?:Array<any>; |
|||
} |
|||
export interface deltarget{ |
|||
id?:String; |
|||
state?:number; |
|||
istrue?:number; |
|||
} |
|||
export interface getgroupData{ |
|||
id?:number; |
|||
all:number; |
|||
} |
|||
export interface edittarget{ |
|||
acceptdepartmentid?:Array<any> |
|||
cycle?:Number; |
|||
cycleattr:number; |
|||
dimension:string; |
|||
id:string; |
|||
name:string; |
|||
nature:number; |
|||
scoringmethod:Number; |
|||
unit:string; |
|||
userlist:Array<any> |
|||
} |
|||
export interface position{ |
|||
page?:number; |
|||
pagesize?:number; |
|||
organization?:string; |
|||
} |
|||
export interface getgroup{ |
|||
id?:number; |
|||
level?:number; |
|||
} |
|||
export interface organd{ |
|||
all?:number; |
|||
id?:string; |
|||
levelL:number; |
|||
} |
|||
export interface postsss{ |
|||
attribute?:string; |
|||
dimension?:string; |
|||
page?:number; |
|||
pageSize?:number; |
|||
title?:string; |
|||
postidlist?:Array<any>; |
|||
} |
|||
export interface addposttar{ |
|||
title?:string; |
|||
dimension?: String; |
|||
unit?:String; |
|||
type?: number; |
|||
scoringmethod?: number; |
|||
cycle?:number; |
|||
cycleattr?: number; |
|||
departmentPostOther?:Array<any> |
|||
otherposttarget?:Array<any>; |
|||
|
|||
} |
|||
export interface searchorgpos{ |
|||
name?:string; |
|||
orgid?:string; |
|||
} |
|||
export interface setposttarget{ |
|||
id?:string; |
|||
state?:number; |
|||
istrue?:number; |
|||
} |
|||
export interface table_base_post_target{ |
|||
id?:string; |
|||
} |
|||
export interface getdetails{ |
|||
targetid: string; |
|||
inspect: Array<any>; |
|||
postlist: Array<any>; |
|||
cycle?:Number |
|||
} |
|||
export interface neweditposttarget{ |
|||
title?:string; |
|||
dimension?: String; |
|||
unit?:String; |
|||
type?: number; |
|||
scoringmethod?: Number; |
|||
cycle?:Number; |
|||
cycleattr?: Number; |
|||
otherposttarget?:Array<any>; |
|||
id:string; |
|||
} |
|||
export interface get_organdpost_ary{ |
|||
id: string; |
|||
} |
|||
@ -0,0 +1,131 @@ |
|||
export interface postinfp{ |
|||
id?:number, |
|||
number?: string, |
|||
name?:string, |
|||
superior?:number, |
|||
organizationtype?: number, |
|||
abbreviation?: string, |
|||
time?: number, |
|||
state?: number, |
|||
wechatorganizationid?: number, |
|||
superiorsun?: string, |
|||
schoole?: number, |
|||
kingdeeid?: string, |
|||
ispower?: number, |
|||
sort?: number, |
|||
classname?: string, |
|||
level?: number, |
|||
isman?: number, |
|||
status?: boolean, |
|||
child?: null, |
|||
type?:number; |
|||
} |
|||
export interface tarData{ |
|||
page?:number; |
|||
pageSize?:number; |
|||
name?:string; |
|||
dimension?:string; |
|||
attribute?:string; |
|||
orgidlist?:Array<any>; |
|||
} |
|||
export interface addlist{ |
|||
name?:string; |
|||
share?:number; |
|||
acceptdepartmentid?:Array<any>; |
|||
userlist?:Array<any>; |
|||
dimension?:string; |
|||
nature?:number; |
|||
unit?:string; |
|||
cycle?:number; |
|||
cycleattr?:Number; |
|||
scoringmethod?:number; |
|||
visiblerangegroup?:Array<any>; |
|||
visiblerangedepart?:Array<any>; |
|||
} |
|||
export interface deltarget{ |
|||
id?:String; |
|||
state?:number; |
|||
istrue?:number; |
|||
} |
|||
export interface getgroupData{ |
|||
id?:number; |
|||
all:number; |
|||
} |
|||
export interface edittarget{ |
|||
acceptdepartmentid?:Array<any> |
|||
cycle?:Number; |
|||
cycleattr:number; |
|||
dimension:string; |
|||
id:string; |
|||
name:string; |
|||
nature:number; |
|||
scoringmethod:Number; |
|||
unit:string; |
|||
userlist:Array<any> |
|||
} |
|||
export interface position{ |
|||
page?:number; |
|||
pagesize?:number; |
|||
organization?:string; |
|||
} |
|||
export interface getgroup{ |
|||
id?:number; |
|||
level?:number; |
|||
} |
|||
export interface organd{ |
|||
all?:number; |
|||
id?:string; |
|||
levelL:number; |
|||
} |
|||
export interface postsss{ |
|||
attribute?:string; |
|||
dimension?:string; |
|||
page?:number; |
|||
pageSize?:number; |
|||
title?:string; |
|||
postidlist?:Array<any>; |
|||
} |
|||
export interface addposttar{ |
|||
title?:string; |
|||
dimension?: String; |
|||
unit?:String; |
|||
type?: number; |
|||
scoringmethod?: number; |
|||
cycle?:number; |
|||
cycleattr?: number; |
|||
departmentPostOther?:Array<any> |
|||
otherposttarget?:Array<any>; |
|||
|
|||
} |
|||
export interface searchorgpos{ |
|||
name?:string; |
|||
orgid?:string; |
|||
} |
|||
export interface setposttarget{ |
|||
id?:string; |
|||
state?:number; |
|||
istrue?:number; |
|||
} |
|||
export interface table_base_post_target{ |
|||
id?:string; |
|||
} |
|||
export interface getdetails{ |
|||
targetid: string; |
|||
inspect: Array<any>; |
|||
postlist: Array<any>; |
|||
cycle?:Number; |
|||
} |
|||
export interface neweditposttarget{ |
|||
title?:string; |
|||
dimension?: String; |
|||
unit?:String; |
|||
type?: number; |
|||
scoringmethod?: Number; |
|||
cycle?:Number; |
|||
cycleattr?: Number; |
|||
otherposttarget?:Array<any>; |
|||
id:string; |
|||
} |
|||
export interface get_organdpost_ary{ |
|||
id: string; |
|||
} |
|||
@ -0,0 +1,131 @@ |
|||
export interface postinfp{ |
|||
id?:number, |
|||
number?: string, |
|||
name?:string, |
|||
superior?:number, |
|||
organizationtype?: number, |
|||
abbreviation?: string, |
|||
time?: number, |
|||
state?: number, |
|||
wechatorganizationid?: number, |
|||
superiorsun?: string, |
|||
schoole?: number, |
|||
kingdeeid?: string, |
|||
ispower?: number, |
|||
sort?: number, |
|||
classname?: string, |
|||
level?: number, |
|||
isman?: number, |
|||
status?: boolean, |
|||
child?: null, |
|||
type?:number; |
|||
} |
|||
export interface tarData{ |
|||
page?:number; |
|||
pageSize?:number; |
|||
name?:string; |
|||
dimension?:string; |
|||
attribute?:string; |
|||
orgidlist?:Array<any>; |
|||
} |
|||
export interface addlist{ |
|||
name?:string; |
|||
share?:number; |
|||
acceptdepartmentid?:Array<any>; |
|||
userlist?:Array<any>; |
|||
dimension?:string; |
|||
nature?:number; |
|||
unit?:string; |
|||
cycle?:number; |
|||
cycleattr?:Number; |
|||
scoringmethod?:number; |
|||
visiblerangegroup?:Array<any>; |
|||
visiblerangedepart?:Array<any>; |
|||
} |
|||
export interface deltarget{ |
|||
id?:String; |
|||
state?:number; |
|||
istrue?:number; |
|||
} |
|||
export interface getgroupData{ |
|||
id?:number; |
|||
all:number; |
|||
} |
|||
export interface edittarget{ |
|||
acceptdepartmentid?:Array<any> |
|||
cycle?:Number; |
|||
cycleattr:number; |
|||
dimension:string; |
|||
id:string; |
|||
name:string; |
|||
nature:number; |
|||
scoringmethod:Number; |
|||
unit:string; |
|||
userlist:Array<any> |
|||
} |
|||
export interface position{ |
|||
page?:number; |
|||
pagesize?:number; |
|||
organization?:string; |
|||
} |
|||
export interface getgroup{ |
|||
id?:number; |
|||
level?:number; |
|||
} |
|||
export interface organd{ |
|||
all?:number; |
|||
id?:string; |
|||
levelL:number; |
|||
} |
|||
export interface postsss{ |
|||
attribute?:string; |
|||
dimension?:string; |
|||
page?:number; |
|||
pageSize?:number; |
|||
title?:string; |
|||
postidlist?:Array<any>; |
|||
} |
|||
export interface addposttar{ |
|||
title?:string; |
|||
dimension?: String; |
|||
unit?:String; |
|||
type?: number; |
|||
scoringmethod?: number; |
|||
cycle?:number; |
|||
cycleattr?: number; |
|||
departmentPostOther?:Array<any> |
|||
otherposttarget?:Array<any>; |
|||
|
|||
} |
|||
export interface searchorgpos{ |
|||
name?:string; |
|||
orgid?:string; |
|||
} |
|||
export interface setposttarget{ |
|||
id?:string; |
|||
state?:number; |
|||
istrue?:number; |
|||
} |
|||
export interface table_base_post_target{ |
|||
id?:string; |
|||
} |
|||
export interface getdetails{ |
|||
targetid: string; |
|||
inspect: Array<any>; |
|||
postlist: Array<any>; |
|||
cycle:Number; |
|||
} |
|||
export interface neweditposttarget{ |
|||
title?:string; |
|||
dimension?: String; |
|||
unit?:String; |
|||
type?: number; |
|||
scoringmethod?: Number; |
|||
cycle?:Number; |
|||
cycleattr?: Number; |
|||
otherposttarget?:Array<any>; |
|||
id:string; |
|||
} |
|||
export interface get_organdpost_ary{ |
|||
id: string; |
|||
} |
|||
@ -0,0 +1,253 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<Dialog |
|||
v-if="dialogShow" |
|||
v-model:dialogShow="dialogShow" |
|||
class="add" |
|||
:row-info="rowInfo" |
|||
:title="title" |
|||
:array-num="studentInfo.length" |
|||
@add-row = "addRow" |
|||
@edit-row="editRow" |
|||
@image-uploaded="handleImageUploaded" |
|||
/> |
|||
<!-- 详情弹窗 --> |
|||
<Detail v-if="detailShow" :row-info="rowInfo" @close-etail="closeDetail" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
import Dialog from "./dialog.vue"; |
|||
export default { |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
components: { Dialog,Detail }, |
|||
setup() { |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
detailShow: false, // 详情弹窗 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const method = reactive({ |
|||
handleNew() { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
}, |
|||
handleDetail(val) { |
|||
data.detailShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleEdit(val) { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleDel(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
return { ...toRefs(data), ...method, ...filterTableData, searchName,imageUrl,handleImageUploaded,}; |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,252 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<Dialog |
|||
v-if="dialogShow" |
|||
v-model:dialogShow="dialogShow" |
|||
class="add" |
|||
:row-info="rowInfo" |
|||
:title="title" |
|||
:array-num="studentInfo.length" |
|||
@add-row = "addRow" |
|||
@edit-row="editRow" |
|||
@image-uploaded="handleImageUploaded" |
|||
/> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
import Dialog from "./dialog.vue"; |
|||
export default { |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
components: { Dialog,Detail }, |
|||
setup() { |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
detailShow: false, // 详情弹窗 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const method = reactive({ |
|||
handleNew() { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
}, |
|||
handleDetail(val) { |
|||
data.detailShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleEdit(val) { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleDel(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
return { ...toRefs(data), ...method, ...filterTableData, searchName,imageUrl,handleImageUploaded,}; |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,252 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<Dialog |
|||
v-if="dialogShow" |
|||
v-model:dialogShow="dialogShow" |
|||
class="add" |
|||
:row-info="rowInfo" |
|||
:title="title" |
|||
:array-num="studentInfo.length" |
|||
@add-row = "addRow" |
|||
@edit-row="editRow" |
|||
@image-uploaded="handleImageUploaded" |
|||
/> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
import Dialog from "./dialog.vue"; |
|||
export default { |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
components: { Dialog }, |
|||
setup() { |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
detailShow: false, // 详情弹窗 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const method = reactive({ |
|||
handleNew() { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
}, |
|||
handleDetail(val) { |
|||
data.detailShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleEdit(val) { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleDel(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
return { ...toRefs(data), ...method, ...filterTableData, searchName,imageUrl,handleImageUploaded,}; |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,251 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<Dialog |
|||
v-if="dialogShow" |
|||
v-model:dialogShow="dialogShow" |
|||
class="add" |
|||
:row-info="rowInfo" |
|||
:title="title" |
|||
:array-num="studentInfo.length" |
|||
@add-row = "addRow" |
|||
@edit-row="editRow" |
|||
@image-uploaded="handleImageUploaded" |
|||
/> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
import Dialog from "./dialog.vue"; |
|||
export default { |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
components: { Dialog }, |
|||
setup() { |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const method = reactive({ |
|||
handleNew() { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
}, |
|||
handleDetail(val) { |
|||
data.detailShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleEdit(val) { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleDel(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
return { ...toRefs(data), ...method, ...filterTableData, searchName,imageUrl,handleImageUploaded,}; |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,247 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<Dialog |
|||
v-if="dialogShow" |
|||
v-model:dialogShow="dialogShow" |
|||
class="add" |
|||
:row-info="rowInfo" |
|||
:title="title" |
|||
:array-num="studentInfo.length" |
|||
@add-row = "addRow" |
|||
@edit-row="editRow" |
|||
@image-uploaded="handleImageUploaded" |
|||
/> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
import Dialog from "./dialog.vue"; |
|||
export default { |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
components: { Dialog }, |
|||
setup() { |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const method = reactive({ |
|||
handleNew() { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
}, |
|||
handleEdit(val) { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleDel(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
return { ...toRefs(data), ...method, ...filterTableData, searchName,imageUrl,handleImageUploaded,}; |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,246 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<Dialog |
|||
v-if="dialogShow" |
|||
v-model:dialogShow="dialogShow" |
|||
class="add" |
|||
:row-info="rowInfo" |
|||
:title="title" |
|||
:array-num="studentInfo.length" |
|||
@add-row = "addRow" |
|||
@edit-row="editRow" |
|||
@image-uploaded="handleImageUploaded" |
|||
/> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
import Dialog from "./dialog.vue"; |
|||
export default { |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
components: { Dialog }, |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const method = reactive({ |
|||
handleNew() { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
}, |
|||
handleEdit(val) { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleDel(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
return { ...toRefs(data), ...method, ...filterTableData, searchName,imageUrl,handleImageUploaded,}; |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,245 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<Dialog |
|||
v-if="dialogShow" |
|||
v-model:dialogShow="dialogShow" |
|||
class="add" |
|||
:row-info="rowInfo" |
|||
:title="title" |
|||
:array-num="studentInfo.length" |
|||
@add-row = "addRow" |
|||
@edit-row="editRow" |
|||
@image-uploaded="handleImageUploaded" |
|||
/> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
import Dialog from "./dialog.vue"; |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
components: { Dialog }, |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const method = reactive({ |
|||
handleNew() { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
}, |
|||
handleEdit(val) { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleDel(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
return { ...toRefs(data), ...method, ...filterTableData, searchName,imageUrl,handleImageUploaded,}; |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,245 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<Dialog |
|||
v-if="dialogShow" |
|||
v-model:dialogShow="dialogShow" |
|||
class="add" |
|||
:row-info="rowInfo" |
|||
:title="title" |
|||
:array-num="studentInfo.length" |
|||
@add-row = "addRow" |
|||
@edit-row="editRow" |
|||
@image-uploaded="handleImageUploaded" |
|||
/> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
import Dialog from "./dialog.vue"; |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
components: { Dialog } |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const method = reactive({ |
|||
handleNew() { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
}, |
|||
handleEdit(val) { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleDel(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
return { ...toRefs(data), ...method, ...filterTableData, searchName,imageUrl,handleImageUploaded,}; |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,244 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<Dialog |
|||
v-if="dialogShow" |
|||
v-model:dialogShow="dialogShow" |
|||
class="add" |
|||
:row-info="rowInfo" |
|||
:title="title" |
|||
:array-num="studentInfo.length" |
|||
@add-row = "addRow" |
|||
@edit-row="editRow" |
|||
@image-uploaded="handleImageUploaded" |
|||
/> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
import Dialog from "./dialog.vue"; |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
components: { Dialog } |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const method = reactive({ |
|||
handleNew() { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
}, |
|||
handleEdit(val) { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleDel(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
return { ...toRefs(data), ...method, ...filterTableData, searchName,imageUrl,handleImageUploaded,}; |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,243 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<Dialog |
|||
v-if="dialogShow" |
|||
v-model:dialogShow="dialogShow" |
|||
class="add" |
|||
:row-info="rowInfo" |
|||
:title="title" |
|||
:array-num="studentInfo.length" |
|||
@add-row = "addRow" |
|||
@edit-row="editRow" |
|||
@image-uploaded="handleImageUploaded" |
|||
/> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
import Dialog from "./dialog.vue"; |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
components: { Dialog } |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const method = reactive({ |
|||
handleNew() { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
}, |
|||
handleEdit(val) { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleDel(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
return { ...toRefs(data), ...method, ...filterTableData, searchName,imageUrl,handleImageUploaded,}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,242 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<Dialog |
|||
v-if="dialogShow" |
|||
v-model:dialogShow="dialogShow" |
|||
class="add" |
|||
:row-info="rowInfo" |
|||
:title="title" |
|||
:array-num="studentInfo.length" |
|||
@add-row = "addRow" |
|||
@edit-row="editRow" |
|||
@image-uploaded="handleImageUploaded" |
|||
/> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
import Dialog from "./dialog.vue"; |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
components: { Dialog } |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const method = reactive({ |
|||
handleNew() { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
}, |
|||
handleEdit(val) { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleDel(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,241 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<Dialog |
|||
v-if="dialogShow" |
|||
v-model:dialogShow="dialogShow" |
|||
class="add" |
|||
:row-info="rowInfo" |
|||
:title="title" |
|||
:array-num="studentInfo.length" |
|||
@add-row = "addRow" |
|||
@edit-row="editRow" |
|||
@image-uploaded="handleImageUploaded" |
|||
/> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
import Dialog from "./dialog.vue"; |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const method = reactive({ |
|||
handleNew() { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
}, |
|||
handleEdit(val) { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleDel(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,231 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
import Dialog from "./dialog.vue"; |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const method = reactive({ |
|||
handleNew() { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
}, |
|||
handleEdit(val) { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleDel(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,230 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
import Dialog from "./dialog.vue"; |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const method = reactive({ |
|||
handleNew() { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
}, |
|||
handleEdit(val) { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleDel(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,229 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const method = reactive({ |
|||
handleNew() { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
}, |
|||
handleEdit(val) { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleDel(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,229 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang=> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const method = reactive({ |
|||
handleNew() { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
}, |
|||
handleEdit(val) { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleDel(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,229 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const method = reactive({ |
|||
handleNew() { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
}, |
|||
handleEdit(val) { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleDel(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
handleNew() { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
}, |
|||
handleEdit(val) { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleDel(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew() { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
}, |
|||
handleEdit(val) { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleDel(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=() { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
}, |
|||
handleEdit(val) { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleDel(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
}, |
|||
handleEdit(val) { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleDel(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
chandleEdit(val) { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleDel(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit(val) { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleDel(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val) { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleDel(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
}, |
|||
handleDel(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
handleDel(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val) { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val)=> { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val)=> { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
} |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val)=> { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
}, |
|||
handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val)=> { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
} |
|||
const handleSure(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val)=> { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
} |
|||
const handleSure=(val) { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val)=> { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
} |
|||
const handleSure=(val)=> { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
}, |
|||
// 添加行 |
|||
addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val)=> { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
} |
|||
const handleSure=(val)=> { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
} |
|||
// 添加行 |
|||
caddRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val)=> { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
} |
|||
const handleSure=(val)=> { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
} |
|||
// 添加行 |
|||
const addRow(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val)=> { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
} |
|||
const handleSure=(val)=> { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
} |
|||
// 添加行 |
|||
const addRow=(val) { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val)=> { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
} |
|||
const handleSure=(val)=> { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
} |
|||
// 添加行 |
|||
const addRow=(val)=> { |
|||
data.studentInfo.push(val); |
|||
}, |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val)=> { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
} |
|||
const handleSure=(val)=> { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
} |
|||
// 添加行 |
|||
const addRow=(val)=> { |
|||
data.studentInfo.push(val); |
|||
} |
|||
// 编辑行 |
|||
editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val)=> { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
} |
|||
const handleSure=(val)=> { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
} |
|||
// 添加行 |
|||
const addRow=(val)=> { |
|||
data.studentInfo.push(val); |
|||
} |
|||
// 编辑行 |
|||
const editRow(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val)=> { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
} |
|||
const handleSure=(val)=> { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
} |
|||
// 添加行 |
|||
const addRow=(val)=> { |
|||
data.studentInfo.push(val); |
|||
} |
|||
// 编辑行 |
|||
const editRow=(val) { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val)=> { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
} |
|||
const handleSure=(val)=> { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
} |
|||
// 添加行 |
|||
const addRow=(val)=> { |
|||
data.studentInfo.push(val); |
|||
} |
|||
// 编辑行 |
|||
const editRow=(val)=> { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
}, |
|||
// 关闭详情弹窗 |
|||
closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val)=> { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
} |
|||
const handleSure=(val)=> { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
} |
|||
// 添加行 |
|||
const addRow=(val)=> { |
|||
data.studentInfo.push(val); |
|||
} |
|||
// 编辑行 |
|||
const editRow=(val)=> { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
} |
|||
// 关闭详情弹窗 |
|||
ccloseDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val)=> { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
} |
|||
const handleSure=(val)=> { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
} |
|||
// 添加行 |
|||
const addRow=(val)=> { |
|||
data.studentInfo.push(val); |
|||
} |
|||
// 编辑行 |
|||
const editRow=(val)=> { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
} |
|||
// 关闭详情弹窗 |
|||
const closeDetail() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val)=> { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
} |
|||
const handleSure=(val)=> { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
} |
|||
// 添加行 |
|||
const addRow=(val)=> { |
|||
data.studentInfo.push(val); |
|||
} |
|||
// 编辑行 |
|||
const editRow=(val)=> { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
} |
|||
// 关闭详情弹窗 |
|||
const closeDetail=() { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val)=> { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
} |
|||
const handleSure=(val)=> { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
} |
|||
// 添加行 |
|||
const addRow=(val)=> { |
|||
data.studentInfo.push(val); |
|||
} |
|||
// 编辑行 |
|||
const editRow=(val)=> { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
} |
|||
// 关闭详情弹窗 |
|||
const closeDetail=()=> { |
|||
data.detailShow = false; |
|||
}, |
|||
handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val)=> { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
} |
|||
const handleSure=(val)=> { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
} |
|||
// 添加行 |
|||
const addRow=(val)=> { |
|||
data.studentInfo.push(val); |
|||
} |
|||
// 编辑行 |
|||
const editRow=(val)=> { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
} |
|||
// 关闭详情弹窗 |
|||
const closeDetail=()=> { |
|||
data.detailShow = false; |
|||
} |
|||
const handleSelectionChange(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val)=> { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
} |
|||
const handleSure=(val)=> { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
} |
|||
// 添加行 |
|||
const addRow=(val)=> { |
|||
data.studentInfo.push(val); |
|||
} |
|||
// 编辑行 |
|||
const editRow=(val)=> { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
} |
|||
// 关闭详情弹窗 |
|||
const closeDetail=()=> { |
|||
data.detailShow = false; |
|||
} |
|||
const handleSelectionChange=(val) { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val)=> { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
} |
|||
const handleSure=(val)=> { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
} |
|||
// 添加行 |
|||
const addRow=(val)=> { |
|||
data.studentInfo.push(val); |
|||
} |
|||
// 编辑行 |
|||
const editRow=(val)=> { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
} |
|||
// 关闭详情弹窗 |
|||
const closeDetail=()=> { |
|||
data.detailShow = false; |
|||
} |
|||
const handleSelectionChange=(val)=> { |
|||
multipleSelection.value = val; |
|||
}, |
|||
handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val)=> { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
} |
|||
const handleSure=(val)=> { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
} |
|||
// 添加行 |
|||
const addRow=(val)=> { |
|||
data.studentInfo.push(val); |
|||
} |
|||
// 编辑行 |
|||
const editRow=(val)=> { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
} |
|||
// 关闭详情弹窗 |
|||
const closeDetail=()=> { |
|||
data.detailShow = false; |
|||
} |
|||
const handleSelectionChange=(val)=> { |
|||
multipleSelection.value = val; |
|||
} |
|||
const handleBatchDelete() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val)=> { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
} |
|||
const handleSure=(val)=> { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
} |
|||
// 添加行 |
|||
const addRow=(val)=> { |
|||
data.studentInfo.push(val); |
|||
} |
|||
// 编辑行 |
|||
const editRow=(val)=> { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
} |
|||
// 关闭详情弹窗 |
|||
const closeDetail=()=> { |
|||
data.detailShow = false; |
|||
} |
|||
const handleSelectionChange=(val)=> { |
|||
multipleSelection.value = val; |
|||
} |
|||
const handleBatchDelete=() { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val)=> { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
} |
|||
const handleSure=(val)=> { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
} |
|||
// 添加行 |
|||
const addRow=(val)=> { |
|||
data.studentInfo.push(val); |
|||
} |
|||
// 编辑行 |
|||
const editRow=(val)=> { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
} |
|||
// 关闭详情弹窗 |
|||
const closeDetail=()=> { |
|||
data.detailShow = false; |
|||
} |
|||
const handleSelectionChange=(val)=> { |
|||
multipleSelection.value = val; |
|||
} |
|||
const handleBatchDelete=()=> { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
}, |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val)=> { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
} |
|||
const handleSure=(val)=> { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
} |
|||
// 添加行 |
|||
const addRow=(val)=> { |
|||
data.studentInfo.push(val); |
|||
} |
|||
// 编辑行 |
|||
const editRow=(val)=> { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
} |
|||
// 关闭详情弹窗 |
|||
const closeDetail=()=> { |
|||
data.detailShow = false; |
|||
} |
|||
const handleSelectionChange=(val)=> { |
|||
multipleSelection.value = val; |
|||
} |
|||
const handleBatchDelete=()=> { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
} |
|||
handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val)=> { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
} |
|||
const handleSure=(val)=> { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
} |
|||
// 添加行 |
|||
const addRow=(val)=> { |
|||
data.studentInfo.push(val); |
|||
} |
|||
// 编辑行 |
|||
const editRow=(val)=> { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
} |
|||
// 关闭详情弹窗 |
|||
const closeDetail=()=> { |
|||
data.detailShow = false; |
|||
} |
|||
const handleSelectionChange=(val)=> { |
|||
multipleSelection.value = val; |
|||
} |
|||
const handleBatchDelete=()=> { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
} |
|||
const handleSave(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<div> |
|||
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
|||
<el-button type="warning" :icon="Star" circle size="large" |
|||
><el-icon><RefreshRight /></el-icon |
|||
></el-button> |
|||
<span> |
|||
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
|||
<el-input |
|||
v-model="searchName" |
|||
style="width: 170px" |
|||
placeholder="问题" |
|||
size="large" |
|||
></el-input> |
|||
<el-button type="success" style="width: 80px" size="large" @click="getUserList" |
|||
>查询</el-button |
|||
> |
|||
</el-form-item> |
|||
</span> |
|||
<el-table |
|||
ref="multipleTableRef" |
|||
:data="studentInfo" border |
|||
stripe |
|||
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
|||
@selection-change="handleSelectionChange" > |
|||
<el-table-column type="selection"/> |
|||
<el-table-column prop="name" label="问题" /> |
|||
<el-table-column prop="sex" label="提问人" /> |
|||
<el-table-column prop="age" label="阅读量" /> |
|||
<el-table-column prop="abe" label="赞" /> |
|||
<el-table-column prop="ade" label="踩" /> |
|||
<el-table-column prop="age" label="评论" /> |
|||
<el-table-column prop="age" label="回答人数" /> |
|||
<el-table-column prop="abc" label="状态" width="120"> |
|||
<template #default="row"> |
|||
<el-switch v-model="row.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="num" label="时间"/> |
|||
<el-table-column fixed="right" label="操作"> |
|||
<template #default="{ row }"> |
|||
<div class="button-container"> |
|||
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
|||
>查看答案列表</el-button |
|||
> |
|||
<span> |
|||
<el-button type="danger" size="default" class="button-margin" |
|||
>下架</el-button |
|||
> |
|||
</span> |
|||
<div class="ooo"> |
|||
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
|||
>删除</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 详情弹窗 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
|||
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
|||
import { Timer } from "@element-plus/icons-vue"; |
|||
import axios from "axios"; // 导入公理函数库 |
|||
// eslint-disable-next-line vue/no-reserved-component-names |
|||
const data = reactive({ |
|||
dialogShow: false, // 新增/编辑弹框 |
|||
rowInfo: {}, // 新增/编辑的数据 |
|||
title: "", // 是新建还是修改 |
|||
queryInfo:{ |
|||
query:'', |
|||
pagenum:1, |
|||
pagesize:'', |
|||
}, |
|||
form: { |
|||
name: "", |
|||
region: "", |
|||
date1: "", |
|||
date2: "", |
|||
delivery: false, |
|||
type: [], |
|||
resource: "", |
|||
desc: "", |
|||
section: "", |
|||
position: "", |
|||
column: "", |
|||
}, |
|||
studentInfo: studentInfo, |
|||
}); |
|||
const imageUrl = ref(''); |
|||
// 处理子组件传递的图片数据 |
|||
const handleImageUploaded = (imageUrlFromChild) => { |
|||
// 将传递的图片数据存储到状态中 |
|||
imageUrl.value = imageUrlFromChild; |
|||
}; |
|||
const jokeMes = ref([]) // 表格数据 |
|||
const temJokeMes = ref([]) // 临时表格数据 |
|||
const searchName = ref(""); // 用于查询的输入值 |
|||
const filterTableData = computed(() => |
|||
data.studentInfo.filter( |
|||
(item) => !searchName.value || item.name.includes(searchName.value) |
|||
) |
|||
); |
|||
const multipleSelection = ref([]); |
|||
const handleNew=()=> { |
|||
data.title = "新增"; |
|||
data.rowInfo = {}; |
|||
data.dialogShow = true; |
|||
} |
|||
const handleEdit=(val)=> { |
|||
data.title = "答案列表"; |
|||
data.dialogShow = true; |
|||
data.rowInfo = val; |
|||
} |
|||
const handleDel=(val)=> { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
method.handleSure(val); |
|||
}) |
|||
.catch(() => { |
|||
// 捕获错误 |
|||
}); |
|||
} |
|||
const handleSure=(val)=> { |
|||
this.dialogVisible = false; |
|||
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
|||
data.studentInfo.splice(index, 1); |
|||
} |
|||
// 添加行 |
|||
const addRow=(val)=> { |
|||
data.studentInfo.push(val); |
|||
} |
|||
// 编辑行 |
|||
const editRow=(val)=> { |
|||
let index = data.studentInfo.findIndex( |
|||
(item, index) => item.id === val.id |
|||
); |
|||
data.studentInfo.splice(index, 1, val); |
|||
} |
|||
// 关闭详情弹窗 |
|||
const closeDetail=()=> { |
|||
data.detailShow = false; |
|||
} |
|||
const handleSelectionChange=(val)=> { |
|||
multipleSelection.value = val; |
|||
} |
|||
const handleBatchDelete=()=> { |
|||
if (multipleSelection.value.length === 0) { |
|||
ElMessageBox.alert("请选择要删除的数据", "提示", { |
|||
confirmButtonText: "确定", |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
data.studentInfo = data.studentInfo.filter( |
|||
(item) => !multipleSelection.value.includes(item) |
|||
); |
|||
multipleSelection.value = []; // 清除选择 |
|||
}) |
|||
.catch(() => { |
|||
// 用户取消删除 |
|||
}); |
|||
} |
|||
const handleSave=(formData) { |
|||
formData.id = this.studentInfo.length + 1; //生成唯一ID |
|||
data.studentInfo.push(formData); // 将新数据添加到阵列 |
|||
}, |
|||
async getUserList() { |
|||
// 这里调用接口来获取新的数据 |
|||
try { |
|||
const response = await axios.get("your_api_url", { |
|||
params: { |
|||
query: searchName.value, // 传递查询条件 |
|||
}, |
|||
}); |
|||
|
|||
// 更新 data.studentInfo 或其他操作,例如: |
|||
data.studentInfo = response.data; |
|||
} catch (error) { |
|||
// 处理错误 |
|||
} |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
*{ |
|||
font-weight: bolder; |
|||
font-size:15px; |
|||
} |
|||
.aaa { |
|||
position: absolute; |
|||
left: 1350px; |
|||
top: 0px; |
|||
margin: 10px 0; |
|||
font-weight: bolder; |
|||
} |
|||
.button-margin { |
|||
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
|||
} |
|||
.button-container { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; /* 居中对齐 */ |
|||
} |
|||
:deep(.el-table th){ |
|||
font-weight: bold; /* 设置表头字体加粗 */ |
|||
color: #333; /* 设置表头字体颜色 */ |
|||
} |
|||
</style> |
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue