|
@@ -21,7 +21,7 @@
|
|
|
<template #operation="{data}">
|
|
|
<el-button type="info" @click="showSingleDetail('detail',data)">查看</el-button>
|
|
|
<el-button type="info" @click="showSingleDetail('edit',data)">修改</el-button>
|
|
|
- <el-button type="info" @click="showSingleDetail('detail',data)">删除</el-button>
|
|
|
+ <el-button type="info" @click="deleteDetail(data)">删除</el-button>
|
|
|
</template>
|
|
|
</my-table>
|
|
|
<ele-pagination ref="refEl"
|
|
@@ -58,12 +58,17 @@ import ElePagination from "@/components/common/ElePagination.vue";
|
|
|
import MyTable from "@/components/common/MyTable.vue";
|
|
|
import {Close, Delete, Edit, Plus, Search, SuccessFilled} from "@element-plus/icons-vue";
|
|
|
import {onBeforeMount, ref} from "vue";
|
|
|
-import {combinedRewardAndPunishmentsMeasureManageCaseHistory} from "@/data/all-form";
|
|
|
-import {combinedRewardAndPunishmentsMeasureManageCaseHistorySettingDialogHeader} from "@/data/all-table-header";
|
|
|
+import {combinedRewardAndPunishmentsMeasureManageMatterRuleConnect} from "@/data/all-form";
|
|
|
+import {
|
|
|
+ combinedRewardAndPunishmentsMeasureManageMatterRuleConnectSettingDialogHeader
|
|
|
+} from "@/data/all-table-header";
|
|
|
import {usePagination} from "@/units/use-method/usePagination";
|
|
|
import {
|
|
|
- proSelectXyxxJgfk
|
|
|
+ proDeleteXyxxJgfkDygx,
|
|
|
+ proInsertXyxxJgfkDygx,
|
|
|
+ proSelectXyxxAlxxZdyj, proUpdateXyxxJgfkDygx
|
|
|
} from "@/service/combined-rewards-and-punishments/combined-rewards-and-punishments-case-information/combined-rewards-and-punishments-case-information";
|
|
|
+import {handleMes} from "@/units/element-ui/tip";
|
|
|
|
|
|
export default {
|
|
|
name: "CombinedRewardAndPunishmentsMeasureManageMatterRuleConnectSettingDialog",
|
|
@@ -102,19 +107,13 @@ export default {
|
|
|
setup(props,{emit}){
|
|
|
const formRef = ref(null);
|
|
|
const forms = ref({});
|
|
|
- const formConfig = ref({...combinedRewardAndPunishmentsMeasureManageCaseHistory});
|
|
|
- const headerConfig = ref([...combinedRewardAndPunishmentsMeasureManageCaseHistorySettingDialogHeader]);
|
|
|
+ const formConfig = ref({...combinedRewardAndPunishmentsMeasureManageMatterRuleConnect});
|
|
|
+ const headerConfig = ref([...combinedRewardAndPunishmentsMeasureManageMatterRuleConnectSettingDialogHeader]);
|
|
|
const {pageIndex,pageSize,tableData,totalCount,initSearch,handleSizeChange,refEl} = usePagination(getTableData.bind(null));
|
|
|
const tablePartShow =ref(true);
|
|
|
function getTableData(){
|
|
|
debugger
|
|
|
- proSelectXyxxJgfk({
|
|
|
- id:"",
|
|
|
- dxmc:"",
|
|
|
- dxdm:props.currentDialogObj.DXDM,
|
|
|
- saxx:"",
|
|
|
- start_time:"",
|
|
|
- end_time:"",
|
|
|
+ proSelectXyxxAlxxZdyj({
|
|
|
pageIndex:pageIndex.value,
|
|
|
pageSize:pageSize.value
|
|
|
}).then(res =>{
|
|
@@ -130,16 +129,50 @@ export default {
|
|
|
emit('update:dialogVisible',false);
|
|
|
}
|
|
|
function conform(){
|
|
|
-
|
|
|
+ debugger
|
|
|
+ if(forms.value.ID){ //修改
|
|
|
+ proUpdateXyxxJgfkDygx({
|
|
|
+ code: forms.value.ID,
|
|
|
+ ywsx: forms.value.YWSX,
|
|
|
+ zdyj: forms.value.ZDYJ
|
|
|
+ }).then(res =>{
|
|
|
+ handleMes(res,() => {
|
|
|
+ formClose();
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }else{ //新增
|
|
|
+ proInsertXyxxJgfkDygx({
|
|
|
+ ywsx: forms.value.YWSX,
|
|
|
+ zdyj: forms.value.ZDYJ
|
|
|
+ }).then(res =>{
|
|
|
+ handleMes(res,() => {
|
|
|
+ formClose();
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function deleteDetail(data){
|
|
|
+ proDeleteXyxxJgfkDygx({
|
|
|
+ code: data.ID
|
|
|
+ }).then(res =>{
|
|
|
+ handleMes(res,() => {
|
|
|
+ getTableData()
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
function formClose(){
|
|
|
tablePartShow.value = true;
|
|
|
getTableData()
|
|
|
}
|
|
|
function showSingleDetail(type,data){
|
|
|
+ debugger
|
|
|
tablePartShow.value = false;
|
|
|
formConfig.value.formAttrs.disabled=type === 'detail';
|
|
|
- forms.value = data;
|
|
|
+ if(data){
|
|
|
+ forms.value = data;
|
|
|
+ }else{
|
|
|
+ forms.value = {};
|
|
|
+ }
|
|
|
}
|
|
|
onBeforeMount(res=>{
|
|
|
getTableData()
|
|
@@ -154,7 +187,8 @@ export default {
|
|
|
conform,
|
|
|
formClose,
|
|
|
tablePartShow,
|
|
|
- showSingleDetail
|
|
|
+ showSingleDetail,
|
|
|
+ deleteDetail
|
|
|
}
|
|
|
}
|
|
|
}
|