'对接比赛奖项管理'

gst2base
JayChou 20 hours ago
parent d2d299b15e
commit 1d1879ca1d
  1. 50
      jeecgboot-vue3-master/src/views/annualcomp/uncommitted/components/cardItem.vue
  2. 5
      jeecgboot-vue3-master/src/views/annualcompaward/AnnualCompAwardList.vue

@ -3,10 +3,14 @@
<div class="item">
<div class="status-setting">
<div class="left"
><SvgIcon :name="data.state == 0 ? 'status0' : data.state == 1 ? 'status1' : data.state == 2 ? 'status2' : data.state == 3 ? 'status3' : ''" /><div :class="data.state == 0 ? 'color0' : data.state == 1 ? 'color1' : data.state == 2 ? 'color2' : data.state == 3 ? 'color3' : ''">{{ data.state_dictText }}</div></div
><SvgIcon
:name="data.state == 0 ? 'status0' : data.state == 1 ? 'status1' : data.state == 2 ? 'status2' : data.state == 3 ? 'status3' : ''"
/><div :class="data.state == 0 ? 'color0' : data.state == 1 ? 'color1' : data.state == 2 ? 'color2' : data.state == 3 ? 'color3' : ''">{{
data.state_dictText
}}</div></div
>
<div class="right">
<a-popover placement="bottomLeft" v-if="data.state == 0 || data.state == 3 ">
<a-popover placement="bottomLeft" v-if="data.state == 0 || data.state == 3">
<template #content>
<p class="setting-item" @click="edit">编辑</p>
<p class="setting-item" @click="del">删除</p>
@ -32,10 +36,10 @@
</ul>
</div>
<div class="footer">
<div class="submt status-1" @click.stop="submit" v-if="data.state == 0 || data.state == 3 ">{{ data.state == 3 ? '重新提交' : '提交' }}</div>
<div class="submt status-1" @click.stop="submit" v-if="data.state == 0 || data.state == 3">{{ data.state == 3 ? '重新提交' : '提交' }}</div>
<div class="submt status-2" @click.stop="enable" v-if="data.state == 2 && data.isopen == 0">启用</div>
<div class="submt status-3" @click.stop="deactivate" v-if="data.state == 2 && data.isopen == 1">停用</div>
<div class="submt status-1" v-if="data.state == 2" @click.stop="goTo(data.id)">比赛奖项管理</div>
<div class="submt status-1" v-if="data.state == 2" @click.stop="goTo()">比赛奖项管理</div>
<div class="submt status-1" v-if="data.state == 2" @click.stop="bindProject(data.id)">配置年度比赛</div>
<!-- <div
class="left"
@ -56,6 +60,8 @@
<script lang="ts" setup>
import { watch, ref } from 'vue';
import SvgIcon from '/@/components/Icon/src/SvgIcon.vue';
import { bingProjectApi } from '../AnnualComp.api';
import { useRouter } from 'vue-router';
const router = useRouter();
const props = defineProps({
@ -64,7 +70,7 @@
required: true,
},
});
const emits = defineEmits(['editChange', 'delChange','infoChange','submitChange','enableChange','deactivateChange','bindProjectChange']);
const emits = defineEmits(['editChange', 'delChange', 'infoChange', 'submitChange', 'enableChange', 'deactivateChange', 'bindProjectChange']);
const data = ref(props.data);
console.log(props, 'props');
@ -76,8 +82,8 @@
emits('delChange', data);
};
const info = () => {
emits('infoChange',data)
}
emits('infoChange', data);
};
watch(
() => props.data,
(newVal) => {
@ -85,21 +91,28 @@
}
);
const submit = () => {
emits('submitChange',data)
}
emits('submitChange', data);
};
const enable = () => {
emits('enableChange',data)
}
emits('enableChange', data);
};
const deactivate = () => {
emits('deactivateChange',data)
}
const goTo = (id) => {
router.push('/compp/annualcompaward');
}
emits('deactivateChange', data);
};
const goTo = async() => {
console.log(data);
const res = await bingProjectApi({ id: data.value.id });
console.log(res.records[0]);
const form = res.records ? res.records[0] : {};
router.push('/compp/annualcompaward?acpid=' + form.id);
};
//
//
const bindProject = (id) => {
emits('bindProjectChange',id)
}
emits('bindProjectChange', id);
};
</script>
<style lang="less" scoped>
@ -107,7 +120,6 @@
padding: 0 !important;
}
.setting-item {
text-align: center;
height: 30px;
line-height: 30px;

@ -54,6 +54,7 @@
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './AnnualCompAward.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import {useRoute} from "vue-router";
const route = useRoute()
const checkedKeys = ref<Array<string | number>>([]);
//model
@ -73,6 +74,9 @@
fieldMapToNumber: [],
fieldMapToTime: [],
},
beforeFetch: (params) => {
return Object.assign(params, {acpid:route.query.acpid});
},
actionColumn: {
width: 120,
fixed: 'right',
@ -89,7 +93,6 @@
});
const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
const route = useRoute()
/**
* 新增事件
*/

Loading…
Cancel
Save