|
|
@ -3,10 +3,14 @@ |
|
|
|
<div class="item"> |
|
|
|
<div class="item"> |
|
|
|
<div class="status-setting"> |
|
|
|
<div class="status-setting"> |
|
|
|
<div class="left" |
|
|
|
<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"> |
|
|
|
<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> |
|
|
|
<template #content> |
|
|
|
<p class="setting-item" @click="edit">编辑</p> |
|
|
|
<p class="setting-item" @click="edit">编辑</p> |
|
|
|
<p class="setting-item" @click="del">删除</p> |
|
|
|
<p class="setting-item" @click="del">删除</p> |
|
|
@ -32,10 +36,10 @@ |
|
|
|
</ul> |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="footer"> |
|
|
|
<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-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-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="submt status-1" v-if="data.state == 2" @click.stop="bindProject(data.id)">配置年度比赛</div> |
|
|
|
<!-- <div |
|
|
|
<!-- <div |
|
|
|
class="left" |
|
|
|
class="left" |
|
|
@ -56,6 +60,8 @@ |
|
|
|
<script lang="ts" setup> |
|
|
|
<script lang="ts" setup> |
|
|
|
import { watch, ref } from 'vue'; |
|
|
|
import { watch, ref } from 'vue'; |
|
|
|
import SvgIcon from '/@/components/Icon/src/SvgIcon.vue'; |
|
|
|
import SvgIcon from '/@/components/Icon/src/SvgIcon.vue'; |
|
|
|
|
|
|
|
import { bingProjectApi } from '../AnnualComp.api'; |
|
|
|
|
|
|
|
|
|
|
|
import { useRouter } from 'vue-router'; |
|
|
|
import { useRouter } from 'vue-router'; |
|
|
|
const router = useRouter(); |
|
|
|
const router = useRouter(); |
|
|
|
const props = defineProps({ |
|
|
|
const props = defineProps({ |
|
|
@ -64,7 +70,7 @@ |
|
|
|
required: true, |
|
|
|
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); |
|
|
|
const data = ref(props.data); |
|
|
|
console.log(props, 'props'); |
|
|
|
console.log(props, 'props'); |
|
|
|
|
|
|
|
|
|
|
@ -76,8 +82,8 @@ |
|
|
|
emits('delChange', data); |
|
|
|
emits('delChange', data); |
|
|
|
}; |
|
|
|
}; |
|
|
|
const info = () => { |
|
|
|
const info = () => { |
|
|
|
emits('infoChange',data) |
|
|
|
emits('infoChange', data); |
|
|
|
} |
|
|
|
}; |
|
|
|
watch( |
|
|
|
watch( |
|
|
|
() => props.data, |
|
|
|
() => props.data, |
|
|
|
(newVal) => { |
|
|
|
(newVal) => { |
|
|
@ -85,21 +91,28 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
); |
|
|
|
); |
|
|
|
const submit = () => { |
|
|
|
const submit = () => { |
|
|
|
emits('submitChange',data) |
|
|
|
emits('submitChange', data); |
|
|
|
} |
|
|
|
}; |
|
|
|
const enable = () => { |
|
|
|
const enable = () => { |
|
|
|
emits('enableChange',data) |
|
|
|
emits('enableChange', data); |
|
|
|
} |
|
|
|
}; |
|
|
|
const deactivate = () => { |
|
|
|
const deactivate = () => { |
|
|
|
emits('deactivateChange',data) |
|
|
|
emits('deactivateChange', data); |
|
|
|
} |
|
|
|
}; |
|
|
|
const goTo = (id) => { |
|
|
|
const goTo = async() => { |
|
|
|
router.push('/compp/annualcompaward'); |
|
|
|
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) => { |
|
|
|
const bindProject = (id) => { |
|
|
|
emits('bindProjectChange',id) |
|
|
|
emits('bindProjectChange', id); |
|
|
|
} |
|
|
|
}; |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<style lang="less" scoped> |
|
|
|
<style lang="less" scoped> |
|
|
@ -107,7 +120,6 @@ |
|
|
|
padding: 0 !important; |
|
|
|
padding: 0 !important; |
|
|
|
} |
|
|
|
} |
|
|
|
.setting-item { |
|
|
|
.setting-item { |
|
|
|
|
|
|
|
|
|
|
|
text-align: center; |
|
|
|
text-align: center; |
|
|
|
height: 30px; |
|
|
|
height: 30px; |
|
|
|
line-height: 30px; |
|
|
|
line-height: 30px; |
|
|
@ -115,7 +127,7 @@ |
|
|
|
margin: 0; |
|
|
|
margin: 0; |
|
|
|
} |
|
|
|
} |
|
|
|
.setting-item:hover { |
|
|
|
.setting-item:hover { |
|
|
|
color: #00c7be; |
|
|
|
color: #00c7be; |
|
|
|
} |
|
|
|
} |
|
|
|
.item { |
|
|
|
.item { |
|
|
|
width: 356px; |
|
|
|
width: 356px; |
|
|
|