Browse Source

合并鲁智强内容

v5
超级管理员 2 years ago
parent
commit
be12044551
  1. 265
      .history/src/views/opk/asd/news/bb_20231102102940.vue
  2. 265
      .history/src/views/opk/asd/news/bb_20231102102946.vue
  3. 265
      .history/src/views/opk/asd/news/bb_20231102102950.vue
  4. 265
      .history/src/views/opk/asd/news/bb_20231102103013.vue
  5. 265
      .history/src/views/opk/asd/news/bb_20231102112456.vue
  6. 265
      .history/src/views/opk/asd/news/bb_20231102112457.vue
  7. 265
      .history/src/views/opk/asd/news/bb_20231102112504.vue
  8. 265
      .history/src/views/opk/asd/news/bb_20231102112518.vue
  9. 265
      .history/src/views/opk/asd/news/bb_20231102112637.vue
  10. 265
      .history/src/views/opk/asd/news/bb_20231102112653.vue
  11. 265
      .history/src/views/opk/asd/news/bb_20231102112740.vue
  12. 265
      .history/src/views/opk/asd/news/bb_20231102112859.vue
  13. 265
      .history/src/views/opk/asd/news/bb_20231102112911.vue
  14. 265
      .history/src/views/opk/asd/news/bb_20231102112913.vue
  15. 265
      .history/src/views/opk/asd/news/bb_20231102112922.vue
  16. 265
      .history/src/views/opk/asd/news/bb_20231102112931.vue
  17. 265
      .history/src/views/opk/asd/news/bb_20231102112933.vue
  18. 265
      .history/src/views/opk/asd/news/bb_20231102112935.vue
  19. 265
      .history/src/views/opk/asd/news/bb_20231102112945.vue
  20. 265
      .history/src/views/opk/asd/news/bb_20231102113235.vue
  21. 265
      .history/src/views/opk/asd/news/bb_20231102113241.vue
  22. 265
      .history/src/views/opk/asd/news/bb_20231102113430.vue
  23. 265
      .history/src/views/opk/asd/news/bb_20231102113635.vue
  24. 265
      .history/src/views/opk/asd/news/bb_20231102113637.vue
  25. 265
      .history/src/views/opk/asd/news/bb_20231102113644.vue
  26. 265
      .history/src/views/opk/asd/news/bb_20231102113944.vue
  27. 265
      .history/src/views/opk/asd/news/bb_20231102113947.vue
  28. 273
      .history/src/views/opk/yui/new/aa_20231102103329.vue
  29. 273
      .history/src/views/opk/yui/new/aa_20231102103449.vue
  30. 273
      .history/src/views/opk/yui/new/aa_20231102103450.vue
  31. 273
      .history/src/views/opk/yui/new/aa_20231102103455.vue
  32. 273
      .history/src/views/opk/yui/new/aa_20231102103459.vue
  33. 273
      .history/src/views/opk/yui/new/aa_20231102103501.vue
  34. 274
      .history/src/views/opk/yui/new/aa_20231102104039.vue
  35. 273
      .history/src/views/opk/yui/new/aa_20231102104043.vue
  36. 273
      .history/src/views/opk/yui/new/aa_20231102104048.vue
  37. 273
      .history/src/views/opk/yui/new/aa_20231102104051.vue
  38. 273
      .history/src/views/opk/yui/new/aa_20231102104107.vue
  39. 273
      .history/src/views/opk/yui/new/aa_20231102104126.vue
  40. 273
      .history/src/views/opk/yui/new/aa_20231102104128.vue
  41. 273
      .history/src/views/opk/yui/new/aa_20231102104223.vue
  42. 273
      .history/src/views/opk/yui/new/aa_20231102104226.vue
  43. 273
      .history/src/views/opk/yui/new/aa_20231102104245.vue
  44. 273
      .history/src/views/opk/yui/new/aa_20231102104250.vue
  45. 273
      .history/src/views/opk/yui/new/aa_20231102104253.vue
  46. 273
      .history/src/views/opk/yui/new/aa_20231102104257.vue
  47. 273
      .history/src/views/opk/yui/new/aa_20231102104259.vue
  48. 273
      .history/src/views/opk/yui/new/aa_20231102104300.vue
  49. 273
      .history/src/views/opk/yui/new/aa_20231102104305.vue
  50. 273
      .history/src/views/opk/yui/new/aa_20231102104307.vue
  51. 273
      .history/src/views/opk/yui/new/aa_20231102104311.vue
  52. 273
      .history/src/views/opk/yui/new/aa_20231102104315.vue
  53. 273
      .history/src/views/opk/yui/new/aa_20231102104316.vue
  54. 273
      .history/src/views/opk/yui/new/aa_20231102104319.vue
  55. 273
      .history/src/views/opk/yui/new/aa_20231102104322.vue
  56. 273
      .history/src/views/opk/yui/new/aa_20231102104445.vue
  57. 273
      .history/src/views/opk/yui/new/aa_20231102104539.vue
  58. 273
      .history/src/views/opk/yui/new/aa_20231102104550.vue
  59. 273
      .history/src/views/opk/yui/new/aa_20231102104817.vue
  60. 273
      .history/src/views/opk/yui/new/aa_20231102105012.vue
  61. 273
      .history/src/views/opk/yui/new/aa_20231102105650.vue
  62. 273
      .history/src/views/opk/yui/new/aa_20231102105814.vue
  63. 273
      .history/src/views/opk/yui/new/aa_20231102105816.vue
  64. 273
      .history/src/views/opk/yui/new/aa_20231102105917.vue
  65. 273
      .history/src/views/opk/yui/new/aa_20231102105948.vue
  66. 273
      .history/src/views/opk/yui/new/aa_20231102110006.vue
  67. 273
      .history/src/views/opk/yui/new/aa_20231102110024.vue
  68. 273
      .history/src/views/opk/yui/new/aa_20231102110032.vue
  69. 273
      .history/src/views/opk/yui/new/aa_20231102110035.vue
  70. 273
      .history/src/views/opk/yui/new/aa_20231102110037.vue
  71. 273
      .history/src/views/opk/yui/new/aa_20231102110057.vue
  72. 273
      .history/src/views/opk/yui/new/aa_20231102110139.vue
  73. 273
      .history/src/views/opk/yui/new/aa_20231102110211.vue
  74. 273
      .history/src/views/opk/yui/new/aa_20231102110232.vue
  75. 273
      .history/src/views/opk/yui/new/aa_20231102110236.vue
  76. 273
      .history/src/views/opk/yui/new/aa_20231102110326.vue
  77. 273
      .history/src/views/opk/yui/new/aa_20231102110331.vue
  78. 273
      .history/src/views/opk/yui/new/aa_20231102110359.vue
  79. 273
      .history/src/views/opk/yui/new/aa_20231102110422.vue
  80. 273
      .history/src/views/opk/yui/new/aa_20231102110454.vue
  81. 273
      .history/src/views/opk/yui/new/aa_20231102110708.vue
  82. 273
      .history/src/views/opk/yui/new/aa_20231102110807.vue
  83. 273
      .history/src/views/opk/yui/new/aa_20231102110811.vue
  84. 273
      .history/src/views/opk/yui/new/aa_20231102110839.vue
  85. 274
      .history/src/views/opk/yui/new/aa_20231102111121.vue
  86. 273
      .history/src/views/opk/yui/new/aa_20231102111128.vue
  87. 273
      .history/src/views/opk/yui/new/aa_20231102111155.vue
  88. 273
      .history/src/views/opk/yui/new/aa_20231102111224.vue
  89. 273
      .history/src/views/opk/yui/new/aa_20231102111235.vue
  90. 273
      .history/src/views/opk/yui/new/aa_20231102111255.vue
  91. 273
      .history/src/views/opk/yui/new/aa_20231102111258.vue
  92. 273
      .history/src/views/opk/yui/new/aa_20231102111336.vue
  93. 273
      .history/src/views/opk/yui/new/aa_20231102111344.vue
  94. 273
      .history/src/views/opk/yui/new/aa_20231102111347.vue
  95. 273
      .history/src/views/opk/yui/new/aa_20231102111442.vue
  96. 273
      .history/src/views/opk/yui/new/aa_20231102111444.vue
  97. 273
      .history/src/views/opk/yui/new/aa_20231102111517.vue
  98. 273
      .history/src/views/opk/yui/new/aa_20231102111520.vue
  99. 273
      .history/src/views/opk/yui/new/aa_20231102111525.vue
  100. 273
      .history/src/views/opk/yui/new/aa_20231102111527.vue

265
.history/src/views/opk/asd/news/bb_20231102102940.vue

@ -0,0 +1,265 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api'
import { ge_copy } from '@/api/opk/zxy/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
import Dialoglog from './dialoglog.vue'
import Yg from './yg.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
edPostBox:false,
ygPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
const rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont({})
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const ass = new Date(formdate.value1);
const qwe = ass.getFullYear();
const zjr = qwe.toString();
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name})
.then(data => {
tableq.value = data.data;
total.value = data.data.count;
})
}
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:string,state:number){
console.log("改变状态--------->",classId,state)
let statusVal = 1
if( state == 1) statusVal = 2;
edit_depart({id:classId,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const add = val.key.toString()
handleSure(val)
console.log(val.id)
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleErd=(val:any)=>{
data.edPostBox=true;
rowInfo.value=val;
}
const handleio=(val:any)=>{
data.ygPostBox=true;
rowInfo.value = val;
}
const flitterData4 = (data:any)=>{
let spanOneArr = [] as any[]
let concatOne = 0
data.value.forEach((item:any,index:any)=>{
if(index === 0){
spanOneArr.push(1)
}else{
//name
if(item.department === data.value[index - 1].department){ //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
}
function objectSpanMethod({row, column, rowIndex, columnIndex}:any){
if(columnIndex === 0 ) {
// this.tableData
const _row = (flitterData4(tableq).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container clss="m-4">
<div class="qwe">
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="方案版本号:">
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="25">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="tableq" :span-method="objectSpanMethod" border style="width: 100%">
<el-table-column prop="groupname,deaprtname," label="部门">
<template #default="scope">
{{scope.row.groupname}}{{scope.row.deaprtname}}
</template>
</el-table-column>
<el-table-column prop="year" label="年" width="70"/>
<el-table-column prop="key" label="版本号"/>
<el-table-column prop="time" label="时间" />
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="228">
<template #default="{ row }">
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon></el-button>
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog>
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg>
</div>
</template>
<style lang='scss' scoped>
.qwe {
margin:-8px 0 0 -6px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

265
.history/src/views/opk/asd/news/bb_20231102102946.vue

@ -0,0 +1,265 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api'
import { ge_copy } from '@/api/opk/zxy/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
import Dialoglog from './dialoglog.vue'
import Yg from './yg.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
edPostBox:false,
ygPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
const rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont({})
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const ass = new Date(formdate.value1);
const qwe = ass.getFullYear();
const zjr = qwe.toString();
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name})
.then(data => {
tableq.value = data.data;
total.value = data.data.count;
})
}
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:string,state:number){
console.log("改变状态--------->",classId,state)
let statusVal = 1
if( state == 1) statusVal = 2;
edit_depart({id:classId,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const add = val.key.toString()
handleSure(val)
console.log(val.id)
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleErd=(val:any)=>{
data.edPostBox=true;
rowInfo.value=val;
}
const handleio=(val:any)=>{
data.ygPostBox=true;
rowInfo.value = val;
}
const flitterData4 = (data:any)=>{
let spanOneArr = [] as any[]
let concatOne = 0
data.value.forEach((item:any,index:any)=>{
if(index === 0){
spanOneArr.push(1)
}else{
//name
if(item.department === data.value[index - 1].department){ //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
}
function objectSpanMethod({row, column, rowIndex, columnIndex}:any){
if(columnIndex === 0 ) {
// this.tableData
const _row = (flitterData4(tableq).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container clss="m-4">
<div class="qwe">
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="方案版本号:">
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="25">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="tableq" :span-method="objectSpanMethod" border style="width: 100%">
<el-table-column prop="groupname,deaprtname," label="部门">
<template #default="scope">
{{scope.row.groupname}}{{scope.row.deaprtname}}
</template>
</el-table-column>
<el-table-column prop="year" label="年" width="70"/>
<el-table-column prop="key" label="版本号"/>
<el-table-column prop="time" label="时间" />
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="228">
<template #default="{ row }">
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon></el-button>
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog>
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg>
</div>
</template>
<style lang='scss' scoped>
.qwe {
margin:-8px 0 0 -6px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

265
.history/src/views/opk/asd/news/bb_20231102102950.vue

@ -0,0 +1,265 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api'
import { ge_copy } from '@/api/opk/zxy/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
import Dialoglog from './dialoglog.vue'
import Yg from './yg.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
edPostBox:false,
ygPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
const rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont({})
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const ass = new Date(formdate.value1);
const qwe = ass.getFullYear();
const zjr = qwe.toString();
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name})
.then(data => {
tableq.value = data.data;
total.value = data.data.count;
})
}
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:string,state:number){
console.log("改变状态--------->",classId,state)
let statusVal = 1
if( state == 1) statusVal = 2;
edit_depart({id:classId,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const add = val.key.toString()
handleSure(val)
console.log(val.id)
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleErd=(val:any)=>{
data.edPostBox=true;
rowInfo.value=val;
}
const handleio=(val:any)=>{
data.ygPostBox=true;
rowInfo.value = val;
}
const flitterData4 = (data:any)=>{
let spanOneArr = [] as any[]
let concatOne = 0
data.value.forEach((item:any,index:any)=>{
if(index === 0){
spanOneArr.push(1)
}else{
//name
if(item.department === data.value[index - 1].department){ //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
}
function objectSpanMethod({row, column, rowIndex, columnIndex}:any){
if(columnIndex === 0 ) {
// this.tableData
const _row = (flitterData4(tableq).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container clss="m-4">
<div class="qwe">
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="方案版本号:">
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="25">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="tableq" :span-method="objectSpanMethod" border style="width: 100%">
<el-table-column prop="groupname,deaprtname," label="部门">
<template #default="scope">
{{scope.row.groupname}}{{scope.row.deaprtname}}
</template>
</el-table-column>
<el-table-column prop="year" label="年" width="70"/>
<el-table-column prop="key" label="版本号"/>
<el-table-column prop="time" label="时间" />
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="228">
<template #default="{ row }">
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon></el-button>
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog>
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg>
</div>
</template>
<style lang='scss' scoped>
.qwe {
margin:-8px 0 0 -6px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

265
.history/src/views/opk/asd/news/bb_20231102103013.vue

@ -0,0 +1,265 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api'
import { ge_copy } from '@/api/opk/zxy/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
import Dialoglog from './dialoglog.vue'
import Yg from './yg.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
edPostBox:false,
ygPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
const rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont({})
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const ass = new Date(formdate.value1);
const qwe = ass.getFullYear();
const zjr = qwe.toString();
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name})
.then(data => {
tableq.value = data.data;
total.value = data.data.count;
})
}
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:string,state:number){
console.log("改变状态--------->",classId,state)
let statusVal = 1
if( state == 1) statusVal = 2;
edit_depart({id:classId,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const add = val.key.toString()
handleSure(val)
console.log(val.id)
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleErd=(val:any)=>{
data.edPostBox=true;
rowInfo.value=val;
}
const handleio=(val:any)=>{
data.ygPostBox=true;
rowInfo.value = val;
}
const flitterData4 = (data:any)=>{
let spanOneArr = [] as any[]
let concatOne = 0
data.value.forEach((item:any,index:any)=>{
if(index === 0){
spanOneArr.push(1)
}else{
//name
if(item.department === data.value[index - 1].department){ //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
}
function objectSpanMethod({row, column, rowIndex, columnIndex}:any){
if(columnIndex === 0 ) {
// this.tableData
const _row = (flitterData4(tableq).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container clss="m-4">
<div class="qwe">
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="方案版本号:">
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="25">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="tableq" :span-method="objectSpanMethod" border style="width: 100%">
<el-table-column prop="groupname,deaprtname," label="部门">
<template #default="scope">
{{scope.row.groupname}}{{scope.row.deaprtname}}
</template>
</el-table-column>
<el-table-column prop="year" label="年" width="70"/>
<el-table-column prop="key" label="版本号"/>
<el-table-column prop="time" label="时间" />
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.states" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="228">
<template #default="{ row }">
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon></el-button>
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog>
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg>
</div>
</template>
<style lang='scss' scoped>
.qwe {
margin:-8px 0 0 -6px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

265
.history/src/views/opk/asd/news/bb_20231102112456.vue

@ -0,0 +1,265 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api'
import { ge_copy } from '@/api/opk/zxy/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
import Dialoglog from './dialoglog.vue'
import Yg from './yg.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
edPostBox:false,
ygPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
const rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont({})
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const ass = new Date(formdate.value1);
const qwe = ass.getFullYear();
const zjr = qwe.toString();
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name})
.then(data => {
tableq.value = data.data;
total.value = data.data.count;
})
}
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:string,state:number){
console.log("改变状态--------->",classId,state)
let statusVal = 1
if( state == 1) statusVal = 2;
edit_depart({id:classId,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const add = val.key.toString()
handleSure(val)
console.log(val.id)
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleErd=(val:any)=>{
data.edPostBox=true;
rowInfo.value=val;
}
const handleio=(val:any)=>{
data.ygPostBox=true;
rowInfo.value = val;
}
const flitterData4 = (data:any)=>{
let spanOneArr = [] as any[]
let concatOne = 0
data.value.forEach((item:any,index:any)=>{
if(index === 0){
spanOneArr.push(1)
}else{
//name
if(item.department === data.value[index - 1].department){ //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
}
function objectSpanMethod({row, column, rowIndex, columnIndex}:any){
if(columnIndex === 0 ) {
// this.tableData
const _row = (flitterData4(tableq).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container clss="m-4">
<div class="qwe">
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="方案版本号:">
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="25">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="tableq" :span-method="objectSpanMethod" border style="width: 100%">
<el-table-column prop="groupname,deaprtname," label="部门">
<template #default="scope">
{{scope.row.groupname}}{{scope.row.deaprtname}}
</template>
</el-table-column>
<el-table-column prop="year" label="年" width="70"/>
<el-table-column prop="key" label="版本号"/>
<el-table-column prop="time" label="时间" />
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.states" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="228">
<template #default="{ row }">
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon></el-button>
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog>
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg>
</div>
</template>
<style lang='scss' scoped>
.qwe {
margin:-8px 0 0 -6px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

265
.history/src/views/opk/asd/news/bb_20231102112457.vue

@ -0,0 +1,265 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api'
import { ge_copy } from '@/api/opk/zxy/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
import Dialoglog from './dialoglog.vue'
import Yg from './yg.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
edPostBox:false,
ygPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
const rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont({})
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const ass = new Date(formdate.value1);
const qwe = ass.getFullYear();
const zjr = qwe.toString();
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name})
.then(data => {
tableq.value = data.data;
total.value = data.data.count;
})
}
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:string,state:number){
console.log("改变状态--------->",classId,state)
let statusVal = 1
if( state == 1) statusVal = 2;
edit_depart({id:classId,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const add = val.key.toString()
handleSure(val)
console.log(val.id)
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleErd=(val:any)=>{
data.edPostBox=true;
rowInfo.value=val;
}
const handleio=(val:any)=>{
data.ygPostBox=true;
rowInfo.value = val;
}
const flitterData4 = (data:any)=>{
let spanOneArr = [] as any[]
let concatOne = 0
data.value.forEach((item:any,index:any)=>{
if(index === 0){
spanOneArr.push(1)
}else{
//name
if(item.department === data.value[index - 1].department){ //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
}
function objectSpanMethod({row, column, rowIndex, columnIndex}:any){
if(columnIndex === 0 ) {
// this.tableData
const _row = (flitterData4(tableq).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container clss="m-4">
<div class="qwe">
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="方案版本号:">
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="25">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="tableq" :span-method="objectSpanMethod" border style="width: 100%">
<el-table-column prop="groupname,deaprtname," label="部门">
<template #default="scope">
{{scope.row.groupname}}{{scope.row.deaprtname}}
</template>
</el-table-column>
<el-table-column prop="year" label="年" width="70"/>
<el-table-column prop="key" label="版本号"/>
<el-table-column prop="time" label="时间" />
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.states" class="ml-2" :inactive-value="1" :active-value="2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="228">
<template #default="{ row }">
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon></el-button>
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog>
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg>
</div>
</template>
<style lang='scss' scoped>
.qwe {
margin:-8px 0 0 -6px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

265
.history/src/views/opk/asd/news/bb_20231102112504.vue

@ -0,0 +1,265 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api'
import { ge_copy } from '@/api/opk/zxy/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
import Dialoglog from './dialoglog.vue'
import Yg from './yg.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
edPostBox:false,
ygPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
const rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont({})
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const ass = new Date(formdate.value1);
const qwe = ass.getFullYear();
const zjr = qwe.toString();
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name})
.then(data => {
tableq.value = data.data;
total.value = data.data.count;
})
}
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:string,state:number){
console.log("改变状态--------->",classId,state)
let statusVal = 1
if( state == 1) statusVal = 2;
edit_depart({id:classId,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const add = val.key.toString()
handleSure(val)
console.log(val.id)
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleErd=(val:any)=>{
data.edPostBox=true;
rowInfo.value=val;
}
const handleio=(val:any)=>{
data.ygPostBox=true;
rowInfo.value = val;
}
const flitterData4 = (data:any)=>{
let spanOneArr = [] as any[]
let concatOne = 0
data.value.forEach((item:any,index:any)=>{
if(index === 0){
spanOneArr.push(1)
}else{
//name
if(item.department === data.value[index - 1].department){ //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
}
function objectSpanMethod({row, column, rowIndex, columnIndex}:any){
if(columnIndex === 0 ) {
// this.tableData
const _row = (flitterData4(tableq).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container clss="m-4">
<div class="qwe">
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="方案版本号:">
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="25">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="tableq" :span-method="objectSpanMethod" border style="width: 100%">
<el-table-column prop="groupname,deaprtname," label="部门">
<template #default="scope">
{{scope.row.groupname}}{{scope.row.deaprtname}}
</template>
</el-table-column>
<el-table-column prop="year" label="年" width="70"/>
<el-table-column prop="key" label="版本号"/>
<el-table-column prop="time" label="时间" />
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :inactive-value="1" :active-value="2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="228">
<template #default="{ row }">
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon></el-button>
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog>
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg>
</div>
</template>
<style lang='scss' scoped>
.qwe {
margin:-8px 0 0 -6px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

265
.history/src/views/opk/asd/news/bb_20231102112518.vue

@ -0,0 +1,265 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api'
import { ge_copy } from '@/api/opk/zxy/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
import Dialoglog from './dialoglog.vue'
import Yg from './yg.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
edPostBox:false,
ygPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
const rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont({})
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const ass = new Date(formdate.value1);
const qwe = ass.getFullYear();
const zjr = qwe.toString();
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name})
.then(data => {
tableq.value = data.data;
total.value = data.data.count;
})
}
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:string,state:number){
console.log("改变状态--------->",classId,state)
let statusVal = 1
if( state == 2) statusVal = 2;
edit_depart({id:classId,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const add = val.key.toString()
handleSure(val)
console.log(val.id)
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleErd=(val:any)=>{
data.edPostBox=true;
rowInfo.value=val;
}
const handleio=(val:any)=>{
data.ygPostBox=true;
rowInfo.value = val;
}
const flitterData4 = (data:any)=>{
let spanOneArr = [] as any[]
let concatOne = 0
data.value.forEach((item:any,index:any)=>{
if(index === 0){
spanOneArr.push(1)
}else{
//name
if(item.department === data.value[index - 1].department){ //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
}
function objectSpanMethod({row, column, rowIndex, columnIndex}:any){
if(columnIndex === 0 ) {
// this.tableData
const _row = (flitterData4(tableq).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container clss="m-4">
<div class="qwe">
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="方案版本号:">
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="25">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="tableq" :span-method="objectSpanMethod" border style="width: 100%">
<el-table-column prop="groupname,deaprtname," label="部门">
<template #default="scope">
{{scope.row.groupname}}{{scope.row.deaprtname}}
</template>
</el-table-column>
<el-table-column prop="year" label="年" width="70"/>
<el-table-column prop="key" label="版本号"/>
<el-table-column prop="time" label="时间" />
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :inactive-value="1" :active-value="2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="228">
<template #default="{ row }">
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon></el-button>
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog>
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg>
</div>
</template>
<style lang='scss' scoped>
.qwe {
margin:-8px 0 0 -6px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

265
.history/src/views/opk/asd/news/bb_20231102112637.vue

@ -0,0 +1,265 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api'
import { ge_copy } from '@/api/opk/zxy/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
import Dialoglog from './dialoglog.vue'
import Yg from './yg.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
edPostBox:false,
ygPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
const rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont({})
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const ass = new Date(formdate.value1);
const qwe = ass.getFullYear();
const zjr = qwe.toString();
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name})
.then(data => {
tableq.value = data.data;
total.value = data.data.count;
})
}
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:string,state:number){
console.log("改变状态--------->",classId,state)
let statusVal = 1
if( state == 1) statusVal = 2;
edit_depart({id:classId,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const add = val.key.toString()
handleSure(val)
console.log(val.id)
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleErd=(val:any)=>{
data.edPostBox=true;
rowInfo.value=val;
}
const handleio=(val:any)=>{
data.ygPostBox=true;
rowInfo.value = val;
}
const flitterData4 = (data:any)=>{
let spanOneArr = [] as any[]
let concatOne = 0
data.value.forEach((item:any,index:any)=>{
if(index === 0){
spanOneArr.push(1)
}else{
//name
if(item.department === data.value[index - 1].department){ //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
}
function objectSpanMethod({row, column, rowIndex, columnIndex}:any){
if(columnIndex === 0 ) {
// this.tableData
const _row = (flitterData4(tableq).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container clss="m-4">
<div class="qwe">
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="方案版本号:">
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="25">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="tableq" :span-method="objectSpanMethod" border style="width: 100%">
<el-table-column prop="groupname,deaprtname," label="部门">
<template #default="scope">
{{scope.row.groupname}}{{scope.row.deaprtname}}
</template>
</el-table-column>
<el-table-column prop="year" label="年" width="70"/>
<el-table-column prop="key" label="版本号"/>
<el-table-column prop="time" label="时间" />
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :inactive-value="1" :active-value="2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="228">
<template #default="{ row }">
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon></el-button>
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog>
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg>
</div>
</template>
<style lang='scss' scoped>
.qwe {
margin:-8px 0 0 -6px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

265
.history/src/views/opk/asd/news/bb_20231102112653.vue

@ -0,0 +1,265 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api'
import { ge_copy } from '@/api/opk/zxy/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
import Dialoglog from './dialoglog.vue'
import Yg from './yg.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
edPostBox:false,
ygPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
const rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont({})
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const ass = new Date(formdate.value1);
const qwe = ass.getFullYear();
const zjr = qwe.toString();
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name})
.then(data => {
tableq.value = data.data;
total.value = data.data.count;
})
}
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:string,state:number){
console.log("改变状态--------->",classId,state)
let statusVal = 1
if( state == 2) statusVal = 2;
edit_depart({id:classId,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const add = val.key.toString()
handleSure(val)
console.log(val.id)
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleErd=(val:any)=>{
data.edPostBox=true;
rowInfo.value=val;
}
const handleio=(val:any)=>{
data.ygPostBox=true;
rowInfo.value = val;
}
const flitterData4 = (data:any)=>{
let spanOneArr = [] as any[]
let concatOne = 0
data.value.forEach((item:any,index:any)=>{
if(index === 0){
spanOneArr.push(1)
}else{
//name
if(item.department === data.value[index - 1].department){ //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
}
function objectSpanMethod({row, column, rowIndex, columnIndex}:any){
if(columnIndex === 0 ) {
// this.tableData
const _row = (flitterData4(tableq).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container clss="m-4">
<div class="qwe">
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="方案版本号:">
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="25">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="tableq" :span-method="objectSpanMethod" border style="width: 100%">
<el-table-column prop="groupname,deaprtname," label="部门">
<template #default="scope">
{{scope.row.groupname}}{{scope.row.deaprtname}}
</template>
</el-table-column>
<el-table-column prop="year" label="年" width="70"/>
<el-table-column prop="key" label="版本号"/>
<el-table-column prop="time" label="时间" />
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :inactive-value="1" :active-value="2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="228">
<template #default="{ row }">
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon></el-button>
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog>
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg>
</div>
</template>
<style lang='scss' scoped>
.qwe {
margin:-8px 0 0 -6px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

265
.history/src/views/opk/asd/news/bb_20231102112740.vue

@ -0,0 +1,265 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api'
import { ge_copy } from '@/api/opk/zxy/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
import Dialoglog from './dialoglog.vue'
import Yg from './yg.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
edPostBox:false,
ygPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
const rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont({})
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const ass = new Date(formdate.value1);
const qwe = ass.getFullYear();
const zjr = qwe.toString();
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name})
.then(data => {
tableq.value = data.data;
total.value = data.data.count;
})
}
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:string,state:number){
console.log("改变状态--------->",classId,state)
let statusVal = 1
if( state == 1) statusVal = 2;
edit_depart({id:classId,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const add = val.key.toString()
handleSure(val)
console.log(val.id)
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleErd=(val:any)=>{
data.edPostBox=true;
rowInfo.value=val;
}
const handleio=(val:any)=>{
data.ygPostBox=true;
rowInfo.value = val;
}
const flitterData4 = (data:any)=>{
let spanOneArr = [] as any[]
let concatOne = 0
data.value.forEach((item:any,index:any)=>{
if(index === 0){
spanOneArr.push(1)
}else{
//name
if(item.department === data.value[index - 1].department){ //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
}
function objectSpanMethod({row, column, rowIndex, columnIndex}:any){
if(columnIndex === 0 ) {
// this.tableData
const _row = (flitterData4(tableq).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container clss="m-4">
<div class="qwe">
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="方案版本号:">
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="25">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="tableq" :span-method="objectSpanMethod" border style="width: 100%">
<el-table-column prop="groupname,deaprtname," label="部门">
<template #default="scope">
{{scope.row.groupname}}{{scope.row.deaprtname}}
</template>
</el-table-column>
<el-table-column prop="year" label="年" width="70"/>
<el-table-column prop="key" label="版本号"/>
<el-table-column prop="time" label="时间" />
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :inactive-value="1" :active-value="2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="228">
<template #default="{ row }">
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon></el-button>
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog>
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg>
</div>
</template>
<style lang='scss' scoped>
.qwe {
margin:-8px 0 0 -6px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

265
.history/src/views/opk/asd/news/bb_20231102112859.vue

@ -0,0 +1,265 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api'
import { ge_copy } from '@/api/opk/zxy/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
import Dialoglog from './dialoglog.vue'
import Yg from './yg.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
edPostBox:false,
ygPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
const rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont({})
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const ass = new Date(formdate.value1);
const qwe = ass.getFullYear();
const zjr = qwe.toString();
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name})
.then(data => {
tableq.value = data.data;
total.value = data.data.count;
})
}
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:string,state:number){
console.log("改变状态--------->",classId,state)
let statusVal = 1
if( state == 2) statusVal = 2;
edit_depart({id:classId,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const add = val.key.toString()
handleSure(val)
console.log(val.id)
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleErd=(val:any)=>{
data.edPostBox=true;
rowInfo.value=val;
}
const handleio=(val:any)=>{
data.ygPostBox=true;
rowInfo.value = val;
}
const flitterData4 = (data:any)=>{
let spanOneArr = [] as any[]
let concatOne = 0
data.value.forEach((item:any,index:any)=>{
if(index === 0){
spanOneArr.push(1)
}else{
//name
if(item.department === data.value[index - 1].department){ //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
}
function objectSpanMethod({row, column, rowIndex, columnIndex}:any){
if(columnIndex === 0 ) {
// this.tableData
const _row = (flitterData4(tableq).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container clss="m-4">
<div class="qwe">
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="方案版本号:">
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="25">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="tableq" :span-method="objectSpanMethod" border style="width: 100%">
<el-table-column prop="groupname,deaprtname," label="部门">
<template #default="scope">
{{scope.row.groupname}}{{scope.row.deaprtname}}
</template>
</el-table-column>
<el-table-column prop="year" label="年" width="70"/>
<el-table-column prop="key" label="版本号"/>
<el-table-column prop="time" label="时间" />
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :inactive-value="1" :active-value="2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="228">
<template #default="{ row }">
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon></el-button>
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog>
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg>
</div>
</template>
<style lang='scss' scoped>
.qwe {
margin:-8px 0 0 -6px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

265
.history/src/views/opk/asd/news/bb_20231102112911.vue

@ -0,0 +1,265 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api'
import { ge_copy } from '@/api/opk/zxy/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
import Dialoglog from './dialoglog.vue'
import Yg from './yg.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
edPostBox:false,
ygPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
const rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont({})
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const ass = new Date(formdate.value1);
const qwe = ass.getFullYear();
const zjr = qwe.toString();
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name})
.then(data => {
tableq.value = data.data;
total.value = data.data.count;
})
}
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:string,state:number){
console.log("改变状态--------->",classId,state)
let statusVal = 1
if( state == 1) statusVal = 2;
edit_depart({id:classId,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const add = val.key.toString()
handleSure(val)
console.log(val.id)
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleErd=(val:any)=>{
data.edPostBox=true;
rowInfo.value=val;
}
const handleio=(val:any)=>{
data.ygPostBox=true;
rowInfo.value = val;
}
const flitterData4 = (data:any)=>{
let spanOneArr = [] as any[]
let concatOne = 0
data.value.forEach((item:any,index:any)=>{
if(index === 0){
spanOneArr.push(1)
}else{
//name
if(item.department === data.value[index - 1].department){ //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
}
function objectSpanMethod({row, column, rowIndex, columnIndex}:any){
if(columnIndex === 0 ) {
// this.tableData
const _row = (flitterData4(tableq).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container clss="m-4">
<div class="qwe">
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="方案版本号:">
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="25">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="tableq" :span-method="objectSpanMethod" border style="width: 100%">
<el-table-column prop="groupname,deaprtname," label="部门">
<template #default="scope">
{{scope.row.groupname}}{{scope.row.deaprtname}}
</template>
</el-table-column>
<el-table-column prop="year" label="年" width="70"/>
<el-table-column prop="key" label="版本号"/>
<el-table-column prop="time" label="时间" />
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="228">
<template #default="{ row }">
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon></el-button>
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog>
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg>
</div>
</template>
<style lang='scss' scoped>
.qwe {
margin:-8px 0 0 -6px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

265
.history/src/views/opk/asd/news/bb_20231102112913.vue

@ -0,0 +1,265 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api'
import { ge_copy } from '@/api/opk/zxy/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
import Dialoglog from './dialoglog.vue'
import Yg from './yg.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
edPostBox:false,
ygPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
const rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont({})
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const ass = new Date(formdate.value1);
const qwe = ass.getFullYear();
const zjr = qwe.toString();
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name})
.then(data => {
tableq.value = data.data;
total.value = data.data.count;
})
}
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:string,state:number){
console.log("改变状态--------->",classId,state)
let statusVal = 1
if( state == 1) statusVal = 2;
edit_depart({id:classId,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const add = val.key.toString()
handleSure(val)
console.log(val.id)
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleErd=(val:any)=>{
data.edPostBox=true;
rowInfo.value=val;
}
const handleio=(val:any)=>{
data.ygPostBox=true;
rowInfo.value = val;
}
const flitterData4 = (data:any)=>{
let spanOneArr = [] as any[]
let concatOne = 0
data.value.forEach((item:any,index:any)=>{
if(index === 0){
spanOneArr.push(1)
}else{
//name
if(item.department === data.value[index - 1].department){ //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
}
function objectSpanMethod({row, column, rowIndex, columnIndex}:any){
if(columnIndex === 0 ) {
// this.tableData
const _row = (flitterData4(tableq).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container clss="m-4">
<div class="qwe">
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="方案版本号:">
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="25">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="tableq" :span-method="objectSpanMethod" border style="width: 100%">
<el-table-column prop="groupname,deaprtname," label="部门">
<template #default="scope">
{{scope.row.groupname}}{{scope.row.deaprtname}}
</template>
</el-table-column>
<el-table-column prop="year" label="年" width="70"/>
<el-table-column prop="key" label="版本号"/>
<el-table-column prop="time" label="时间" />
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="228">
<template #default="{ row }">
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon></el-button>
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog>
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg>
</div>
</template>
<style lang='scss' scoped>
.qwe {
margin:-8px 0 0 -6px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

265
.history/src/views/opk/asd/news/bb_20231102112922.vue

@ -0,0 +1,265 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api'
import { ge_copy } from '@/api/opk/zxy/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
import Dialoglog from './dialoglog.vue'
import Yg from './yg.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
edPostBox:false,
ygPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
const rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont({})
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const ass = new Date(formdate.value1);
const qwe = ass.getFullYear();
const zjr = qwe.toString();
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name})
.then(data => {
tableq.value = data.data;
total.value = data.data.count;
})
}
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:string,state:number){
console.log("改变状态--------->",classId,state)
let statusVal = 1
if( state == 1) statusVal = 2;
edit_depart({id:classId,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const add = val.key.toString()
handleSure(val)
console.log(val.id)
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleErd=(val:any)=>{
data.edPostBox=true;
rowInfo.value=val;
}
const handleio=(val:any)=>{
data.ygPostBox=true;
rowInfo.value = val;
}
const flitterData4 = (data:any)=>{
let spanOneArr = [] as any[]
let concatOne = 0
data.value.forEach((item:any,index:any)=>{
if(index === 0){
spanOneArr.push(1)
}else{
//name
if(item.department === data.value[index - 1].department){ //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
}
function objectSpanMethod({row, column, rowIndex, columnIndex}:any){
if(columnIndex === 0 ) {
// this.tableData
const _row = (flitterData4(tableq).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container clss="m-4">
<div class="qwe">
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="方案版本号:">
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="25">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="tableq" :span-method="objectSpanMethod" border style="width: 100%">
<el-table-column prop="groupname,deaprtname," label="部门">
<template #default="scope">
{{scope.row.groupname}}{{scope.row.deaprtname}}
</template>
</el-table-column>
<el-table-column prop="year" label="年" width="70"/>
<el-table-column prop="key" label="版本号"/>
<el-table-column prop="time" label="时间" />
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="228">
<template #default="{ row }">
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon></el-button>
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog>
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg>
</div>
</template>
<style lang='scss' scoped>
.qwe {
margin:-8px 0 0 -6px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

265
.history/src/views/opk/asd/news/bb_20231102112931.vue

@ -0,0 +1,265 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api'
import { ge_copy } from '@/api/opk/zxy/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
import Dialoglog from './dialoglog.vue'
import Yg from './yg.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
edPostBox:false,
ygPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
const rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont({})
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const ass = new Date(formdate.value1);
const qwe = ass.getFullYear();
const zjr = qwe.toString();
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name})
.then(data => {
tableq.value = data.data;
total.value = data.data.count;
})
}
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:string,state:number){
console.log("改变状态--------->",classId,state)
let statusVal = 1
if( state == 1) statusVal = 2;
edit_depart({id:classId,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const add = val.key.toString()
handleSure(val)
console.log(val.id)
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleErd=(val:any)=>{
data.edPostBox=true;
rowInfo.value=val;
}
const handleio=(val:any)=>{
data.ygPostBox=true;
rowInfo.value = val;
}
const flitterData4 = (data:any)=>{
let spanOneArr = [] as any[]
let concatOne = 0
data.value.forEach((item:any,index:any)=>{
if(index === 0){
spanOneArr.push(1)
}else{
//name
if(item.department === data.value[index - 1].department){ //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
}
function objectSpanMethod({row, column, rowIndex, columnIndex}:any){
if(columnIndex === 0 ) {
// this.tableData
const _row = (flitterData4(tableq).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container clss="m-4">
<div class="qwe">
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="方案版本号:">
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="25">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="tableq" :span-method="objectSpanMethod" border style="width: 100%">
<el-table-column prop="groupname,deaprtname," label="部门">
<template #default="scope">
{{scope.row.groupname}}{{scope.row.deaprtname}}
</template>
</el-table-column>
<el-table-column prop="year" label="年" width="70"/>
<el-table-column prop="key" label="版本号"/>
<el-table-column prop="time" label="时间" />
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" :inactive-value="1" :active-value="2" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="228">
<template #default="{ row }">
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon></el-button>
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog>
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg>
</div>
</template>
<style lang='scss' scoped>
.qwe {
margin:-8px 0 0 -6px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

265
.history/src/views/opk/asd/news/bb_20231102112933.vue

@ -0,0 +1,265 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api'
import { ge_copy } from '@/api/opk/zxy/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
import Dialoglog from './dialoglog.vue'
import Yg from './yg.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
edPostBox:false,
ygPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
const rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont({})
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const ass = new Date(formdate.value1);
const qwe = ass.getFullYear();
const zjr = qwe.toString();
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name})
.then(data => {
tableq.value = data.data;
total.value = data.data.count;
})
}
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:string,state:number){
console.log("改变状态--------->",classId,state)
let statusVal = 1
if( state == 1) statusVal = 2;
edit_depart({id:classId,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const add = val.key.toString()
handleSure(val)
console.log(val.id)
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleErd=(val:any)=>{
data.edPostBox=true;
rowInfo.value=val;
}
const handleio=(val:any)=>{
data.ygPostBox=true;
rowInfo.value = val;
}
const flitterData4 = (data:any)=>{
let spanOneArr = [] as any[]
let concatOne = 0
data.value.forEach((item:any,index:any)=>{
if(index === 0){
spanOneArr.push(1)
}else{
//name
if(item.department === data.value[index - 1].department){ //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
}
function objectSpanMethod({row, column, rowIndex, columnIndex}:any){
if(columnIndex === 0 ) {
// this.tableData
const _row = (flitterData4(tableq).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container clss="m-4">
<div class="qwe">
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="方案版本号:">
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="25">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="tableq" :span-method="objectSpanMethod" border style="width: 100%">
<el-table-column prop="groupname,deaprtname," label="部门">
<template #default="scope">
{{scope.row.groupname}}{{scope.row.deaprtname}}
</template>
</el-table-column>
<el-table-column prop="year" label="年" width="70"/>
<el-table-column prop="key" label="版本号"/>
<el-table-column prop="time" label="时间" />
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" :inactive-value="1" :active-value="2" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="228">
<template #default="{ row }">
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon></el-button>
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog>
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg>
</div>
</template>
<style lang='scss' scoped>
.qwe {
margin:-8px 0 0 -6px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

265
.history/src/views/opk/asd/news/bb_20231102112935.vue

@ -0,0 +1,265 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api'
import { ge_copy } from '@/api/opk/zxy/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
import Dialoglog from './dialoglog.vue'
import Yg from './yg.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
edPostBox:false,
ygPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
const rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont({})
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const ass = new Date(formdate.value1);
const qwe = ass.getFullYear();
const zjr = qwe.toString();
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name})
.then(data => {
tableq.value = data.data;
total.value = data.data.count;
})
}
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:string,state:number){
console.log("改变状态--------->",classId,state)
let statusVal = 1
if( state == 1) statusVal = 2;
edit_depart({id:classId,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const add = val.key.toString()
handleSure(val)
console.log(val.id)
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleErd=(val:any)=>{
data.edPostBox=true;
rowInfo.value=val;
}
const handleio=(val:any)=>{
data.ygPostBox=true;
rowInfo.value = val;
}
const flitterData4 = (data:any)=>{
let spanOneArr = [] as any[]
let concatOne = 0
data.value.forEach((item:any,index:any)=>{
if(index === 0){
spanOneArr.push(1)
}else{
//name
if(item.department === data.value[index - 1].department){ //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
}
function objectSpanMethod({row, column, rowIndex, columnIndex}:any){
if(columnIndex === 0 ) {
// this.tableData
const _row = (flitterData4(tableq).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container clss="m-4">
<div class="qwe">
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="方案版本号:">
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="25">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="tableq" :span-method="objectSpanMethod" border style="width: 100%">
<el-table-column prop="groupname,deaprtname," label="部门">
<template #default="scope">
{{scope.row.groupname}}{{scope.row.deaprtname}}
</template>
</el-table-column>
<el-table-column prop="year" label="年" width="70"/>
<el-table-column prop="key" label="版本号"/>
<el-table-column prop="time" label="时间" />
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" :inactive-value="1" :active-value="2" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="228">
<template #default="{ row }">
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon></el-button>
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog>
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg>
</div>
</template>
<style lang='scss' scoped>
.qwe {
margin:-8px 0 0 -6px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

265
.history/src/views/opk/asd/news/bb_20231102112945.vue

@ -0,0 +1,265 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api'
import { ge_copy } from '@/api/opk/zxy/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
import Dialoglog from './dialoglog.vue'
import Yg from './yg.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
edPostBox:false,
ygPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
const rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont({})
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const ass = new Date(formdate.value1);
const qwe = ass.getFullYear();
const zjr = qwe.toString();
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name})
.then(data => {
tableq.value = data.data;
total.value = data.data.count;
})
}
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:string,state:number){
console.log("改变状态--------->",classId,state)
let statusVal = 1
if( state == 1) statusVal = 2;
edit_depart({id:classId,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const add = val.key.toString()
handleSure(val)
console.log(val.id)
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleErd=(val:any)=>{
data.edPostBox=true;
rowInfo.value=val;
}
const handleio=(val:any)=>{
data.ygPostBox=true;
rowInfo.value = val;
}
const flitterData4 = (data:any)=>{
let spanOneArr = [] as any[]
let concatOne = 0
data.value.forEach((item:any,index:any)=>{
if(index === 0){
spanOneArr.push(1)
}else{
//name
if(item.department === data.value[index - 1].department){ //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
}
function objectSpanMethod({row, column, rowIndex, columnIndex}:any){
if(columnIndex === 0 ) {
// this.tableData
const _row = (flitterData4(tableq).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container clss="m-4">
<div class="qwe">
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="方案版本号:">
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="25">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="tableq" :span-method="objectSpanMethod" border style="width: 100%">
<el-table-column prop="groupname,deaprtname," label="部门">
<template #default="scope">
{{scope.row.groupname}}{{scope.row.deaprtname}}
</template>
</el-table-column>
<el-table-column prop="year" label="年" width="70"/>
<el-table-column prop="key" label="版本号"/>
<el-table-column prop="time" label="时间" />
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" :inactive-value="1" :active-value="2" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="228">
<template #default="{ row }">
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon></el-button>
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog>
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg>
</div>
</template>
<style lang='scss' scoped>
.qwe {
margin:-8px 0 0 -6px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

265
.history/src/views/opk/asd/news/bb_20231102113235.vue

@ -0,0 +1,265 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api'
import { ge_copy } from '@/api/opk/zxy/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
import Dialoglog from './dialoglog.vue'
import Yg from './yg.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
edPostBox:false,
ygPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
const rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont({})
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const ass = new Date(formdate.value1);
const qwe = ass.getFullYear();
const zjr = qwe.toString();
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name})
.then(data => {
tableq.value = data.data;
total.value = data.data.count;
})
}
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:string,state:number){
console.log("改变状态--------->",classId,state)
let statusVal = 1
if( state == 2) statusVal = 2;
edit_depart({id:classId,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const add = val.key.toString()
handleSure(val)
console.log(val.id)
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleErd=(val:any)=>{
data.edPostBox=true;
rowInfo.value=val;
}
const handleio=(val:any)=>{
data.ygPostBox=true;
rowInfo.value = val;
}
const flitterData4 = (data:any)=>{
let spanOneArr = [] as any[]
let concatOne = 0
data.value.forEach((item:any,index:any)=>{
if(index === 0){
spanOneArr.push(1)
}else{
//name
if(item.department === data.value[index - 1].department){ //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
}
function objectSpanMethod({row, column, rowIndex, columnIndex}:any){
if(columnIndex === 0 ) {
// this.tableData
const _row = (flitterData4(tableq).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container clss="m-4">
<div class="qwe">
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="方案版本号:">
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="25">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="tableq" :span-method="objectSpanMethod" border style="width: 100%">
<el-table-column prop="groupname,deaprtname," label="部门">
<template #default="scope">
{{scope.row.groupname}}{{scope.row.deaprtname}}
</template>
</el-table-column>
<el-table-column prop="year" label="年" width="70"/>
<el-table-column prop="key" label="版本号"/>
<el-table-column prop="time" label="时间" />
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" :inactive-value="1" :active-value="2" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="228">
<template #default="{ row }">
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon></el-button>
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog>
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg>
</div>
</template>
<style lang='scss' scoped>
.qwe {
margin:-8px 0 0 -6px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

265
.history/src/views/opk/asd/news/bb_20231102113241.vue

@ -0,0 +1,265 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api'
import { ge_copy } from '@/api/opk/zxy/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
import Dialoglog from './dialoglog.vue'
import Yg from './yg.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
edPostBox:false,
ygPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
const rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont({})
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const ass = new Date(formdate.value1);
const qwe = ass.getFullYear();
const zjr = qwe.toString();
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name})
.then(data => {
tableq.value = data.data;
total.value = data.data.count;
})
}
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:string,state:number){
console.log("改变状态--------->",classId,state)
let statusVal = 1
if( state == 1) statusVal = 2;
edit_depart({id:classId,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const add = val.key.toString()
handleSure(val)
console.log(val.id)
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleErd=(val:any)=>{
data.edPostBox=true;
rowInfo.value=val;
}
const handleio=(val:any)=>{
data.ygPostBox=true;
rowInfo.value = val;
}
const flitterData4 = (data:any)=>{
let spanOneArr = [] as any[]
let concatOne = 0
data.value.forEach((item:any,index:any)=>{
if(index === 0){
spanOneArr.push(1)
}else{
//name
if(item.department === data.value[index - 1].department){ //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
}
function objectSpanMethod({row, column, rowIndex, columnIndex}:any){
if(columnIndex === 0 ) {
// this.tableData
const _row = (flitterData4(tableq).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container clss="m-4">
<div class="qwe">
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="方案版本号:">
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="25">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="tableq" :span-method="objectSpanMethod" border style="width: 100%">
<el-table-column prop="groupname,deaprtname," label="部门">
<template #default="scope">
{{scope.row.groupname}}{{scope.row.deaprtname}}
</template>
</el-table-column>
<el-table-column prop="year" label="年" width="70"/>
<el-table-column prop="key" label="版本号"/>
<el-table-column prop="time" label="时间" />
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" :inactive-value="1" :active-value="2" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="228">
<template #default="{ row }">
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon></el-button>
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog>
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg>
</div>
</template>
<style lang='scss' scoped>
.qwe {
margin:-8px 0 0 -6px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

265
.history/src/views/opk/asd/news/bb_20231102113430.vue

@ -0,0 +1,265 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api'
import { ge_copy } from '@/api/opk/zxy/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
import Dialoglog from './dialoglog.vue'
import Yg from './yg.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
edPostBox:false,
ygPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
const rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont({})
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const ass = new Date(formdate.value1);
const qwe = ass.getFullYear();
const zjr = qwe.toString();
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name})
.then(data => {
tableq.value = data.data;
total.value = data.data.count;
})
}
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:string,state:number){
console.log("改变状态--------->",classId,state)
let statusVal = 1
if( state == 2) statusVal = 2;
edit_depart({id:classId,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const add = val.key.toString()
handleSure(val)
console.log(val.id)
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleErd=(val:any)=>{
data.edPostBox=true;
rowInfo.value=val;
}
const handleio=(val:any)=>{
data.ygPostBox=true;
rowInfo.value = val;
}
const flitterData4 = (data:any)=>{
let spanOneArr = [] as any[]
let concatOne = 0
data.value.forEach((item:any,index:any)=>{
if(index === 0){
spanOneArr.push(1)
}else{
//name
if(item.department === data.value[index - 1].department){ //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
}
function objectSpanMethod({row, column, rowIndex, columnIndex}:any){
if(columnIndex === 0 ) {
// this.tableData
const _row = (flitterData4(tableq).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container clss="m-4">
<div class="qwe">
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="方案版本号:">
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="25">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="tableq" :span-method="objectSpanMethod" border style="width: 100%">
<el-table-column prop="groupname,deaprtname," label="部门">
<template #default="scope">
{{scope.row.groupname}}{{scope.row.deaprtname}}
</template>
</el-table-column>
<el-table-column prop="year" label="年" width="70"/>
<el-table-column prop="key" label="版本号"/>
<el-table-column prop="time" label="时间" />
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" :inactive-value="1" :active-value="2" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="228">
<template #default="{ row }">
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon></el-button>
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog>
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg>
</div>
</template>
<style lang='scss' scoped>
.qwe {
margin:-8px 0 0 -6px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

265
.history/src/views/opk/asd/news/bb_20231102113635.vue

@ -0,0 +1,265 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api'
import { ge_copy } from '@/api/opk/zxy/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
import Dialoglog from './dialoglog.vue'
import Yg from './yg.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
edPostBox:false,
ygPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
const rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont({})
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const ass = new Date(formdate.value1);
const qwe = ass.getFullYear();
const zjr = qwe.toString();
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name})
.then(data => {
tableq.value = data.data;
total.value = data.data.count;
})
}
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:string,state:number){
console.log("改变状态--------->",classId,state)
let statusVal = 1
if( state == 2) statusVal = 2;
edit_depart({id:classId,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const add = val.key.toString()
handleSure(val)
console.log(val.id)
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleErd=(val:any)=>{
data.edPostBox=true;
rowInfo.value=val;
}
const handleio=(val:any)=>{
data.ygPostBox=true;
rowInfo.value = val;
}
const flitterData4 = (data:any)=>{
let spanOneArr = [] as any[]
let concatOne = 0
data.value.forEach((item:any,index:any)=>{
if(index === 0){
spanOneArr.push(1)
}else{
//name
if(item.department === data.value[index - 1].department){ //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
}
function objectSpanMethod({row, column, rowIndex, columnIndex}:any){
if(columnIndex === 0 ) {
// this.tableData
const _row = (flitterData4(tableq).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container clss="m-4">
<div class="qwe">
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="方案版本号:">
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="25">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="tableq" :span-method="objectSpanMethod" border style="width: 100%">
<el-table-column prop="groupname,deaprtname," label="部门">
<template #default="scope">
{{scope.row.groupname}}{{scope.row.deaprtname}}
</template>
</el-table-column>
<el-table-column prop="year" label="年" width="70"/>
<el-table-column prop="key" label="版本号"/>
<el-table-column prop="time" label="时间" />
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" :inactive-value="1" :active-value="1" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="228">
<template #default="{ row }">
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon></el-button>
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog>
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg>
</div>
</template>
<style lang='scss' scoped>
.qwe {
margin:-8px 0 0 -6px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

265
.history/src/views/opk/asd/news/bb_20231102113637.vue

@ -0,0 +1,265 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api'
import { ge_copy } from '@/api/opk/zxy/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
import Dialoglog from './dialoglog.vue'
import Yg from './yg.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
edPostBox:false,
ygPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
const rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont({})
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const ass = new Date(formdate.value1);
const qwe = ass.getFullYear();
const zjr = qwe.toString();
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name})
.then(data => {
tableq.value = data.data;
total.value = data.data.count;
})
}
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:string,state:number){
console.log("改变状态--------->",classId,state)
let statusVal = 1
if( state == 2) statusVal = 2;
edit_depart({id:classId,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const add = val.key.toString()
handleSure(val)
console.log(val.id)
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleErd=(val:any)=>{
data.edPostBox=true;
rowInfo.value=val;
}
const handleio=(val:any)=>{
data.ygPostBox=true;
rowInfo.value = val;
}
const flitterData4 = (data:any)=>{
let spanOneArr = [] as any[]
let concatOne = 0
data.value.forEach((item:any,index:any)=>{
if(index === 0){
spanOneArr.push(1)
}else{
//name
if(item.department === data.value[index - 1].department){ //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
}
function objectSpanMethod({row, column, rowIndex, columnIndex}:any){
if(columnIndex === 0 ) {
// this.tableData
const _row = (flitterData4(tableq).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container clss="m-4">
<div class="qwe">
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="方案版本号:">
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="25">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="tableq" :span-method="objectSpanMethod" border style="width: 100%">
<el-table-column prop="groupname,deaprtname," label="部门">
<template #default="scope">
{{scope.row.groupname}}{{scope.row.deaprtname}}
</template>
</el-table-column>
<el-table-column prop="year" label="年" width="70"/>
<el-table-column prop="key" label="版本号"/>
<el-table-column prop="time" label="时间" />
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" :inactive-value="2" :active-value="1" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="228">
<template #default="{ row }">
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon></el-button>
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog>
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg>
</div>
</template>
<style lang='scss' scoped>
.qwe {
margin:-8px 0 0 -6px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

265
.history/src/views/opk/asd/news/bb_20231102113644.vue

@ -0,0 +1,265 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api'
import { ge_copy } from '@/api/opk/zxy/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
import Dialoglog from './dialoglog.vue'
import Yg from './yg.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
edPostBox:false,
ygPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
const rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont({})
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const ass = new Date(formdate.value1);
const qwe = ass.getFullYear();
const zjr = qwe.toString();
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name})
.then(data => {
tableq.value = data.data;
total.value = data.data.count;
})
}
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:string,state:number){
console.log("改变状态--------->",classId,state)
let statusVal = 1
if( state == 1) statusVal = 2;
edit_depart({id:classId,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const add = val.key.toString()
handleSure(val)
console.log(val.id)
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleErd=(val:any)=>{
data.edPostBox=true;
rowInfo.value=val;
}
const handleio=(val:any)=>{
data.ygPostBox=true;
rowInfo.value = val;
}
const flitterData4 = (data:any)=>{
let spanOneArr = [] as any[]
let concatOne = 0
data.value.forEach((item:any,index:any)=>{
if(index === 0){
spanOneArr.push(1)
}else{
//name
if(item.department === data.value[index - 1].department){ //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
}
function objectSpanMethod({row, column, rowIndex, columnIndex}:any){
if(columnIndex === 0 ) {
// this.tableData
const _row = (flitterData4(tableq).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container clss="m-4">
<div class="qwe">
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="方案版本号:">
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="25">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="tableq" :span-method="objectSpanMethod" border style="width: 100%">
<el-table-column prop="groupname,deaprtname," label="部门">
<template #default="scope">
{{scope.row.groupname}}{{scope.row.deaprtname}}
</template>
</el-table-column>
<el-table-column prop="year" label="年" width="70"/>
<el-table-column prop="key" label="版本号"/>
<el-table-column prop="time" label="时间" />
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" :inactive-value="2" :active-value="1" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="228">
<template #default="{ row }">
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon></el-button>
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog>
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg>
</div>
</template>
<style lang='scss' scoped>
.qwe {
margin:-8px 0 0 -6px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

265
.history/src/views/opk/asd/news/bb_20231102113944.vue

@ -0,0 +1,265 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api'
import { ge_copy } from '@/api/opk/zxy/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
import Dialoglog from './dialoglog.vue'
import Yg from './yg.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
edPostBox:false,
ygPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
const rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont({})
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const ass = new Date(formdate.value1);
const qwe = ass.getFullYear();
const zjr = qwe.toString();
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name})
.then(data => {
tableq.value = data.data;
total.value = data.data.count;
})
}
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:string,state:number){
console.log("改变状态--------->",classId,state)
let statusVal = 1
if( state == 1) statusVal = 2;
edit_depart({id:classId,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const add = val.key.toString()
handleSure(val)
console.log(val.id)
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleErd=(val:any)=>{
data.edPostBox=true;
rowInfo.value=val;
}
const handleio=(val:any)=>{
data.ygPostBox=true;
rowInfo.value = val;
}
const flitterData4 = (data:any)=>{
let spanOneArr = [] as any[]
let concatOne = 0
data.value.forEach((item:any,index:any)=>{
if(index === 0){
spanOneArr.push(1)
}else{
//name
if(item.department === data.value[index - 1].department){ //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
}
function objectSpanMethod({row, column, rowIndex, columnIndex}:any){
if(columnIndex === 0 ) {
// this.tableData
const _row = (flitterData4(tableq).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container clss="m-4">
<div class="qwe">
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="方案版本号:">
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="25">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="tableq" :span-method="objectSpanMethod" border style="width: 100%">
<el-table-column prop="groupname,deaprtname," label="部门">
<template #default="scope">
{{scope.row.groupname}}{{scope.row.deaprtname}}
</template>
</el-table-column>
<el-table-column prop="year" label="年" width="70"/>
<el-table-column prop="key" label="版本号"/>
<el-table-column prop="time" label="时间" />
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" :inactive-value="2" :active-value="1" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #ff4949" @change="editPostState(scope.row.key,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="228">
<template #default="{ row }">
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon></el-button>
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog>
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg>
</div>
</template>
<style lang='scss' scoped>
.qwe {
margin:-8px 0 0 -6px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

265
.history/src/views/opk/asd/news/bb_20231102113947.vue

@ -0,0 +1,265 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api'
import { ge_copy } from '@/api/opk/zxy/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
import Dialoglog from './dialoglog.vue'
import Yg from './yg.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
edPostBox:false,
ygPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
const rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont({})
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const ass = new Date(formdate.value1);
const qwe = ass.getFullYear();
const zjr = qwe.toString();
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name})
.then(data => {
tableq.value = data.data;
total.value = data.data.count;
})
}
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:string,state:number){
console.log("改变状态--------->",classId,state)
let statusVal = 1
if( state == 1) statusVal = 2;
edit_depart({id:classId,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const add = val.key.toString()
handleSure(val)
console.log(val.id)
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleErd=(val:any)=>{
data.edPostBox=true;
rowInfo.value=val;
}
const handleio=(val:any)=>{
data.ygPostBox=true;
rowInfo.value = val;
}
const flitterData4 = (data:any)=>{
let spanOneArr = [] as any[]
let concatOne = 0
data.value.forEach((item:any,index:any)=>{
if(index === 0){
spanOneArr.push(1)
}else{
//name
if(item.department === data.value[index - 1].department){ //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
}
function objectSpanMethod({row, column, rowIndex, columnIndex}:any){
if(columnIndex === 0 ) {
// this.tableData
const _row = (flitterData4(tableq).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container clss="m-4">
<div class="qwe">
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="方案版本号:">
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="25">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="tableq" :span-method="objectSpanMethod" border style="width: 100%">
<el-table-column prop="groupname,deaprtname," label="部门">
<template #default="scope">
{{scope.row.groupname}}{{scope.row.deaprtname}}
</template>
</el-table-column>
<el-table-column prop="year" label="年" width="70"/>
<el-table-column prop="key" label="版本号"/>
<el-table-column prop="time" label="时间" />
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" :inactive-value="2" :active-value="1" class="ml-2" inline-prompt style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949" @change="editPostState(scope.row.key,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="228">
<template #default="{ row }">
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon></el-button>
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog>
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg>
</div>
</template>
<style lang='scss' scoped>
.qwe {
margin:-8px 0 0 -6px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102103329.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102103449.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el- v-model="scope.row.stat" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102103450.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-us v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102103455.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102103459.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102103501.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

274
.history/src/views/opk/yui/new/aa_20231102104039.vue

@ -0,0 +1,274 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" active-value="1"
inactive-value="2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102104043.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" active-value="1" inactive-value="2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102104048.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" active-value="1" inactive-value="2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102104051.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" active-value="1" inactive-value="2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102104107.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" active-value="1" inactive-value="2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102104126.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" active-value="1" inactive-value="2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102104128.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" active-value="1" inactive-value="2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102104223.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="1" inactive-value="2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102104226.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="1" :inactive-value="2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102104245.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="1" :inactive-value="2" inline-prompt act @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102104250.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="1" :inactive-value="2" inline-prompt active-color @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102104253.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="1" :inactive-value="2" inline-prompt active-colo @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102104257.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="1" :inactive-value="2" inline-prompt active-color="" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102104259.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="1" :inactive-value="2" inline-prompt active-color="#" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102104300.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="1" :inactive-value="2" inline-prompt active-color="#13" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102104305.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="1" :inactive-value="2" inline-prompt active-color="#13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102104307.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="1" :inactive-value="2" inline-prompt active-color="#13ce66" a @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102104311.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="1" :inactive-value="2" inline-prompt active-color="#13ce66" in @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102104315.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="1" :inactive-value="2" inline-prompt active-color="#13ce66" inactive-color @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102104316.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="1" :inactive-value="2" inline-prompt active-color="#13ce66" inactive-color="" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102104319.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="1" :inactive-value="2" inline-prompt active-color="#13ce66" inactive-color="#ff" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102104322.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="1" :inactive-value="2" inline-prompt active-color="#13ce66" inactive-color="#ff4949" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102104445.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="1" :inactive-value="2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102104539.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102104550.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="1" :inactive-value="2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102104817.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="1" :inactive-value="2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102105012.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2
deltarget({id:add, state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="1" :inactive-value="2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102105650.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2
deltarget({id:add, state:statusVal,istrue:2})
tarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="1" :inactive-value="2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102105814.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2
deltarget({id:add, state:statusVal,istrue:2})
tarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="2" :inactive-value="2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102105816.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2
deltarget({id:add, state:statusVal,istrue:2})
tarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="2" :inactive-value="1" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102105917.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2
deltarget({id:add, state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="2" :inactive-value="1" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102105948.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102110006.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102110024.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" :active-value="2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102110032.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" :active-value="2" :inactive-value inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102110035.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" :active-value="2" :inactive-value="1" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102110037.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" :active-value="2" :inactive-value="1" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102110057.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="2" :inactive-value="1" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102110139.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" :active-value="2" :inactive-value="1" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102110211.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" :active-value="2" :inactive-value="1" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102110232.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" :active-value="2" :inactive-value="1" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102110236.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="2" :inactive-value="1" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102110326.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" :active-value="2" :inactive-value="1" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102110331.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" :active-value="2" :inactive-value="1" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102110359.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="2" :inactive-value="1" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102110422.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" :active-value="2" :inactive-value="1" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102110454.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" :active-value="2" :inactive-value="1" inline-prompt @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102110708.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" :active-value="2" :inactive-value="1" inline-prompt active-text="开启" inactive-text="关闭" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102110807.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch :model="scope.row.status" class="ml-2" :active-value="2" :inactive-value="1" inline-prompt active-text="开启" inactive-text="关闭" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102110811.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch :model="scope.row.state" class="ml-2" :active-value="2" :inactive-value="1" inline-prompt active-text="开启" inactive-text="关闭" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102110839.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch :model="scope.row.status" class="ml-2" :active-value="2" :inactive-value="1" inline-prompt active-text="开启" inactive-text="关闭" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

274
.history/src/views/opk/yui/new/aa_20231102111121.vue

@ -0,0 +1,274 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch :model="scope.row.status" class="ml-2" :active-value="2" :inactive-value="1" inline-prompt active-color="rgb(102, 204, 255)"
inactive-color="#ff4949" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102111128.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch :model="scope.row.status" class="ml-2" :active-value="2" :inactive-value="1" inline-prompt active-color="rgb(102, 204, 255)" inactive-color="#ff4949" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102111155.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch :model="scope.row.status" class="ml-2" :active-value="2" :inactive-value="1" inline-prompt active-color="rgb(102, 204, 255)" inactive-color="#ff4949" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102111224.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102111235.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102111255.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102111258.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102111336.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102111344.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="2" :inactive-value="1" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102111347.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="2" :inactive-value="1" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102111442.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="1" :inactive-value="1" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102111444.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="1" :inactive-value="2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102111517.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="1" :inactive-value="2" inline-prompt inactivecolor: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102111520.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="1" :inactive-value="2" inline-prompt inactive-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102111525.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="1" :inactive-value="2" inline-prompt inactive-color= #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

273
.history/src/views/opk/yui/new/aa_20231102111527.vue

@ -0,0 +1,273 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-09-19 09:13:14
@ 备注:
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Diolog from './diolog.vue'
import Edit from './editdialog.vue'
import ED from './edcialog.vue'
import zjr from './zjr.vue'
import { addPostCont,tarlist,deltarget } from '@/api/opk/api'
import { editPostCont } from '@/api/opk/pulic/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
addPostBox: false,
editPostCont:false,
edPostCont:false,
zjrPostBox:false,
})
const orgTreeProps ={
label: 'name',
children:'child'
}
const orgTreeProp ={
label: 'title',
children:'childen'
}
const formdat = {
someProp:"",
}
const total =ref(0)
let rowInfo = ref<any>({})
const postIds = ref<number[]>([])
const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
addPostCont("/hrapi/org/govthree","post")
.then(data => {
tableData.value = data.data[3].child[14].child;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:10,
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
type:"",
})
//
const pages = ref(0)
const pagesizes = ref(4)
const newtarlist=()=>{
const add = formdate.type.toString()
tarlist({page:formdate.page,pageSize:formdate.pagesize,name:formdate.name,dimension:formdate.dimension, attribute:add,orgidlist:formdate.orgidlist})
.then(data=>{
table.value = data.data.list
total.value = data.data.total;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
newtarlist()
//
const addtableData = ()=>{
data.addPostBox = true;
}
//
const addRow = (val:any)=> {
tableData.value.push(val);
}
//
const editRow = (val:any)=> {
let index =tableData.value.findIndex(
(item:any) => item.id === val.id
);
tableData.value.splice(index, 1, val);
}
//
const closeDetail = ()=>{
data.addPostBox = false;
}
//
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
deltarget({id:add,state:statusVal,istrue:2})
newtarlist()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
let dictTypeIdAry = dictTypeIds.split(",")
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const delid = new String(val.id)
handleSure(val)
console.log(val.id)
deltarget({id:delid,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
newtarlist()
})
.catch(() => {
alert('用户取消了删除操作');
});
};
const handleSure = (val:any)=> {
const index = tableData.value.findIndex((item:any) => item.id === val.id);
if(index!=-1){
tableData.value.splice(index, 1);
}
}
const resetChecked=()=> {
formdate.orgidlist = []
newtarlist()
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split(',')
newtarlist()
}
const handleedit=(val:any)=>{
data.editPostCont=true,
rowInfo.value=val;
}
const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const jkl=(val:any)=>{
data.zjrPostBox=true;
rowInfo.value = val;
}
onMounted(()=>{
jjjs()
newtarlist()
})
</script>
<template>
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" :value="1" />
<el-option label="定量指标" :value="2" />
</el-select>
</el-form-item>
<el-form-item label-width="18">
<el-button type="primary" @click="newtarlist"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-1" :data="table" style="width: 100%">
<el-table-column label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod == 2" style="color:#409eff" @click="jkl(scope.row)">{{scope.row.title}}</a>
<a v-if="scope.row.scoringmethod == 1">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensiontitle" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质">
<template #default="scope">
<span v-if="scope.row.scoringmethod== 1">定量考核</span>
<span v-if="scope.row.scoringmethod== 2">定性考核</span>
</template>
</el-table-column>
<el-table-column prop="unites" label="计量单位" />
<el-table-column prop="cycle" label="考核周期">
<template #default="scope">
<span v-if="scope.row.cycle== 4" class="el-tag">季度</span>
<span v-if="scope.row.cycle== 5" class="el-tag"></span>
<span v-if="scope.row.cycle== 6" class="el-tag"></span>
</template>
</el-table-column>
<el-table-column prop="cycleattr" label="计分方式">
<template #default="scope">
<span v-if="scope.row.cycleattr== 1" class="el-tag">自动计分</span>
<span v-if="scope.row.cycleattr== 2" class="el-tag">手动计分</span>
</template>
</el-table-column>
<el-table-column prop="relevantdepartments" label="关联部门">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详情">
<el-option v-for="item in scope.row.relevantdepartmentsmap" :key="item.key" :label="item.title" :value="item.title"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="reportmap[0].title" label="数据提交"/>
<el-table-column prop="share" label="辅助计数"/>
<el-table-column prop="state" label="状态" width="70">
<template #default="scope">
<el-switch v-model="scope.row.state" class="ml-2" :active-value="1" :inactive-value="2" inline-prompt inactive-color=" #ff4949"; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.id,scope.row.state)"/>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="250">
<template #default="{ row }">
<el-button type="primary" link @click="handleErd(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleedit(row)"><el-icon><EditPen /></el-icon></el-button>
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon></el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-container>
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @pagination="newtarlist"/>
<Diolog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Diolog>
<Edit v-if="data.editPostCont" v-model="data.editPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></Edit>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.length"></ED>
<zjr v-if="data.zjrPostBox" v-model="data.zjrPostBox" :row-info="rowInfo" :title="title" :array-num="tableData.length"></zjr>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.aaa{
display:flex;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:700px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
.qwe{
margin:-15px 10px 0 -14px;
}
.wer{
margin: -7px 0 0 15px;
}
/* 可以根据需要调整样式 */
</style>

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save