From 89f61cea248a73be5ce596b2629c7a4d1b5d2de4 Mon Sep 17 00:00:00 2001
From: shj <1790240199@qq.com>
Date: 星期六, 30 七月 2022 11:59:34 +0800
Subject: [PATCH] 对接
---
src/views/facilityManagement/deviceType/component/Dailog.vue | 136 +++++++++-
src/views/goalManagement/performanceAppraisal/component/DailogKhS.vue | 100 +++----
src/views/goalManagement/targetDecompositionYear/component/DailogAdd.vue | 29 +
src/views/facilityManagement/deviceType/index.vue | 97 +++----
src/views/goalManagement/performanceAppraisal/index.vue | 10
src/api/facilityManagement/index.ts | 2
src/views/facilityManagement/InstrumentationInformation/index.vue | 87 ++----
src/views/goalManagement/targetDecompositionYear/component/Dailog.vue | 29 +
src/components/DailogSearchUser/index.vue | 7
src/views/goalManagement/performanceAppraisal/component/DailogKh.vue | 106 +++-----
src/views/goalManagement/performanceAppraisal/component/DailogAq.vue | 122 +++++---
11 files changed, 388 insertions(+), 337 deletions(-)
diff --git a/src/api/facilityManagement/index.ts b/src/api/facilityManagement/index.ts
index 546df74..4e91751 100644
--- a/src/api/facilityManagement/index.ts
+++ b/src/api/facilityManagement/index.ts
@@ -61,7 +61,7 @@
})
},
// 仪器仪表信息、生产设备设施、安全设备设施 统计
- getequipmentInfoStatistics:(params:any)=>{
+ getequipmentInfoStatistics:()=>{
return request({
url:`/equipmentInfo/statistics`,
method:"get"
diff --git a/src/components/DailogSearchUser/index.vue b/src/components/DailogSearchUser/index.vue
index 8b01c27..dd4eb9f 100644
--- a/src/components/DailogSearchUser/index.vue
+++ b/src/components/DailogSearchUser/index.vue
@@ -158,9 +158,11 @@
const radio = (event: any) => {
dynamicTags.value[0] = event;
};
+ const types=ref()
// 开启弹窗
const dialogVisible = ref(false);
- const openDailog = () => {
+ const openDailog = (type:any) => {
+ types.value=type
dialogVisible.value = true;
};
//全屏
@@ -174,10 +176,11 @@
};
const submitForm = () => {
let obj = JSON.parse(JSON.stringify(dynamicTags.value));
- emit('SearchUser', obj[0]);
+ emit('SearchUser', obj[0],types.value);
dialogVisible.value = false;
};
return {
+ types,
filterText,
treeRef,
filterNode,
diff --git a/src/views/facilityManagement/InstrumentationInformation/index.vue b/src/views/facilityManagement/InstrumentationInformation/index.vue
index 9cb55c1..ae6a667 100644
--- a/src/views/facilityManagement/InstrumentationInformation/index.vue
+++ b/src/views/facilityManagement/InstrumentationInformation/index.vue
@@ -119,16 +119,12 @@
</div>
</template>
<script lang="ts">
-import { defineComponent, ref, reactive, watch } from 'vue';
+import { defineComponent, ref, reactive, watch, onMounted } from 'vue';
import updata from '/@/components/updata/updata.vue'
import Dailog from '/@/components/equipmentDailog/Dailog.vue'
-import { ElTree, TabsPaneContext } from 'element-plus';
+import { ElTree, TabsPaneContext,ElMessage} from 'element-plus';
+import { facilityManagementApi } from '/@/api/facilityManagement';
import { EditPen, Plus, Delete, Download, Refresh, Upload } from '@element-plus/icons-vue';
-interface Tree {
- id: number;
- label: string;
- children?: Tree[];
-}
export default defineComponent({
components:{updata,Dailog},
setup() {
@@ -140,10 +136,26 @@
const treeRef = ref<InstanceType<typeof ElTree>>();
const defaultProps = {
- children: 'children',
- label: 'label',
+ lable: 'typeName',
+ children: 'childList',
+ value: 'id',
};
-
+ // 树形
+ const listApiTree = () => {
+ facilityManagementApi()
+ .getequipmentTypeMngTreeData()
+ .then((res) => {
+ if (res.data.code == 200) {
+ data.value = res.data.data;
+ } else {
+ ElMessage({
+ showClose: true,
+ message: res.data.msg,
+ type: 'error',
+ });
+ }
+ });
+ };
watch(filterText, (val) => {
treeRef.value!.filter(val);
});
@@ -153,56 +165,10 @@
return data.label.includes(value);
};
- const data: Tree[] = [
- {
- id: 1,
- label: 'Level one 1',
- children: [
- {
- id: 4,
- label: 'Level two 1-1',
- children: [
- {
- id: 9,
- label: 'Level three 1-1-1',
- },
- {
- id: 10,
- label: 'Level three 1-1-2',
- },
- ],
- },
- ],
- },
- {
- id: 2,
- label: 'Level one 2',
- children: [
- {
- id: 5,
- label: 'Level two 2-1',
- },
- {
- id: 6,
- label: 'Level two 2-2',
- },
- ],
- },
- {
- id: 3,
- label: 'Level one 3',
- children: [
- {
- id: 7,
- label: 'Level two 3-1',
- },
- {
- id: 8,
- label: 'Level two 3-2',
- },
- ],
- },
- ];
+ const data=ref([])
+ onMounted(()=>{
+ listApiTree()
+ })
const tableData = [
{
date: '2016-05-03',
@@ -254,6 +220,7 @@
ShowD.value.openDailog(false)
}
return {
+ listApiTree,
activeName,
handleClick,
ruleForm,
diff --git a/src/views/facilityManagement/deviceType/component/Dailog.vue b/src/views/facilityManagement/deviceType/component/Dailog.vue
index 92c73cf..4859882 100644
--- a/src/views/facilityManagement/deviceType/component/Dailog.vue
+++ b/src/views/facilityManagement/deviceType/component/Dailog.vue
@@ -1,42 +1,39 @@
<template>
<el-dialog v-model="dialogVisible" :fullscreen="full" :title="titles" width="50%" draggable>
<el-button @click="toggleFullscreen" size="small" class="pot" :icon="FullScreen"></el-button>
- <el-form :model="form" label-width="120px">
+ <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.region" placeholder="请选择" style="width: 100%">
- <el-option label="1">是</el-option>
- <el-option label="2">否</el-option>
+ <el-select v-model="form.isContent" placeholder="请选择" style="width: 100%">
+ <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-select v-model="form.region" placeholder="请选择" style="width: 100%">
- <el-option label="Zone one" value="shanghai" />
- <el-option label="Zone two" value="beijing" />
- </el-select>
+ <el-tree-select v-model="form.parentId" :data="data" :props="propse" class="w100" placeholder="请选择" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="类别名称" size="default">
- <el-input v-model="form.name" />
+ <el-input v-model="form.typeName" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="2">
<el-form-item label="排列序列" size="default">
- <el-input v-model="form.name" />
+ <el-input v-model="form.sortNum" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<span class="dialog-footer">
- <el-button @click="dialogVisible = false">关闭</el-button>
- <el-button type="primary" @click="dialogVisible = false">确定</el-button>
+ <el-button @click="resetForm">关闭</el-button>
+ <el-button type="primary" @click="submitForm">确定</el-button>
</span>
</template>
</el-dialog>
@@ -44,18 +41,112 @@
<script lang="ts">
import { defineComponent, ref } from 'vue';
import { FullScreen } from '@element-plus/icons-vue';
+import { facilityManagementApi } from '/@/api/facilityManagement';
+import { ElMessage } from 'element-plus';
export default defineComponent({
- setup() {
+ setup(prpos, { emit }) {
const dialogVisible = ref(false);
const form = ref({
-
+ isContent: '', ////是否为设备内容 1:是 2:否
+ typeName: '', ////类别名称
+ parentId: 0, ////父级ID,如果没有父级,为0
+ isCheck: 1, ////是否检测 1:是 2:否
+ isVisit: 1, ////是否巡检 1:是 2:否
+ sortNum: '', //排列序列
+ id: '', //设备类型ID ,更新时必填
});
- const titles=ref()
- const openDailog = (title:string,id:number) => {
+ const titles = ref();
+ const disabled = ref(false);
+ const openDailog = (title: string, id: number) => {
+ listApi();
dialogVisible.value = true;
- titles.value=`${title}设备设施类型管理`
-
-
+ titles.value = `${title}设备设施类型管理`;
+ if (title == '查看') {
+ disabled.value = true;
+ detail(id);
+ } else if (title == '修改') {
+ detail(id);
+ } else if (title == '添加') {
+ // detail(id);
+ }
+ };
+ const detail = (id: number) => {
+ facilityManagementApi()
+ .getequipmentTypeMngDetail(id)
+ .then((res) => {
+ if (res.data.code == 200) {
+ form.value = res.data.data;
+ } else {
+ ElMessage({
+ showClose: true,
+ message: res.data.msg,
+ type: 'error',
+ });
+ }
+ });
+ };
+ // 列表
+ const listApi = () => {
+ facilityManagementApi()
+ .getequipmentTypeMngTreeData()
+ .then((res) => {
+ if (res.data.code == 200) {
+ data.value = res.data.data;
+ } else {
+ ElMessage({
+ showClose: true,
+ message: res.data.msg,
+ type: 'error',
+ });
+ }
+ });
+ };
+ const data = ref();
+ const propse = {
+ lable: 'typeName',
+ children: 'childList',
+ value: 'id',
+ };
+ const submitForm = () => {
+ facilityManagementApi()
+ .getequipmentTypeMngAddOrUpdate(form.value)
+ .then((res) => {
+ if (res.data.code == 200) {
+ dialogVisible.value = false;
+ ElMessage({
+ showClose: true,
+ message: res.data.msg,
+ type: 'success',
+ });
+ emit('onAdd');
+ } else {
+ ElMessage({
+ showClose: true,
+ message: res.data.msg,
+ type: 'error',
+ });
+ }
+ });
+ form.value = {
+ isContent: '', ////是否为设备内容 1:是 2:否
+ typeName: '', ////类别名称
+ parentId: 0, ////父级ID,如果没有父级,为0
+ isCheck: 0, ////是否检测 1:是 2:否
+ isVisit: 0, ////是否巡检 1:是 2:否
+ sortNum: '', //排列序列
+ id: '', //设备类型ID ,更新时必填
+ };
+ };
+ const resetForm = () => {
+ form.value = {
+ isContent: '', ////是否为设备内容 1:是 2:否
+ typeName: '', ////类别名称
+ parentId: 0, ////父级ID,如果没有父级,为0
+ isCheck: 0, ////是否检测 1:是 2:否
+ isVisit: 0, ////是否巡检 1:是 2:否
+ sortNum: '', //排列序列
+ id: '', //设备类型ID ,更新时必填
+ };
};
//全屏
const full = ref(false);
@@ -67,6 +158,13 @@
}
};
return {
+ detail,
+ listApi,
+ propse,
+ submitForm,
+ resetForm,
+ data,
+ disabled,
dialogVisible,
form,
titles,
diff --git a/src/views/facilityManagement/deviceType/index.vue b/src/views/facilityManagement/deviceType/index.vue
index c729541..cf6d0f8 100644
--- a/src/views/facilityManagement/deviceType/index.vue
+++ b/src/views/facilityManagement/deviceType/index.vue
@@ -1,7 +1,7 @@
<template>
<div class="box">
- <el-button type="primary" :icon="Plus" @click="openD('新建')" size="default">新建</el-button>
- <el-table :data="tableData" style="width: 100%" row-key="id" default-expand-all>
+ <el-button type="primary" :icon="Plus" @click="openD('新建', 0)" size="default">新建</el-button>
+ <el-table :data="tableData" style="width: 100%" row-key="id" :tree-props="propse">
<el-table-column align="center" label="是否为设备内容">
<template #default="scope">
<span v-if="scope.row.isContent == 1">是</span>
@@ -22,15 +22,15 @@
</el-table-column>
<el-table-column align="center" prop="typeName" label="类别名称" />
<el-table-column align="center" label="操作">
- <template #default>
- <el-button type="primary" link :icon="View" @click="openD('查看')">查看</el-button>
- <el-button type="primary" link :icon="EditPen" @click="openD('修改')">修改</el-button>
- <el-button type="primary" link :icon="Delete">删除</el-button>
- <el-button type="primary" link :icon="CirclePlus" @click="openD('添加')">添加下级设备设施类型管理</el-button>
+ <template #default="scope">
+ <el-button type="primary" link :icon="View" @click="openD('查看', scope.row.id)">查看</el-button>
+ <el-button type="primary" link :icon="EditPen" @click="openD('修改', scope.row.id)">修改</el-button>
+ <el-button type="primary" link :icon="Delete" @click="Delete(scope.row.id)">删除</el-button>
+ <el-button type="primary" link :icon="CirclePlus" @click="openD('添加', scope.row.id)">添加下级设备设施类型管理</el-button>
</template>
</el-table-column>
</el-table>
- <Dailog ref="Show"></Dailog>
+ <Dailog ref="Show" @onAdd="add"></Dailog>
</div>
</template>
<script lang="ts">
@@ -42,6 +42,7 @@
export default defineComponent({
components: { Dailog },
setup() {
+ // 列表
const listApi = () => {
facilityManagementApi()
.getequipmentTypeMngTreeData()
@@ -51,7 +52,7 @@
} else {
ElMessage({
showClose: true,
- message: 'Oops, this is a error message.',
+ message: res.data.msg,
type: 'error',
});
}
@@ -60,65 +61,49 @@
onMounted(() => {
listApi();
});
- const tableData = ref([
- {
- id: 1,
- date: '2016-05-02',
- name: 'wangxiaohu',
- },
- {
- id: 2,
- date: '2016-05-04',
- name: 'wangxiaohu',
- },
- {
- id: 3,
- date: '2016-05-01',
- name: 'wangxiaohu',
- children: [
- {
- id: 31,
- date: '2016-05-01',
- name: 'wangxiaohu',
- children: [
- {
- id: 35,
- date: '2016-05-01',
- name: 'wangxiaohu',
- },
- {
- id: 36,
- date: '2016-05-01',
- name: 'wangxiaohu',
- },
- ],
- },
- {
- id: 32,
- date: '2016-05-01',
- name: 'wangxiaohu',
- },
- ],
- },
- {
- id: 4,
- date: '2016-05-03',
- name: 'wangxiaohu',
- },
- ]);
+ // 删除
+ const Delete = (id: number) => {
+ facilityManagementApi()
+ .getequipmentTypeMngDelete(id)
+ .then((res) => {
+ if (res.data.code == 200) {
+ ElMessage({
+ showClose: true,
+ message: res.data.msg,
+ type: 'success',
+ });
+ listApi();
+ } else {
+ ElMessage({
+ showClose: true,
+ message: res.data.msg,
+ type: 'error',
+ });
+ }
+ });
+ };
+ const add = () => {
+ listApi();
+ };
+ const tableData = ref();
+ const propse = {
+ children: 'childList',
+ };
const Show = ref();
const openD = (title: string, id: number) => {
Show.value.openDailog(title, id);
};
return {
+ propse,
+ add,
tableData,
Show,
+ Delete,
openD,
listApi,
Plus,
View,
EditPen,
- Delete,
CirclePlus,
};
},
diff --git a/src/views/goalManagement/performanceAppraisal/component/DailogAq.vue b/src/views/goalManagement/performanceAppraisal/component/DailogAq.vue
index b4edf49..fdc54be 100644
--- a/src/views/goalManagement/performanceAppraisal/component/DailogAq.vue
+++ b/src/views/goalManagement/performanceAppraisal/component/DailogAq.vue
@@ -10,14 +10,14 @@
</el-col>
<el-col :span="11" :offset="2">
<el-form-item label="考核日期" size="default">
- <el-input v-model="form.examineDate" />
+ <el-date-picker v-model="form.examineDate" format="YYYY-MM-DD HH:mm:ss" type="datetime" placeholder="请选择" style="width: 100%" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
- <el-form-item label="合格分数" size="default">
- <el-input v-model="form.name" />
+ <el-form-item label="合格分数" size="default">
+ <el-input v-model="form.name" disabled />
</el-form-item>
</el-col>
<el-col :span="11" :offset="2">
@@ -29,16 +29,13 @@
<el-row>
<el-col :span="11">
<el-form-item label="考核部门" size="default">
- <el-select v-model="form.examineDepartmentId" style="width: 100%" placeholder="请选择">
- <el-option label="Zone one" value="shanghai" />
- <el-option label="Zone two" value="beijing" />
- </el-select>
+ <el-tree-select v-model="form.examineDepartmentId" :data="data" class="w100" :props="propse" placeholder="请选择" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="2">
<el-form-item label="考核人" size="default">
<el-input v-model="form.examinePersonId">
- <template #append> <el-button :icon="Search" @click="daiInpt" /></template>
+ <template #append> <el-button :icon="Search" @click="daiInpt(1)" /></template>
</el-input>
</el-form-item>
</el-col>
@@ -46,16 +43,13 @@
<el-row>
<el-col :span="11">
<el-form-item label="被考核部门" size="default">
- <el-select v-model="form.beExaminedDepartmentId" style="width: 100%" placeholder="请选择">
- <el-option label="Zone one" value="shanghai" />
- <el-option label="Zone two" value="beijing" />
- </el-select>
+ <el-tree-select v-model="form.beExaminedDepartmentId" :data="data" class="w100" :props="propse" placeholder="请选择" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="2">
<el-form-item label="被考核人" size="default">
<el-input v-model="form.beExaminedPersonId">
- <template #append> <el-button :icon="Search" @click="daiInpt" /></template>
+ <template #append> <el-button :icon="Search" @click="daiInpt(2)" /></template>
</el-input>
</el-form-item>
</el-col>
@@ -84,8 +78,8 @@
</el-row>
<el-row>
<el-col :span="11">
- <el-form-item label="考核模板" size="default">
- <el-input v-model="form.examineTemplateId">
+ <el-form-item label="考核模板" size="default">
+ <el-input disabled v-model="form.examineTemplateId">
<template #append> <el-button :icon="Search" @click="daiAdd" /></template>
</el-input>
</el-form-item>
@@ -122,7 +116,7 @@
</template>
</el-dialog>
<DailogSearch ref="Show"></DailogSearch>
- <DailogSearchUser ref="Shows"></DailogSearchUser>
+ <DailogSearchUser ref="Shows" @SearchUser="userId"></DailogSearchUser>
</template>
<script lang="ts">
import { defineComponent, ref, reactive } from 'vue';
@@ -137,23 +131,24 @@
setup(props, { emit }) {
const dialogVisible = ref<boolean>(false);
const form = ref({
- beExaminedDepartmentId: 8, ////被考核部门ID/外键
- beExaminedPersonId: '6', ////被考核人ID/外键(可能有多个,用逗号隔开)
- examineDate: 1658387422569, ////考核日期
- examineDepartmentId: 7, ////考核部门ID/外键
- examinePersonId: '5', ////考核人ID/外键
- examineTemplateId: 0, ////绩效考核模板ID/外键
- examineTotalNumber: '3', ////总分
+ beExaminedDepartmentId: '', ////被考核部门ID/外键
+ beExaminedPersonId: '', ////被考核人ID/外键(可能有多个,用逗号隔开)
+ examineDate: '', ////考核日期
+ examineDepartmentId: '', ////考核部门ID/外键
+ examinePersonId: '', ////考核人ID/外键
+ examineTemplateId: 1, ////绩效考核模板ID/外键
+ examineTotalNumber: '', ////总分
extraFile: '9', //责任书附件
- itemDetail: '2', ////考核项目
- memo: '4', ////备注信息
+ itemDetail: '', ////考核项目
+ memo: '', ////备注信息
numberDetailJson: '[{"id":"123","number":"123"}]', ////各个考核项目的具体得分,json格式。形式为:[{“id”:"123","number":"123"}]
- title: '1', ////考核标题
+ title: '', ////考核标题
});
const titles = ref();
const disabled = ref(false);
// 打开弹窗
const openDailog = (title: string, value: any, id: number) => {
+ department()
dialogVisible.value = true;
titles.value = `${title}安全考核管理`;
disabled.value = title == '查看' ? true : false;
@@ -185,39 +180,39 @@
}
});
form.value = {
- beExaminedDepartmentId: 8, ////被考核部门ID/外键
- beExaminedPersonId: '6', ////被考核人ID/外键(可能有多个,用逗号隔开)
- examineDate: 1658387422569, ////考核日期
- examineDepartmentId: 7, ////考核部门ID/外键
- examinePersonId: '5', ////考核人ID/外键
- examineTemplateId: 0, ////绩效考核模板ID/外键
- examineTotalNumber: '3', ////总分
+ beExaminedDepartmentId: '', ////被考核部门ID/外键
+ beExaminedPersonId: '', ////被考核人ID/外键(可能有多个,用逗号隔开)
+ examineDate: '', ////考核日期
+ examineDepartmentId: '', ////考核部门ID/外键
+ examinePersonId: '', ////考核人ID/外键
+ examineTemplateId: '', ////绩效考核模板ID/外键
+ examineTotalNumber: '', ////总分
extraFile: '9', //责任书附件
- itemDetail: '2', ////考核项目
- memo: '4', ////备注信息
+ itemDetail: '', ////考核项目
+ memo: '', ////备注信息
numberDetailJson: '[{"id":"123","number":"123"}]', ////各个考核项目的具体得分,json格式。形式为:[{“id”:"123","number":"123"}]
- title: '1', ////考核标题
+ title: '', ////考核标题
};
};
// 取消
const resetForm = () => {
dialogVisible.value = false;
form.value = {
- beExaminedDepartmentId: 8, ////被考核部门ID/外键
- beExaminedPersonId: '6', ////被考核人ID/外键(可能有多个,用逗号隔开)
- examineDate: 1658387422569, ////考核日期
- examineDepartmentId: 7, ////考核部门ID/外键
- examinePersonId: '5', ////考核人ID/外键
- examineTemplateId: 0, ////绩效考核模板ID/外键
- examineTotalNumber: '3', ////总分
+ beExaminedDepartmentId: '', ////被考核部门ID/外键
+ beExaminedPersonId: '', ////被考核人ID/外键(可能有多个,用逗号隔开)
+ examineDate: '', ////考核日期
+ examineDepartmentId: '', ////考核部门ID/外键
+ examinePersonId: '', ////考核人ID/外键
+ examineTemplateId: '', ////绩效考核模板ID/外键
+ examineTotalNumber: '', ////总分
extraFile: '9', //责任书附件
- itemDetail: '2', ////考核项目
- memo: '4', ////备注信息
+ itemDetail: '', ////考核项目
+ memo: '', ////备注信息
numberDetailJson: '[{"id":"123","number":"123"}]', ////各个考核项目的具体得分,json格式。形式为:[{“id”:"123","number":"123"}]
- title: '1', ////考核标题)
+ title: '', ////考核标题
};
};
- const activeName=ref("1")
+ const activeName = ref('1');
// 新增弹窗
const Show = ref();
const daiAdd = () => {
@@ -225,8 +220,8 @@
};
// 安全目标指标弹窗
const Shows = ref();
- const daiInpt = () => {
- Shows.value.openDailog();
+ const daiInpt = (type:any) => {
+ Shows.value.openDailog(type);
};
// 点击上传
const fileList = ref<UploadUserFile[]>([
@@ -258,6 +253,13 @@
() => false
);
};
+ const userId=(val:any,type:any)=>{
+ if(type==1){
+ form.value.examinePersonId=val.uid
+ }else if(type==2){
+ form.value.beExaminedPersonId=val.uid
+ }
+ }
//全屏
const full = ref(false);
const toggleFullscreen = () => {
@@ -267,7 +269,29 @@
full.value = false;
}
};
+ //部门
+ const department = () => {
+ goalManagementApi()
+ .getTreedepartment()
+ .then((res) => {
+ if (res.data.code == 200) {
+ data.value = res.data.data;
+ } else {
+ ElMessage.error(res.data.msg);
+ }
+ });
+ };
+ const propse = {
+ label: 'depName',
+ children: 'children',
+ value:"depId"
+ };
+ const data=ref()
return {
+ department,
+ propse,
+ data,
+ userId,
activeName,
dialogVisible,
form,
diff --git a/src/views/goalManagement/performanceAppraisal/component/DailogKh.vue b/src/views/goalManagement/performanceAppraisal/component/DailogKh.vue
index 215e41f..c76c1fd 100644
--- a/src/views/goalManagement/performanceAppraisal/component/DailogKh.vue
+++ b/src/views/goalManagement/performanceAppraisal/component/DailogKh.vue
@@ -1,5 +1,5 @@
<template>
- <el-dialog v-model="dialogVisible" :fullscreen="full" title="新建考核标准设定" width="60%" draggable>
+ <el-dialog v-model="dialogVisible" :before-close="resetForm" :fullscreen="full" title="新建考核标准设定" width="60%" draggable>
<el-button @click="toggleFullscreen" size="small" class="pot" :icon="FullScreen"></el-button>
<el-form :model="form" label-width="120px">
<el-row>
@@ -11,8 +11,8 @@
<el-col :span="11" :offset="2">
<el-form-item label="适用范围" size="default">
<el-select v-model="form.applyRange" style="width: 100%" placeholder="请选择">
- <el-option label="Zone one" value="shanghai" />
- <el-option label="Zone two" value="beijing" />
+ <el-option label="安全生产xxx" value="1" />
+ <el-option label="安全生产xxx" value="2" />
</el-select>
</el-form-item>
</el-col>
@@ -56,14 +56,14 @@
</el-col>
<el-col :span="11" :offset="2" v-if="clickType">
<el-form-item label="设定日期" size="default">
- <el-date-picker v-model="form.setTimem" type="date" placeholder="Pick a date" style="width: 100%" />
+ <el-date-picker disabled v-model="form.setTimem" format="YYYY-MM-DD HH:mm:ss" type="datetime" placeholder="请选择" style="width: 100%" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-tabs v-model="activeName" class="demo-tabs">
<el-tab-pane label="目标指标分解" name="1">
- <el-button type="primary" size="default" @click="daiAdd">新增</el-button>
+ <el-button type="primary" size="default" @click="daiAdd('新增', '')">新增</el-button>
</el-tab-pane>
</el-tabs>
<el-table :data="form.examineItemList" style="width: 100%">
@@ -73,19 +73,19 @@
<el-table-column align="center" prop="judgeStandard" label="评定标准" />
<el-table-column align="center" prop="memo" label="考核说明" />
<el-table-column align="center" label="操作">
- <template #default>
- <el-button link type="primary">查看</el-button>
+ <template #default="scope">
+ <el-button link type="primary" @click="daiAdd('查看', scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
<template #footer>
<span class="dialog-footer">
- <el-button @click="dialogVisible = false" size="default">关闭</el-button>
+ <el-button @click="resetForm" size="default">关闭</el-button>
<el-button type="primary" @click="submitForm" size="default">确定</el-button>
</span>
</template>
</el-dialog>
- <DailogKhS ref="Show"></DailogKhS>
+ <DailogKhS ref="Show" @onAdd="AddObj"></DailogKhS>
</template>
<script lang="ts">
import { defineComponent, ref, reactive } from 'vue';
@@ -96,37 +96,27 @@
export default defineComponent({
components: { DailogKhS },
setup(props, { emit }) {
- const dialogVisible = ref<boolean>(true);
+ const dialogVisible = ref<boolean>(false);
const form = ref({
- examineItemList: [
- {
- itemType: '111', ////类型
- memo: '5556', //备注
- itemDetail: '2', ////考核项目
- content: '3', ////考核内容
- judgeStandard: '4', ////评定标准
- id: 4,
- },
- ], //考核项目列表
+ examineItemList: [], //考核项目列表
setTimem: 1658386392466,
- memo: '5623', ////备注信息
- templateCode: '666', ////模板分类编码
- title: '12', ////标准标题
+ memo: '', ////备注信息
+ templateCode: '', ////模板分类编码
+ title: '', ////标准标题
setPersonId: 1, //设定人
- acceptanceNumber: '4124', ////合格分数
+ acceptanceNumber: '', ////合格分数
setPersonDepartmentId: 2, //设定人部门
- applyRange: '321', ////适用范围
- id: 2, //当更新时必填
+ applyRange: '', ////适用范围
});
const titles = ref();
const disabled = ref(false);
- const clickType=ref(false)
+ const clickType = ref(false);
// 打开弹窗
const openDailog = (title: string, value: any, id: number) => {
dialogVisible.value = true;
titles.value = `${title}安全考核管理`;
disabled.value = title == '查看' ? true : false;
- if (title == '查看' || title == '修改'){
+ if (title == '查看' || title == '修改') {
goalManagementApi()
.getexamineTemplateDetail(id)
.then((res) => {
@@ -136,10 +126,13 @@
ElMessage.error(res.data.msg);
}
});
- }else{
- clickType.value=true
+ } else {
+ clickType.value = false;
}
-
+ };
+ // 接受传值
+ const AddObj = (val: any) => {
+ form.value.examineItemList.push(val);
};
// 提交
const submitForm = () => {
@@ -158,59 +151,37 @@
}
});
form.value = {
- examineItemList: [
- {
- itemType: '111', ////类型
- memo: '5556', //备注
- itemDetail: '2', ////考核项目
- content: '3', ////考核内容
- judgeStandard: '4', ////评定标准
- id: 4,
- },
- ], //考核项目列表
+ examineItemList: [], //考核项目列表
setTimem: 1658386392466,
-
- memo: '5623', ////备注信息
- templateCode: '666', ////模板分类编码
- title: '12', ////标准标题
+ memo: '', ////备注信息
+ templateCode: '', ////模板分类编码
+ title: '', ////标准标题
setPersonId: 1, //设定人
- acceptanceNumber: '4124', ////合格分数
+ acceptanceNumber: '', ////合格分数
setPersonDepartmentId: 2, //设定人部门
- applyRange: '321', ////适用范围
- id: 2, //当更新时必填
+ applyRange: '', ////适用范围
};
};
// 取消
const resetForm = () => {
dialogVisible.value = false;
form.value = {
- examineItemList: [
- {
- itemType: '111', ////类型
- memo: '5556', //备注
- itemDetail: '2', ////考核项目
- content: '3', ////考核内容
- judgeStandard: '4', ////评定标准
- id: 4,
- },
- ], //考核项目列表
+ examineItemList: [], //考核项目列表
setTimem: 1658386392466,
-
- memo: '5623', ////备注信息
- templateCode: '666', ////模板分类编码
- title: '12', ////标准标题
+ memo: '', ////备注信息
+ templateCode: '', ////模板分类编码
+ title: '', ////标准标题
setPersonId: 1, //设定人
- acceptanceNumber: '4124', ////合格分数
+ acceptanceNumber: '', ////合格分数
setPersonDepartmentId: 2, //设定人部门
- applyRange: '321', ////适用范围
- id: 2, //当更新时必填
+ applyRange: '', ////适用范围
};
};
const activeName = ref('1');
// 新增弹窗
const Show = ref();
- const daiAdd = () => {
- Show.value.openDailog();
+ const daiAdd = (title: string, data: any) => {
+ Show.value.openDailog(title, data);
};
// 安全目标指标弹窗
const Shows = ref();
@@ -229,6 +200,7 @@
return {
form,
dialogVisible,
+ AddObj,
openDailog,
activeName,
titles,
diff --git a/src/views/goalManagement/performanceAppraisal/component/DailogKhS.vue b/src/views/goalManagement/performanceAppraisal/component/DailogKhS.vue
index ec35293..3a44989 100644
--- a/src/views/goalManagement/performanceAppraisal/component/DailogKhS.vue
+++ b/src/views/goalManagement/performanceAppraisal/component/DailogKhS.vue
@@ -1,39 +1,39 @@
<template>
- <el-dialog v-model="dialogVisible" :fullscreen="full" title="新建考核项目" width="50%" draggable>
+ <el-dialog v-model="dialogVisible" :before-close="resetForm" :fullscreen="full" title="新建考核项目" width="50%" draggable>
<el-button @click="toggleFullscreen" size="small" class="pot" :icon="FullScreen"></el-button>
<el-form :model="form" label-width="120px">
<el-row>
<el-col :span="24">
<el-form-item label="类型">
- <el-input v-model="form.name" type="textarea"></el-input>
+ <el-input v-model="form.itemType" type="textarea"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="考核项目">
- <el-input v-model="form.name" type="textarea"> </el-input>
+ <el-input v-model="form.itemDetail" type="textarea"> </el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="考核内容">
- <el-input v-model="form.name" type="textarea"> </el-input>
+ <el-input v-model="form.content" type="textarea"> </el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="评定标准">
- <el-input v-model="form.name" type="textarea"> </el-input>
+ <el-input v-model="form.judgeStandard" type="textarea"> </el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="考核说明">
- <el-input v-model="form.name" type="textarea"> </el-input>
+ <el-input v-model="form.memo" type="textarea"> </el-input>
</el-form-item>
</el-col>
</el-row>
@@ -41,8 +41,8 @@
<template #footer>
<span class="dialog-footer">
<el-button type="primary" @click="dialogVisible = false" size="default">继续添加</el-button>
- <el-button @click="dialogVisible = false" size="default">关闭</el-button>
- <el-button type="primary" @click="dialogVisible = false" size="default">确定</el-button>
+ <el-button @click="resetForm" size="default">关闭</el-button>
+ <el-button type="primary" @click="submitForm" size="default">确定</el-button>
</span>
</template>
</el-dialog>
@@ -56,55 +56,43 @@
// import DailogSearch from '../../../../components/DailogSearch/DailogSearch.vue'
export default defineComponent({
// components:{DailogAdd,DailogSearch},
- setup() {
+ setup(props, { emit }) {
const dialogVisible = ref<boolean>(false);
- const form = reactive({
- name: '',
- region: '',
- date1: '',
- date2: '',
- delivery: false,
- type: [],
- resource: '',
- desc: '',
+ const form = ref({
+ itemType: '', ////类型
+ memo: '', //备注
+ itemDetail: '', ////考核项目
+ content: '', ////考核内容
+ judgeStandard: '', ////评定标准
});
- const openDailog = (type: string, value: any, projectList: any, projectId: string) => {
+ const openDailog = (title: string, value: any) => {
dialogVisible.value = true;
+ if (title == '查看') {
+ form.value = value;
+ }
};
- // 导航
- const activeName = ref('1');
- // 表格
- const tableData = [
- {
- date: '2016-05-03',
- name: 'Tom',
- address: 'No. 189, Grove St, Los Angeles',
- },
- {
- date: '2016-05-02',
- name: 'Tom',
- address: 'No. 189, Grove St, Los Angeles',
- },
- {
- date: '2016-05-04',
- name: 'Tom',
- address: 'No. 189, Grove St, Los Angeles',
- },
- {
- date: '2016-05-01',
- name: 'Tom',
- address: 'No. 189, Grove St, Los Angeles',
- },
- ];
- // 新增弹窗
- const Show = ref();
- const daiAdd = () => {
- Show.value.openDailog();
+ // 提交
+ const submitForm = () => {
+ dialogVisible.value = false;
+ emit('onAdd', form.value);
+ form.value = {
+ itemType: '', ////类型
+ memo: '', //备注
+ itemDetail: '', ////考核项目
+ content: '', ////考核内容
+ judgeStandard: '', ////评定标准
+ };
};
- // 安全目标指标弹窗
- const Shows = ref();
- const daiInpt = () => {
- Shows.value.openDailog();
+ // 取消
+ const resetForm = () => {
+ dialogVisible.value = false;
+ form.value = {
+ itemType: '', ////类型
+ memo: '', //备注
+ itemDetail: '', ////考核项目
+ content: '', ////考核内容
+ judgeStandard: '', ////评定标准
+ };
};
//全屏
const full = ref(false);
@@ -119,12 +107,8 @@
form,
dialogVisible,
openDailog,
- activeName,
- tableData,
- Show,
- daiAdd,
- Shows,
- daiInpt,
+ submitForm,
+ resetForm,
Search,
full,
toggleFullscreen,
diff --git a/src/views/goalManagement/performanceAppraisal/index.vue b/src/views/goalManagement/performanceAppraisal/index.vue
index cfe1191..eb2da3c 100644
--- a/src/views/goalManagement/performanceAppraisal/index.vue
+++ b/src/views/goalManagement/performanceAppraisal/index.vue
@@ -135,8 +135,8 @@
</el-tab-pane>
</el-tabs>
</div>
- <DailogAq ref="ShowAdd" @navAddorUpdata="onAddorUpdata"></DailogAq>
- <DailogKh ref="ShowAdds" @navAddorUpdata="onAddorUpdatas"></DailogKh>
+ <DailogAq ref="openAdd" @navAddorUpdata="onAddorUpdata"></DailogAq>
+ <DailogKh ref="openAdds" @navAddorUpdata="onAddorUpdatas"></DailogKh>
</div>
</template>
<script lang="ts">
@@ -151,7 +151,7 @@
setup() {
// 搜索条件 安全考核管理
const ruleForm = reactive({
- pageSize: 2,
+ pageSize: 10,
pageIndex: 1,
searchParams: {
examineDepartmentId: '',
@@ -358,7 +358,7 @@
message: res.data.msg,
type: 'success',
});
- listApi();
+ listApis();
} else {
ElMessage.error(res.data.msg);
}
@@ -408,7 +408,7 @@
message: res.data.msg,
type: 'success',
});
- listApi();
+ listApis();
} else {
ElMessage.error(res.data.msg);
}
diff --git a/src/views/goalManagement/targetDecompositionYear/component/Dailog.vue b/src/views/goalManagement/targetDecompositionYear/component/Dailog.vue
index 915883e..6f5190d 100644
--- a/src/views/goalManagement/targetDecompositionYear/component/Dailog.vue
+++ b/src/views/goalManagement/targetDecompositionYear/component/Dailog.vue
@@ -6,8 +6,10 @@
<el-col :span="11">
<el-form-item label="安全目标指标" size="default">
<el-input v-model="form.qName" :disabled="disabled">
- <template #append> <el-button :icon="Search" @click="daiInpt" /> </template
- ></el-input>
+ <template #append>
+ <el-button :icon="Search" @click="daiInpt" />
+ </template>
+ </el-input>
</el-form-item>
</el-col>
<el-col :span="11" :offset="2">
@@ -99,8 +101,9 @@
const tableData = ref([]);
// 新增弹窗
const Show = ref();
- const daiAdd = () => {
- Show.value.openDailog();
+ const daiAdd = (title:string,data: any) => {
+ console.log(data)
+ Show.value.openDailog(title,data);
};
const formUp = reactive({
targetId: '', //关联的目标指标/外键
@@ -119,7 +122,8 @@
message: res.data.msg,
type: 'success',
});
- }else{
+ dialogVisible.value=false
+ } else {
ElMessage.error(res.data.msg);
}
});
@@ -127,18 +131,21 @@
const submitForm = () => {};
// 删除
const Delete = (data: any) => {
- formUp.delTargetDivideDetails=data.id
+ formUp.targetId= data.targetId
+ formUp.delTargetDivideDetails = data.id;
+ // formUp.targetDivideDetailList=data
goalManagementApi()
- .gettargetDivideDetail(formUp).then(res=>{
- if(res.data.code==200){
+ .gettargetDivideDetail(formUp)
+ .then((res) => {
+ if (res.data.code == 200) {
ElMessage({
message: res.data.msg,
type: 'success',
});
- }else{
+ } else {
ElMessage.error(res.data.msg);
}
- })
+ });
};
// 安全目标指标弹窗
const Shows = ref();
@@ -182,7 +189,7 @@
add,
formUp,
submitForm,
- Delete
+ Delete,
};
},
});
diff --git a/src/views/goalManagement/targetDecompositionYear/component/DailogAdd.vue b/src/views/goalManagement/targetDecompositionYear/component/DailogAdd.vue
index f228c67..1c862ac 100644
--- a/src/views/goalManagement/targetDecompositionYear/component/DailogAdd.vue
+++ b/src/views/goalManagement/targetDecompositionYear/component/DailogAdd.vue
@@ -1,7 +1,7 @@
<template>
<el-dialog v-model="dialogVisible" :fullscreen="full" title="新建目标指标分解" width="50%" draggable>
<el-button @click="toggleFullscreen" size="small" class="pot" :icon="FullScreen"></el-button>
- <el-form :model="form" label-width="120px" ref="ruleFormRef" :rules="rules">
+ <el-form :model="form" :disabled="disabled" label-width="120px" ref="ruleFormRef" :rules="rules">
<el-row>
<el-col :span="11">
<el-form-item label="责任部门" prop="dutyDepartmentId" size="default">
@@ -126,19 +126,34 @@
.getTreedepartment()
.then((res) => {
if (res.data.code == 200) {
- console.log(res.data.data);
data.value = res.data.data;
} else {
ElMessage.error(res.data.msg);
}
});
};
+ const propse = {
+ label: 'depName',
+ children: 'children',
+ value:"depId"
+ };
onMounted(() => {
- department();
+
});
+ const disabled=ref(false)
// 开启弹窗
const dialogVisible = ref(false);
- const openDailog = () => {
+ const openDailog = (title:string,data:any) => {
+ department();
+ if(title=='查看'){
+ disabled.value=true
+ form.value=data
+ }else if(title=='修改'){
+ disabled.value=true
+ disabled.value=false
+ }else{
+ disabled.value=false
+ }
dialogVisible.value = true;
};
// 开启用户弹窗
@@ -155,11 +170,6 @@
full.value = false;
}
};
- const propse = {
- label: 'depName',
- children: 'children',
- value:"depId"
- };
const data = ref();
const nameC=ref()
const onUser = (e: any) => {
@@ -167,6 +177,7 @@
nameC.value=e.realName
};
return {
+ disabled,
nameC,
form,
propse,
--
Gitblit v1.9.2