From 5a1616f169d75ece07d2d12a8edac3e5f660a920 Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: Thu, 08 Sep 2022 09:36:16 +0800
Subject: [PATCH] 合并
---
src/views/goalManagement/Incentivestandard/component/DailogAdd.vue | 147 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 147 insertions(+), 0 deletions(-)
diff --git a/src/views/goalManagement/Incentivestandard/component/DailogAdd.vue b/src/views/goalManagement/Incentivestandard/component/DailogAdd.vue
index e69de29..e910cb5 100644
--- a/src/views/goalManagement/Incentivestandard/component/DailogAdd.vue
+++ b/src/views/goalManagement/Incentivestandard/component/DailogAdd.vue
@@ -0,0 +1,147 @@
+<template>
+ <el-dialog v-model="dialogVisible" :before-close="resetForm" :fullscreen="full" :title="titles" width="50%" draggable>
+ <el-button @click="toggleFullscreen" size="small" class="pot" :icon="FullScreen"></el-button>
+ <el-form :model="form" :disabled="disabled" label-width="120px">
+ <el-row>
+ <el-col :span="11">
+ <el-form-item label="奖惩类型" size="default">
+ <el-select v-model="form.standardType" style="width: 100%" placeholder="请选择">
+ <el-option label="奖励" :value="1" />
+ <el-option label="惩罚" :value="2" />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="11" :offset="2">
+ <el-form-item label="奖惩内容" size="default">
+ <el-input v-model="form.content" />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="11">
+ <el-form-item label="奖惩名称" size="default">
+ <el-input v-model="form.qName" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="11" :offset="2">
+ <el-form-item label="依据" size="default">
+ <el-input v-model="form.reason" />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="备注信息">
+ <el-input v-model="form.memo" type="textarea" />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-form>
+ <template #footer>
+ <span class="dialog-footer">
+ <el-button @click="resetForm" size="default">关闭</el-button>
+ <el-button type="primary" @click="submitForm" size="default" :disabled="disabled">确定</el-button>
+ </span>
+ </template>
+ </el-dialog>
+</template>
+<script lang="ts">
+import { defineComponent, ref, reactive } from 'vue';
+import { Search, FullScreen } from '@element-plus/icons-vue';
+import { goalManagementApi } from '/@/api/goalManagement';
+import { ElMessageBox, ElMessage, ElButton, ElInput, TabsPaneContext } from 'element-plus';
+export default defineComponent({
+ setup(props, { emit }) {
+ let Shows = ref(false);
+ const dialogVisible = ref<boolean>(false);
+ const form = ref({
+ qName: "", ////奖惩名称
+ reason: "", ////依据
+ memo: "", ////备注信息
+ content: "", ////奖惩内容
+ standardType: null ////奖惩类型 1:奖励 2:惩罚
+ });
+ const titles = ref();
+ const disabled = ref(false);
+ // 打开弹窗
+ const openDailog = (title: string, value: any, id: number) => {
+ dialogVisible.value = true;
+ titles.value = `${title}奖惩标准设定`;
+ disabled.value = title == '查看' ? true : false;
+ if (title == '查看' || title == '修改')
+ goalManagementApi()
+ .getrewardPunishmentStandardDetail(id)
+ .then((res) => {
+ if (res.data.code == 200) {
+ form.value = res.data.data;
+ } else {
+ ElMessage.error(res.data.msg);
+ }
+ });
+ };
+ // 提交
+ const submitForm = () => {
+ dialogVisible.value = false;
+ goalManagementApi()
+ .getrewardPunishmentStandardaddOrUpdate(form.value)
+ .then((res) => {
+ if (res.data.code == 200) {
+ ElMessage({
+ message: res.data.msg,
+ type: 'success',
+ });
+ emit('navAddorUpdata');
+ } else {
+ ElMessage.error(res.data.msg);
+ }
+ });
+ form.value = {
+ qName: "", ////奖惩名称
+ reason: "", ////依据
+ memo: "", ////备注信息
+ content: "", ////奖惩内容
+ standardType: null, ////奖惩类型 1:奖励 2:惩罚
+ }
+ };
+ // 取消
+ const resetForm = () => {
+ dialogVisible.value = false;
+ form.value = {
+ qName: "", ////奖惩名称
+ reason: "", ////依据
+ memo: "", ////备注信息
+ content: "", ////奖惩内容
+ standardType: null, ////奖惩类型 1:奖励 2:惩罚
+ };
+ };
+ //全屏
+ const full = ref(false);
+ const toggleFullscreen = () => {
+ if (full.value == false) {
+ full.value = true;
+ } else {
+ full.value = false;
+ }
+ };
+
+ return {
+ form,
+ titles,
+ dialogVisible,
+ openDailog,
+ disabled,
+ Search,
+ submitForm,
+ resetForm,
+ full,
+ toggleFullscreen,
+ FullScreen,
+ };
+ },
+});
+</script>
+<style scoped>
+.el-row {
+ padding: 0 0 20px 0;
+}
+</style>
\ No newline at end of file
--
Gitblit v1.9.2