2218 changed files with 103573 additions and 208414 deletions
@ -0,0 +1,214 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div class="m-4"> |
|||
<el-container style="width: 100%"> |
|||
<div> |
|||
<el-button type="primary" style="width: 100%" @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-col :span="22"> |
|||
<el-container class="m-4"> |
|||
<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="40"> |
|||
<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-4" :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"> |
|||
|
|||
</el-table |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="states" 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> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -0,0 +1,214 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div class="m-4"> |
|||
<el-container style="width: 100%"> |
|||
<div> |
|||
<el-button type="primary" style="width: 100%" @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-col :span="22"> |
|||
<el-container class="m-4"> |
|||
<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="40"> |
|||
<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-4" :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"> |
|||
|
|||
</el-table-column> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="states" 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> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -0,0 +1,214 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div class="m-4"> |
|||
<el-container style="width: 100%"> |
|||
<div> |
|||
<el-button type="primary" style="width: 100%" @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-col :span="22"> |
|||
<el-container class="m-4"> |
|||
<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="40"> |
|||
<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-4" :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"> |
|||
{{}} |
|||
</el-table-column> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="states" 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> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -0,0 +1,214 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div class="m-4"> |
|||
<el-container style="width: 100%"> |
|||
<div> |
|||
<el-button type="primary" style="width: 100%" @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-col :span="22"> |
|||
<el-container class="m-4"> |
|||
<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="40"> |
|||
<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-4" :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname," label="部门"> |
|||
{{}} |
|||
</el-table-column> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="states" 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> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -0,0 +1,214 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div class="m-4"> |
|||
<el-container style="width: 100%"> |
|||
<div> |
|||
<el-button type="primary" style="width: 100%" @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-col :span="22"> |
|||
<el-container class="m-4"> |
|||
<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="40"> |
|||
<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-4" :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="groupname,deaprtname," label="部门"> |
|||
{{}} |
|||
</el-table-column> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="states" 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> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -0,0 +1,214 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div class="m-4"> |
|||
<el-container style="width: 100%"> |
|||
<div> |
|||
<el-button type="primary" style="width: 100%" @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-col :span="22"> |
|||
<el-container class="m-4"> |
|||
<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="40"> |
|||
<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-4" :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="groupname,deaprtname," label="部门"> |
|||
{{groupname}} |
|||
</el-table-column> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="states" 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> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -0,0 +1,215 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div class="m-4"> |
|||
<el-container style="width: 100%"> |
|||
<div> |
|||
<el-button type="primary" style="width: 100%" @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-col :span="22"> |
|||
<el-container class="m-4"> |
|||
<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="40"> |
|||
<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-4" :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="groupname,deaprtname," label="部门"> |
|||
|
|||
{{groupname}} |
|||
</el-table-column> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="states" 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> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -0,0 +1,215 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div class="m-4"> |
|||
<el-container style="width: 100%"> |
|||
<div> |
|||
<el-button type="primary" style="width: 100%" @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-col :span="22"> |
|||
<el-container class="m-4"> |
|||
<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="40"> |
|||
<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-4" :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="groupname,deaprtname," label="部门"> |
|||
<template #default = |
|||
{{groupname}} |
|||
</el-table-column> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="states" 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> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -0,0 +1,215 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div class="m-4"> |
|||
<el-container style="width: 100%"> |
|||
<div> |
|||
<el-button type="primary" style="width: 100%" @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-col :span="22"> |
|||
<el-container class="m-4"> |
|||
<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="40"> |
|||
<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-4" :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="groupname,deaprtname," label="部门"> |
|||
<template #default=scope> |
|||
{{groupname}} |
|||
</el-table-column> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="states" 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> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -0,0 +1,215 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div class="m-4"> |
|||
<el-container style="width: 100%"> |
|||
<div> |
|||
<el-button type="primary" style="width: 100%" @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-col :span="22"> |
|||
<el-container class="m-4"> |
|||
<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="40"> |
|||
<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-4" :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="groupname,deaprtname," label="部门"> |
|||
<template #default="scope"> |
|||
{{groupname}} |
|||
</el-table-column> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="states" 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> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -0,0 +1,216 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div class="m-4"> |
|||
<el-container style="width: 100%"> |
|||
<div> |
|||
<el-button type="primary" style="width: 100%" @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-col :span="22"> |
|||
<el-container class="m-4"> |
|||
<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="40"> |
|||
<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-4" :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="groupname,deaprtname," label="部门"> |
|||
<template #default="scope"> |
|||
{{groupname}} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="states" 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> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -0,0 +1,216 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div class="m-4"> |
|||
<el-container style="width: 100%"> |
|||
<div> |
|||
<el-button type="primary" style="width: 100%" @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-col :span="22"> |
|||
<el-container class="m-4"> |
|||
<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="40"> |
|||
<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-4" :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="groupname,deaprtname," label="部门"> |
|||
<template #default="scope"> |
|||
{{scope.groupname}} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="states" 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> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -0,0 +1,216 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div class="m-4"> |
|||
<el-container style="width: 100%"> |
|||
<div> |
|||
<el-button type="primary" style="width: 100%" @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-col :span="22"> |
|||
<el-container class="m-4"> |
|||
<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="40"> |
|||
<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-4" :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="groupname,deaprtname," label="部门"> |
|||
<template #default="scope"> |
|||
{{scope.row.groupname}} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="states" 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> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -0,0 +1,216 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div class="m-4"> |
|||
<el-container style="width: 100%"> |
|||
<div> |
|||
<el-button type="primary" style="width: 100%" @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-col :span="22"> |
|||
<el-container class="m-4"> |
|||
<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="40"> |
|||
<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-4" :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="groupname,deaprtname," label="部门"> |
|||
<template #default="scope"> |
|||
{{scope.row.groupname}}{{}} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="states" 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> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -0,0 +1,216 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div class="m-4"> |
|||
<el-container style="width: 100%"> |
|||
<div> |
|||
<el-button type="primary" style="width: 100%" @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-col :span="22"> |
|||
<el-container class="m-4"> |
|||
<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="40"> |
|||
<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-4" :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="groupname,deaprtname," label="部门"> |
|||
<template #default="scope"> |
|||
{{scope.row.groupname}}{{scope.row}} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="states" 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> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -0,0 +1,216 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div class="m-4"> |
|||
<el-container style="width: 100%"> |
|||
<div> |
|||
<el-button type="primary" style="width: 100%" @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-col :span="22"> |
|||
<el-container class="m-4"> |
|||
<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="40"> |
|||
<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-4" :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="groupname,deaprtname," label="部门"> |
|||
<template #default="scope"> |
|||
{{scope.row.groupname}}{{scope.row,}} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="states" 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> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -0,0 +1,216 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div class="m-4"> |
|||
<el-container style="width: 100%"> |
|||
<div> |
|||
<el-button type="primary" style="width: 100%" @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-col :span="22"> |
|||
<el-container class="m-4"> |
|||
<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="40"> |
|||
<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-4" :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="groupname,deaprtname," label="部门"> |
|||
<template #default="scope"> |
|||
{{scope.row.groupname}}{{scope.row.}} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="states" 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> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -0,0 +1,216 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div class="m-4"> |
|||
<el-container style="width: 100%"> |
|||
<div> |
|||
<el-button type="primary" style="width: 100%" @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-col :span="22"> |
|||
<el-container class="m-4"> |
|||
<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="40"> |
|||
<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-4" :data="tableq" 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="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="states" 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> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -0,0 +1,216 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div class="m-4"> |
|||
<el-container style="width: 100%"> |
|||
<div> |
|||
<el-button type="primary" style="width: 100%" @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-col :span="22"> |
|||
<el-container class="m-4"> |
|||
<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="40"> |
|||
<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-4" :data="tableq" 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="年" la/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="states" 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> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -0,0 +1,216 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div class="m-4"> |
|||
<el-container style="width: 100%"> |
|||
<div> |
|||
<el-button type="primary" style="width: 100%" @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-col :span="22"> |
|||
<el-container class="m-4"> |
|||
<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="40"> |
|||
<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-4" :data="tableq" 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="年" label-width=""/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="states" 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> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -0,0 +1,216 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div class="m-4"> |
|||
<el-container style="width: 100%"> |
|||
<div> |
|||
<el-button type="primary" style="width: 100%" @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-col :span="22"> |
|||
<el-container class="m-4"> |
|||
<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="40"> |
|||
<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-4" :data="tableq" 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="年" label-width="30"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="states" 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> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -0,0 +1,216 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div class="m-4"> |
|||
<el-container style="width: 100%"> |
|||
<div> |
|||
<el-button type="primary" style="width: 100%" @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-col :span="22"> |
|||
<el-container class="m-4"> |
|||
<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="40"> |
|||
<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-4" :data="tableq" 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="30"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="states" 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> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -0,0 +1,216 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div class="m-4"> |
|||
<el-container style="width: 100%"> |
|||
<div> |
|||
<el-button type="primary" style="width: 100%" @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-col :span="22"> |
|||
<el-container class="m-4"> |
|||
<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="40"> |
|||
<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-4" :data="tableq" 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="states" 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> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -0,0 +1,70 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="考核细则" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" style="width:100%"> |
|||
<el-table-column prop="tablename" label="考核项目" /> |
|||
<el-table-column prop="targetname" label="考核内容"/> |
|||
<el-table-column prop="criterion" label="考核标准"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="content" label="备注说明"/> |
|||
</el-table> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue" |
|||
import { get_runman,look_scheme } from '@/api/opk/zxy/news/api' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ycyPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
|
|||
const emit = defineEmits(["update:ycyPostBox","editRow","addRow"]) |
|||
const formData = reactive({}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.targetid |
|||
look_scheme({id:yui,level:1,orgid:props.rowInfo.orgid,posid:"",type:3}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ycyPostBox", false); |
|||
} |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,149 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
|
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,147 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,148 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,148 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function objectSpanMethod |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,148 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function objectSpanMethod() |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,150 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function objectSpanMethod(){ |
|||
|
|||
} |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,237 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] && |
|||
data[i][otherRowName] == data[i - 1][otherRowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: PriceTableItem; |
|||
column: TableColumnCtx<PriceTableItem>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 1) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 1 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(() => { |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}); |
|||
|
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,237 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] && |
|||
data[i][otherRowName] == data[i - 1][otherRowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: PriceTableItem; |
|||
column: TableColumnCtx<PriceTableItem>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 1) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 0 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(() => { |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}); |
|||
|
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,238 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] && |
|||
data[i][otherRowName] == data[i - 1][otherRowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: PriceTableItem; |
|||
column: TableColumnCtx<PriceTableItem>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 1) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 0 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(() => { |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}); |
|||
|
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,235 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] && |
|||
data[i][otherRowName] == data[i - 1][otherRowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: PriceTableItem; |
|||
column: TableColumnCtx<PriceTableItem>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 1) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 0 |
|||
}; |
|||
} |
|||
}; |
|||
|
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,233 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] && |
|||
data[i][otherRowName] == data[i - 1][otherRowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: PriceTableItem; |
|||
column: TableColumnCtx<PriceTableItem>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 1) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 0 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,233 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] && |
|||
data[i][otherRowName] == data[i - 1][otherRowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: User; |
|||
column: TableColumnCtx<PriceTableItem>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 1) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 0 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,233 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] && |
|||
data[i][otherRowName] == data[i - 1][otherRowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: User; |
|||
column: TableColumnCtx<User>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 1) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 0 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,233 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] && |
|||
data[i][otherRowName] == data[i - 1][otherRowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: User; |
|||
column: TableColumnCtx<User>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 1) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 1 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,233 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] && |
|||
data[i][otherRowName] == data[i - 1][otherRowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: User; |
|||
column: TableColumnCtx<User>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 1) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 2 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,233 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] && |
|||
data[i][otherRowName] == data[i - 1][otherRowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: User; |
|||
column: TableColumnCtx<User>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 1) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 1 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,233 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] && |
|||
data[i][otherRowName] == data[i - 1][otherRowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: User; |
|||
column: TableColumnCtx<User>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 0) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 1 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,233 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] && |
|||
data[i][otherRowName] == data[i - 1][otherRowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: User; |
|||
column: TableColumnCtx<User>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 1) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 1 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,233 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] && |
|||
data[i][otherRowName] == data[i - 1][otherRowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: User; |
|||
column: TableColumnCtx<User>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 1,2) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 1 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,233 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] && |
|||
data[i][otherRowName] == data[i - 1][otherRowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: User; |
|||
column: TableColumnCtx<User>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 1) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 1 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,232 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: User; |
|||
column: TableColumnCtx<User>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 1) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 1 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,233 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] && |
|||
data[i][otherRowName] == data[i - 1][otherRowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: User; |
|||
column: TableColumnCtx<User>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 1) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 1 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,232 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: User; |
|||
column: TableColumnCtx<User>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 1) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 1 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,232 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: User; |
|||
column: TableColumnCtx<User>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 1) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 1 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,232 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度 "/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: User; |
|||
column: TableColumnCtx<User>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 1) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 1 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,232 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度" /> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: User; |
|||
column: TableColumnCtx<User>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 1) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 1 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,232 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度" :span-method="objectSpanMethod"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: User; |
|||
column: TableColumnCtx<User>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 1) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 1 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,232 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度" :span-method="objectSpanMethod"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: User; |
|||
column: TableColumnCtx<User>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 1) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 1 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,232 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: User; |
|||
column: TableColumnCtx<User>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 1) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 1 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,196 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
// 领域合并 |
|||
, courseinit() { |
|||
// 首先初始化 |
|||
var _this = this; |
|||
this.courseArr = [] |
|||
this.coursePos = 0 |
|||
for (var i = 0; i < _this.tableData2.length; i++) { |
|||
//判断是否是第一行 |
|||
if (i === 0) { |
|||
//导入第一行数据 |
|||
_this.courseArr.push(1) |
|||
_this.coursePos = 0 |
|||
} else { |
|||
//不是第一行时,就根据标识去存储,course为我第一行的prop属性的值 |
|||
if (_this.tableData2[i].course === _this.tableData2[i - 1].course) { |
|||
// 查找到下一行的数据等于上一行的数据时每次要把之前存储的数据+1 |
|||
_this.courseArr[_this.coursePos] += 1 |
|||
_this.courseArr.push(0) |
|||
} else { |
|||
// 没有相同的数据时候,要记住当前的index |
|||
_this.courseArr.push(1) |
|||
_this.coursePos = i |
|||
} |
|||
} |
|||
} |
|||
} |
|||
//然后开始写组件自带的方法, |
|||
, objectSpanMethod({rowIndex, columnIndex}) { |
|||
//判断第一列的数据,上下行有没有相同的数据,有则合并,无则保留 |
|||
if (columnIndex === 0) { |
|||
//courseArr数组是上面输出来的,用来合并表格前做的数据判断 |
|||
const row1 = this.courseArr[rowIndex] |
|||
const col1 = row1 > 0 ? 1 : 0 |
|||
return { |
|||
rowspan: row1, |
|||
colspan: col1 |
|||
} |
|||
} else if (columnIndex === 1) { |
|||
//这里是判断第二列的数据,nameArr和领域合并时候的处理一样,以此类推 |
|||
const row1 = this.nameArr[rowIndex] |
|||
const col1 = row1 > 0 ? 1 : 0 |
|||
return { |
|||
rowspan: row1, |
|||
colspan: col1 |
|||
} |
|||
} |
|||
} |
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,196 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
// 领域合并 |
|||
, courseinit() { |
|||
// 首先初始化 |
|||
var _this = this; |
|||
this.courseArr = [] |
|||
this.coursePos = 0 |
|||
for (var i = 0; i < _this.tableData2.length; i++) { |
|||
//判断是否是第一行 |
|||
if (i === 0) { |
|||
//导入第一行数据 |
|||
_this.courseArr.push(1) |
|||
_this.coursePos = 0 |
|||
} else { |
|||
//不是第一行时,就根据标识去存储,course为我第一行的prop属性的值 |
|||
if (_this.tableData2[i].course === _this.tableData2[i - 1].course) { |
|||
// 查找到下一行的数据等于上一行的数据时每次要把之前存储的数据+1 |
|||
_this.courseArr[_this.coursePos] += 1 |
|||
_this.courseArr.push(0) |
|||
} else { |
|||
// 没有相同的数据时候,要记住当前的index |
|||
_this.courseArr.push(1) |
|||
_this.coursePos = i |
|||
} |
|||
} |
|||
} |
|||
} |
|||
//然后开始写组件自带的方法, |
|||
objectSpanMethod({rowIndex, columnIndex}) { |
|||
//判断第一列的数据,上下行有没有相同的数据,有则合并,无则保留 |
|||
if (columnIndex === 0) { |
|||
//courseArr数组是上面输出来的,用来合并表格前做的数据判断 |
|||
const row1 = this.courseArr[rowIndex] |
|||
const col1 = row1 > 0 ? 1 : 0 |
|||
return { |
|||
rowspan: row1, |
|||
colspan: col1 |
|||
} |
|||
} else if (columnIndex === 1) { |
|||
//这里是判断第二列的数据,nameArr和领域合并时候的处理一样,以此类推 |
|||
const row1 = this.nameArr[rowIndex] |
|||
const col1 = row1 > 0 ? 1 : 0 |
|||
return { |
|||
rowspan: row1, |
|||
colspan: col1 |
|||
} |
|||
} |
|||
} |
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,196 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
// 领域合并 |
|||
, courseinit() { |
|||
// 首先初始化 |
|||
var _this = this; |
|||
this.courseArr = [] |
|||
this.coursePos = 0 |
|||
for (var i = 0; i < _this.tableData2.length; i++) { |
|||
//判断是否是第一行 |
|||
if (i === 0) { |
|||
//导入第一行数据 |
|||
_this.courseArr.push(1) |
|||
_this.coursePos = 0 |
|||
} else { |
|||
//不是第一行时,就根据标识去存储,course为我第一行的prop属性的值 |
|||
if (_this.tableData2[i].course === _this.tableData2[i - 1].course) { |
|||
// 查找到下一行的数据等于上一行的数据时每次要把之前存储的数据+1 |
|||
_this.courseArr[_this.coursePos] += 1 |
|||
_this.courseArr.push(0) |
|||
} else { |
|||
// 没有相同的数据时候,要记住当前的index |
|||
_this.courseArr.push(1) |
|||
_this.coursePos = i |
|||
} |
|||
} |
|||
} |
|||
} |
|||
//然后开始写组件自带的方法, |
|||
function objectSpanMethod({rowIndex, columnIndex}) { |
|||
//判断第一列的数据,上下行有没有相同的数据,有则合并,无则保留 |
|||
if (columnIndex === 0) { |
|||
//courseArr数组是上面输出来的,用来合并表格前做的数据判断 |
|||
const row1 = this.courseArr[rowIndex] |
|||
const col1 = row1 > 0 ? 1 : 0 |
|||
return { |
|||
rowspan: row1, |
|||
colspan: col1 |
|||
} |
|||
} else if (columnIndex === 1) { |
|||
//这里是判断第二列的数据,nameArr和领域合并时候的处理一样,以此类推 |
|||
const row1 = this.nameArr[rowIndex] |
|||
const col1 = row1 > 0 ? 1 : 0 |
|||
return { |
|||
rowspan: row1, |
|||
colspan: col1 |
|||
} |
|||
} |
|||
} |
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,196 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
// 领域合并 |
|||
function courseinit() { |
|||
// 首先初始化 |
|||
var _this = this; |
|||
this.courseArr = [] |
|||
this.coursePos = 0 |
|||
for (var i = 0; i < _this.tableData2.length; i++) { |
|||
//判断是否是第一行 |
|||
if (i === 0) { |
|||
//导入第一行数据 |
|||
_this.courseArr.push(1) |
|||
_this.coursePos = 0 |
|||
} else { |
|||
//不是第一行时,就根据标识去存储,course为我第一行的prop属性的值 |
|||
if (_this.tableData2[i].course === _this.tableData2[i - 1].course) { |
|||
// 查找到下一行的数据等于上一行的数据时每次要把之前存储的数据+1 |
|||
_this.courseArr[_this.coursePos] += 1 |
|||
_this.courseArr.push(0) |
|||
} else { |
|||
// 没有相同的数据时候,要记住当前的index |
|||
_this.courseArr.push(1) |
|||
_this.coursePos = i |
|||
} |
|||
} |
|||
} |
|||
} |
|||
//然后开始写组件自带的方法, |
|||
function objectSpanMethod({rowIndex, columnIndex}) { |
|||
//判断第一列的数据,上下行有没有相同的数据,有则合并,无则保留 |
|||
if (columnIndex === 0) { |
|||
//courseArr数组是上面输出来的,用来合并表格前做的数据判断 |
|||
const row1 = this.courseArr[rowIndex] |
|||
const col1 = row1 > 0 ? 1 : 0 |
|||
return { |
|||
rowspan: row1, |
|||
colspan: col1 |
|||
} |
|||
} else if (columnIndex === 1) { |
|||
//这里是判断第二列的数据,nameArr和领域合并时候的处理一样,以此类推 |
|||
const row1 = this.nameArr[rowIndex] |
|||
const col1 = row1 > 0 ? 1 : 0 |
|||
return { |
|||
rowspan: row1, |
|||
colspan: col1 |
|||
} |
|||
} |
|||
} |
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,195 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
// 领域合并 |
|||
function courseinit() { |
|||
// 首先初始化 |
|||
var _this = this; |
|||
this.courseArr = [] |
|||
this.coursePos = 0 |
|||
for (var i = 0; i < _this.tableData2.length; i++) { |
|||
//判断是否是第一行 |
|||
if (i === 0) { |
|||
//导入第一行数据 |
|||
_this.courseArr.push(1) |
|||
_this.coursePos = 0 |
|||
} else { |
|||
//不是第一行时,就根据标识去存储,course为我第一行的prop属性的值 |
|||
if (_this.tableData2[i].course === _this.tableData2[i - 1].course) { |
|||
// 查找到下一行的数据等于上一行的数据时每次要把之前存储的数据+1 |
|||
_this.courseArr[_this.coursePos] += 1 |
|||
_this.courseArr.push(0) |
|||
} else { |
|||
// 没有相同的数据时候,要记住当前的index |
|||
_this.courseArr.push(1) |
|||
_this.coursePos = i |
|||
} |
|||
} |
|||
} |
|||
} |
|||
//然后开始写组件自带的方法, |
|||
function objectSpanMethod({rowIndex, columnIndex}) { |
|||
//判断第一列的数据,上下行有没有相同的数据,有则合并,无则保留 |
|||
if (columnIndex === 0) { |
|||
//courseArr数组是上面输出来的,用来合并表格前做的数据判断 |
|||
const row1 = this.courseArr[rowIndex] |
|||
const col1 = row1 > 0 ? 1 : 0 |
|||
return { |
|||
rowspan: row1, |
|||
colspan: col1 |
|||
} |
|||
} else if (columnIndex === 1) { |
|||
//这里是判断第二列的数据,nameArr和领域合并时候的处理一样,以此类推 |
|||
const row1 = this.nameArr[rowIndex] |
|||
const col1 = row1 > 0 ? 1 : 0 |
|||
return { |
|||
rowspan: row1, |
|||
colspan: col1 |
|||
} |
|||
} |
|||
} |
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,195 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
// 领域合并 |
|||
function courseinit() { |
|||
// 首先初始化 |
|||
var _this = this; |
|||
this.courseArr = [] |
|||
this.coursePos = 0 |
|||
for (var i = 0; i < _this.tablea.length; i++) { |
|||
//判断是否是第一行 |
|||
if (i === 0) { |
|||
//导入第一行数据 |
|||
_this.courseArr.push(1) |
|||
_this.coursePos = 0 |
|||
} else { |
|||
//不是第一行时,就根据标识去存储,course为我第一行的prop属性的值 |
|||
if (_this.tableData2[i].course === _this.tableData2[i - 1].course) { |
|||
// 查找到下一行的数据等于上一行的数据时每次要把之前存储的数据+1 |
|||
_this.courseArr[_this.coursePos] += 1 |
|||
_this.courseArr.push(0) |
|||
} else { |
|||
// 没有相同的数据时候,要记住当前的index |
|||
_this.courseArr.push(1) |
|||
_this.coursePos = i |
|||
} |
|||
} |
|||
} |
|||
} |
|||
//然后开始写组件自带的方法, |
|||
function objectSpanMethod({rowIndex, columnIndex}) { |
|||
//判断第一列的数据,上下行有没有相同的数据,有则合并,无则保留 |
|||
if (columnIndex === 0) { |
|||
//courseArr数组是上面输出来的,用来合并表格前做的数据判断 |
|||
const row1 = this.courseArr[rowIndex] |
|||
const col1 = row1 > 0 ? 1 : 0 |
|||
return { |
|||
rowspan: row1, |
|||
colspan: col1 |
|||
} |
|||
} else if (columnIndex === 1) { |
|||
//这里是判断第二列的数据,nameArr和领域合并时候的处理一样,以此类推 |
|||
const row1 = this.nameArr[rowIndex] |
|||
const col1 = row1 > 0 ? 1 : 0 |
|||
return { |
|||
rowspan: row1, |
|||
colspan: col1 |
|||
} |
|||
} |
|||
} |
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,195 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
// 领域合并 |
|||
function courseinit() { |
|||
// 首先初始化 |
|||
var _this = this; |
|||
this.courseArr = [] |
|||
this.coursePos = 0 |
|||
for (var i = 0; i < _this.tablea.length; i++) { |
|||
//判断是否是第一行 |
|||
if (i === 0) { |
|||
//导入第一行数据 |
|||
_this.courseArr.push(1) |
|||
_this.coursePos = 0 |
|||
} else { |
|||
//不是第一行时,就根据标识去存储,course为我第一行的prop属性的值 |
|||
if (_this.tablea[i].course === _this.tableData2[i - 1].course) { |
|||
// 查找到下一行的数据等于上一行的数据时每次要把之前存储的数据+1 |
|||
_this.courseArr[_this.coursePos] += 1 |
|||
_this.courseArr.push(0) |
|||
} else { |
|||
// 没有相同的数据时候,要记住当前的index |
|||
_this.courseArr.push(1) |
|||
_this.coursePos = i |
|||
} |
|||
} |
|||
} |
|||
} |
|||
//然后开始写组件自带的方法, |
|||
function objectSpanMethod({rowIndex, columnIndex}) { |
|||
//判断第一列的数据,上下行有没有相同的数据,有则合并,无则保留 |
|||
if (columnIndex === 0) { |
|||
//courseArr数组是上面输出来的,用来合并表格前做的数据判断 |
|||
const row1 = this.courseArr[rowIndex] |
|||
const col1 = row1 > 0 ? 1 : 0 |
|||
return { |
|||
rowspan: row1, |
|||
colspan: col1 |
|||
} |
|||
} else if (columnIndex === 1) { |
|||
//这里是判断第二列的数据,nameArr和领域合并时候的处理一样,以此类推 |
|||
const row1 = this.nameArr[rowIndex] |
|||
const col1 = row1 > 0 ? 1 : 0 |
|||
return { |
|||
rowspan: row1, |
|||
colspan: col1 |
|||
} |
|||
} |
|||
} |
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,195 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
// 领域合并 |
|||
function courseinit() { |
|||
// 首先初始化 |
|||
var _this = this; |
|||
this.courseArr = [] |
|||
this.coursePos = 0 |
|||
for (var i = 0; i < _this.tablea.length; i++) { |
|||
//判断是否是第一行 |
|||
if (i === 0) { |
|||
//导入第一行数据 |
|||
_this.courseArr.push(1) |
|||
_this.coursePos = 0 |
|||
} else { |
|||
//不是第一行时,就根据标识去存储,course为我第一行的prop属性的值 |
|||
if (_this.tablea[i].course === _this.tablea[i - 1].course) { |
|||
// 查找到下一行的数据等于上一行的数据时每次要把之前存储的数据+1 |
|||
_this.courseArr[_this.coursePos] += 1 |
|||
_this.courseArr.push(0) |
|||
} else { |
|||
// 没有相同的数据时候,要记住当前的index |
|||
_this.courseArr.push(1) |
|||
_this.coursePos = i |
|||
} |
|||
} |
|||
} |
|||
} |
|||
//然后开始写组件自带的方法, |
|||
function objectSpanMethod({rowIndex, columnIndex}) { |
|||
//判断第一列的数据,上下行有没有相同的数据,有则合并,无则保留 |
|||
if (columnIndex === 0) { |
|||
//courseArr数组是上面输出来的,用来合并表格前做的数据判断 |
|||
const row1 = this.courseArr[rowIndex] |
|||
const col1 = row1 > 0 ? 1 : 0 |
|||
return { |
|||
rowspan: row1, |
|||
colspan: col1 |
|||
} |
|||
} else if (columnIndex === 1) { |
|||
//这里是判断第二列的数据,nameArr和领域合并时候的处理一样,以此类推 |
|||
const row1 = this.nameArr[rowIndex] |
|||
const col1 = row1 > 0 ? 1 : 0 |
|||
return { |
|||
rowspan: row1, |
|||
colspan: col1 |
|||
} |
|||
} |
|||
} |
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,148 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,165 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
getSpanArr(data) { |
|||
for (var i = 0; i < data.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (data[i].name === data[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,165 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
getSpanArr(data) { |
|||
for (var i = 0; i < data.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (data[i].name === data[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,165 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(data) { |
|||
for (var i = 0; i < data.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (data[i].name === data[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,165 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(data) { |
|||
for (var i = 0; i < data.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (data[i].name === data[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,165 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(tablea) { |
|||
for (var i = 0; i < data.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (data[i].name === data[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,165 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(tablea) { |
|||
for (var i = 0; i < tablea.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (data[i].name === data[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,165 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(tablea) { |
|||
for (var i = 0; i < tablea.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (tal[i].name === data[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,165 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(tablea) { |
|||
for (var i = 0; i < tablea.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (tablea[i].name === data[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,165 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(tablea) { |
|||
for (var i = 0; i < tablea.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (tablea[i].name === tablea[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,175 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(tablea) { |
|||
for (var i = 0; i < tablea.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (tablea[i].name === tablea[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
cellMerge({ row, column, rowIndex, columnIndex }) { |
|||
if (columnIndex === 0) { |
|||
const _row = this.spanArr[rowIndex]; |
|||
const _col = _row > 0 ? 1 : 0; |
|||
return { |
|||
rowspan: _row, |
|||
colspan: _col |
|||
} |
|||
} |
|||
}, |
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,175 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(tablea) { |
|||
for (var i = 0; i < tablea.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (tablea[i].name === tablea[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
cellMerge({ row, column, rowIndex, columnIndex }) { |
|||
if (columnIndex === 0) { |
|||
const _row = this.spanArr[rowIndex]; |
|||
const _col = _row > 0 ? 1 : 0; |
|||
return { |
|||
rowspan: _row, |
|||
colspan: _col |
|||
} |
|||
} |
|||
}, |
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,175 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(tablea) { |
|||
for (var i = 0; i < tablea.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (tablea[i].name === tablea[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
function cellMerge({ row, column, rowIndex, columnIndex }) { |
|||
if (columnIndex === 0) { |
|||
const _row = this.spanArr[rowIndex]; |
|||
const _col = _row > 0 ? 1 : 0; |
|||
return { |
|||
rowspan: _row, |
|||
colspan: _col |
|||
} |
|||
} |
|||
}, |
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,175 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(tablea) { |
|||
for (var i = 0; i < tablea.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (tablea[i].name === tablea[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
function cellMerge({ row, column, rowIndex, columnIndex }) { |
|||
if (columnIndex === 0) { |
|||
const _row = this.spanArr[rowIndex]; |
|||
const _col = _row > 0 ? 1 : 0; |
|||
return { |
|||
rowspan: _row, |
|||
colspan: _col |
|||
} |
|||
} |
|||
} |
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,174 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(tablea) { |
|||
for (var i = 0; i < tablea.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (tablea[i].name === tablea[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
function cellMerge({ row, column, rowIndex, columnIndex }) { |
|||
if (columnIndex === 0) { |
|||
const _row = this.spanArr[rowIndex]; |
|||
const _col = _row > 0 ? 1 : 0; |
|||
return { |
|||
rowspan: _row, |
|||
colspan: _col |
|||
} |
|||
} |
|||
} |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,174 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(tablea) { |
|||
for (var i = 0; i < tablea.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (tablea[i].name === tablea[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
function objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
|||
if (columnIndex === 0) { |
|||
const _row = this.spanArr[rowIndex]; |
|||
const _col = _row > 0 ? 1 : 0; |
|||
return { |
|||
rowspan: _row, |
|||
colspan: _col |
|||
} |
|||
} |
|||
} |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,175 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(tablea) { |
|||
for (var i = 0; i < tablea.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (tablea[i].name === tablea[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
function objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
|||
if (columnIndex === 0) { |
|||
const _row = this.spanArr[rowIndex]; |
|||
const _col = _row > 0 ? 1 : 0; |
|||
return { |
|||
rowspan: _row, |
|||
colspan: _col |
|||
} |
|||
} |
|||
} |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,174 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(tablea) { |
|||
for (var i = 0; i < tablea.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (tablea[i].name === tablea[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
function objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
|||
if (columnIndex === 0) { |
|||
const _row = this.spanArr[rowIndex]; |
|||
const _col = _row > 0 ? 1 : 0; |
|||
return { |
|||
rowspan: _row, |
|||
colspan: _col |
|||
} |
|||
} |
|||
} |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,175 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(tablea) { |
|||
for (var i = 0; i < tablea.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (tablea[i].name === tablea[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
function objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
|||
getSpanArr |
|||
if (columnIndex === 0) { |
|||
const _row = this.spanArr[rowIndex]; |
|||
const _col = _row > 0 ? 1 : 0; |
|||
return { |
|||
rowspan: _row, |
|||
colspan: _col |
|||
} |
|||
} |
|||
} |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,175 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(tablea) { |
|||
for (var i = 0; i < tablea.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (tablea[i].name === tablea[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
function objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
|||
getSpanArr() |
|||
if (columnIndex === 0) { |
|||
const _row = this.spanArr[rowIndex]; |
|||
const _col = _row > 0 ? 1 : 0; |
|||
return { |
|||
rowspan: _row, |
|||
colspan: _col |
|||
} |
|||
} |
|||
} |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,175 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(tablea) { |
|||
for (var i = 0; i < tablea.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (tablea[i].name === tablea[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
function objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
|||
getSpanArr() |
|||
if (columnIndex === 0) { |
|||
const _row = this.spanArr[rowIndex]; |
|||
const _col = _row > 0 ? 1 : 0; |
|||
return { |
|||
rowspan: _row, |
|||
colspan: _col |
|||
} |
|||
} |
|||
} |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,175 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(tablea) { |
|||
for (var i = 0; i < tablea.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (tablea[i].name === tablea[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
function objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
|||
getSpanArr() |
|||
if (columnIndex === 0) { |
|||
const _row = this.spanArr[rowIndex]; |
|||
const _col = _row > 0 ? 1 : 0; |
|||
return { |
|||
rowspan: _row, |
|||
colspan: _col |
|||
} |
|||
} |
|||
} |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,175 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(tablea) { |
|||
for (var i = 0; i < tablea.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (tablea[i].name === tablea[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
function objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
|||
getSpanArr() |
|||
if (columnIndex === 0) { |
|||
const _row = this.spanArr[rowIndex]; |
|||
const _col = _row > 0 ? 1 : 0; |
|||
return { |
|||
rowspan: _row, |
|||
colspan: _col |
|||
} |
|||
} |
|||
} |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,175 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(tablea) { |
|||
for (var i = 0; i < tablea.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (tablea[i].name === tablea[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
function objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
|||
getSpanArr() |
|||
if (columnIndex === 0) { |
|||
const _row = this.spanArr[rowIndex]; |
|||
const _col = _row > 0 ? 1 : 0; |
|||
return { |
|||
rowspan: _row, |
|||
colspan: _col |
|||
} |
|||
} |
|||
} |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,175 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(tablea) { |
|||
for (var i = 0; i < tablea.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (tablea[i].name === tablea[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
function objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
|||
getSpanArr() |
|||
if (columnIndex === 0) { |
|||
const _row = this.spanArr[rowIndex]; |
|||
const _col = _row > 0 ? 1 : 0; |
|||
return { |
|||
rowspan: _row, |
|||
colspan: _col |
|||
} |
|||
} |
|||
} |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,175 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(tablea) { |
|||
for (var i = 0; i < tablea.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (tablea[i].name === tablea[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
function objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
|||
getSpanArr() |
|||
if (columnIndex === 0) { |
|||
const _row = this.spanArr[rowIndex]; |
|||
const _col = _row > 0 ? 1 : 0; |
|||
return { |
|||
rowspan: _row, |
|||
colspan: _col |
|||
} |
|||
} |
|||
} |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,175 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(tablea) { |
|||
for (var i = 0; i < tablea.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (tablea[i].name === tablea[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
function objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
|||
getSpanArr() |
|||
if (columnIndex === 0) { |
|||
const _row = this.spanArr[rowIndex]; |
|||
const _col = _row > 0 ? 1 : 0; |
|||
return { |
|||
rowspan: _row, |
|||
colspan: _col |
|||
} |
|||
} |
|||
} |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,175 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(tablea) { |
|||
for (var i = 0; i < tablea.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (tablea[i].name === tablea[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
function objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
|||
getSpanArr() |
|||
if (columnIndex === 0) { |
|||
const _row = this.spanArr[rowIndex]; |
|||
const _col = _row > 0 ? 1 : 0; |
|||
return { |
|||
rowspan: _row, |
|||
colspan: _col |
|||
} |
|||
} |
|||
} |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,175 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(tablea) { |
|||
for (var i = 0; i < tablea.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (tablea[i].name === tablea[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
function objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
|||
getSpanArr() |
|||
if (columnIndex === 0) { |
|||
const _row = this.spanArr[rowIndex]; |
|||
const _col = _row > 0 ? 1 : 0; |
|||
return { |
|||
rowspan: _row, |
|||
colspan: _col |
|||
} |
|||
} |
|||
} |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,175 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(tablea) { |
|||
for (var i = 0; i < tablea.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (tablea[i].name === tablea[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
function objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
|||
getSpanArr() |
|||
if (columnIndex === 0) { |
|||
const _row = this.spanArr[rowIndex]; |
|||
const _col = _row > 0 ? 1 : 0; |
|||
return { |
|||
rowspan: _row, |
|||
colspan: _col |
|||
} |
|||
} |
|||
} |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,175 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(tablea) { |
|||
for (var i = 0; i < tablea.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (tablea[i].name === tablea[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
function objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
|||
getSpanArr() |
|||
if (columnIndex === 1) { |
|||
const _row = this.spanArr[rowIndex]; |
|||
const _col = _row > 0 ? 1 : 0; |
|||
return { |
|||
rowspan: _row, |
|||
colspan: _col |
|||
} |
|||
} |
|||
} |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,175 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
function getSpanArr(tablea) { |
|||
for (var i = 0; i < tablea.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0 |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (tablea[i].name === tablea[i - 1].name) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
function objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
|||
getSpanArr() |
|||
if (columnIndex === 0) { |
|||
const _row = this.spanArr[rowIndex]; |
|||
const _col = _row > 0 ? 1 : 0; |
|||
return { |
|||
rowspan: _row, |
|||
colspan: _col |
|||
} |
|||
} |
|||
} |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,196 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
// 领域合并 |
|||
, courseinit() { |
|||
// 首先初始化 |
|||
var _this = this; |
|||
this.courseArr = [] |
|||
this.coursePos = 0 |
|||
for (var i = 0; i < _this.tableData2.length; i++) { |
|||
//判断是否是第一行 |
|||
if (i === 0) { |
|||
//导入第一行数据 |
|||
_this.courseArr.push(1) |
|||
_this.coursePos = 0 |
|||
} else { |
|||
//不是第一行时,就根据标识去存储,course为我第一行的prop属性的值 |
|||
if (_this.tableData2[i].course === _this.tableData2[i - 1].course) { |
|||
// 查找到下一行的数据等于上一行的数据时每次要把之前存储的数据+1 |
|||
_this.courseArr[_this.coursePos] += 1 |
|||
_this.courseArr.push(0) |
|||
} else { |
|||
// 没有相同的数据时候,要记住当前的index |
|||
_this.courseArr.push(1) |
|||
_this.coursePos = i |
|||
} |
|||
} |
|||
} |
|||
} |
|||
//然后开始写组件自带的方法, |
|||
function objectSpanMethod({rowIndex, columnIndex}) { |
|||
//判断第一列的数据,上下行有没有相同的数据,有则合并,无则保留 |
|||
if (columnIndex === 0) { |
|||
//courseArr数组是上面输出来的,用来合并表格前做的数据判断 |
|||
const row1 = this.courseArr[rowIndex] |
|||
const col1 = row1 > 0 ? 1 : 0 |
|||
return { |
|||
rowspan: row1, |
|||
colspan: col1 |
|||
} |
|||
} else if (columnIndex === 1) { |
|||
//这里是判断第二列的数据,nameArr和领域合并时候的处理一样,以此类推 |
|||
const row1 = this.nameArr[rowIndex] |
|||
const col1 = row1 > 0 ? 1 : 0 |
|||
return { |
|||
rowspan: row1, |
|||
colspan: col1 |
|||
} |
|||
} |
|||
} |
|||
|
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,233 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] && |
|||
data[i][otherRowName] == data[i - 1][otherRowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: User; |
|||
column: TableColumnCtx<User>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 1) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 1 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,233 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] && |
|||
data[i][otherRowName] == data[i - 1][otherRowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: User; |
|||
column: TableColumnCtx<User>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === ) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 1 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,233 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] && |
|||
data[i][otherRowName] == data[i - 1][otherRowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: User; |
|||
column: TableColumnCtx<User>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 0) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 1 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,233 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] && |
|||
data[i][otherRowName] == data[i - 1][otherRowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: User; |
|||
column: TableColumnCtx<User>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 0) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 1 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,233 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] && |
|||
data[i][otherRowName] == data[i - 1][otherRowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: User; |
|||
column: TableColumnCtx<User>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 0) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 1 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionstandard');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
@ -0,0 +1,233 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" title="查看方案详情" @close="handleClose"> |
|||
<el-table :data="tablea" border label-width="120px" class="demo-ruleForm" :span-method="objectSpanMethod" style="width:100%"> |
|||
<el-table-column prop="dimensionname" label="考核维度"/> |
|||
<el-table-column prop="dimensionstandard" label="维度权重"/> |
|||
<el-table-column label="考核指标"> |
|||
<template #default="scope"> |
|||
<a v-if="scope.row.attribute == 1" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.targetname}}</a > |
|||
<a v-if="scope.row.attribute == 2">{{scope.row.targetname}}</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="Targetstandard" label="权重指标"/> |
|||
<el-table-column prop="content" label="说明"/> |
|||
<el-table-column prop="unit" label="单位"/> |
|||
<el-table-column prop="state" label="指标状态"> |
|||
<template #default="scope"> |
|||
<span v-if="scope.row.state== 1" class="el-tag">月</span> |
|||
<span v-if="scope.row.state== 2" class="el-tag el-tag--warning">季度</span> |
|||
<span v-if="scope.row.state== 3" class="el-tag el-tag--warning el-tag--light">年</span> |
|||
</template> |
|||
</el-table-column> |
|||
<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="cycle" label="频次"/> |
|||
<el-table-column fixed="right" label="执行人" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="handleErd(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> |
|||
<Xd v-if="data.xdPostBox" v-model="data.xdPostBox" :row-info="rowInfo"></Xd> |
|||
<Hyr v-if="data.hyrPostBox" v-model="data.hyrPostBox" :row-info="rowInfo"></Hyr> |
|||
<Ycy v-if="data.ycyPostBox" v-model="data.ycyPostBox" :row-info="rowInfo"></Ycy> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost,organdpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import {look_scheme} from '@/api/opk/opk/api' |
|||
import { create_scheme,ge_copy,del_scheme } from '@/api/opk/zxy/news/api' |
|||
import Xd from './xd.vue' |
|||
import Hyr from './hyr.vue' |
|||
import Ycy from './ycy.vue' |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
ygPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
rowInfo: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const data = reactive({ |
|||
xdPostBox:false, |
|||
hyrPostBox:false, |
|||
ycyPostBox:false, |
|||
}) |
|||
// eslint-disable-next-line vue/no-dupe-keys |
|||
const rowInfo = ref<any>({}) |
|||
const emit = defineEmits(["update:ygPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
year:"", |
|||
asd:[] as string[], |
|||
}) |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const yui = props.rowInfo.key |
|||
look_scheme({id:yui}) |
|||
.then((data) => { |
|||
tablea.value = data.data; |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:ygPostBox", false); |
|||
} |
|||
const handleio = (val:any)=>{ |
|||
data.xdPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleErd = (val:any)=>{ |
|||
data.hyrPostBox = true, |
|||
rowInfo.value = val |
|||
} |
|||
const handleDel = (val:any) => { |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const delid = new String(val.id) |
|||
del_scheme({orgid:val.orgid,planversionkey:val.plantversion,targetid:val.targetid}) |
|||
ge_adds() |
|||
}) |
|||
} |
|||
const cancelDialog = (val:any)=>{ |
|||
data.ycyPostBox=true, |
|||
rowInfo.value =val |
|||
} |
|||
// 合并 |
|||
interface ObjInterface { |
|||
[key: string]: any; // 字段扩展声明 |
|||
} |
|||
function tableRowMerge( |
|||
data: ObjInterface[], |
|||
rowName: string, |
|||
otherRowName?: string |
|||
) { |
|||
const idArray = [] as number[]; |
|||
let idPos = 0; |
|||
for (let i = 0; i < data.length; i++) { |
|||
// 如果当 i == 0 说明数据是第一行, 需要重新赋值 |
|||
if (i == 0) { |
|||
// idArray.push(1) 说明这一行数据被显示出来 |
|||
idArray.push(1); |
|||
// idPos = 0 重置当前的计数器 |
|||
idPos = 0; |
|||
} |
|||
// 说明不是从第一行开始遍历的 |
|||
else { |
|||
if (otherRowName) { |
|||
//主行之外的 另一行合并 |
|||
if ( |
|||
data[i][rowName] == data[i - 1][rowName] && |
|||
data[i][otherRowName] == data[i - 1][otherRowName] |
|||
) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} else { |
|||
// 判断当前的指定数据是否和之前的指定数据值相同 |
|||
if (data[i][rowName] == data[i - 1][rowName]) { |
|||
// 如果相同就需要将 idArray 的数据自加 |
|||
idArray[idPos] += 1; |
|||
// 同时需要将 idArray push一个0 表示下一行不用显示 |
|||
idArray.push(0); |
|||
} |
|||
// 说明 当前的数据和上一行的指定数据不同 |
|||
else { |
|||
// idArray.push(1) 说明当前一行的数据需要显示 |
|||
idArray.push(1); |
|||
// 重新给计数器赋值 |
|||
idPos = i; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return idArray; |
|||
} |
|||
let rowMergeArr = [] as number[]; |
|||
/** |
|||
* @description 合并行 |
|||
*/ |
|||
interface SpanMethodProps { |
|||
row: User; |
|||
column: TableColumnCtx<User>; |
|||
rowIndex: number; |
|||
columnIndex: number; |
|||
} |
|||
const objectSpanMethod = ({ |
|||
row, |
|||
column, |
|||
rowIndex, |
|||
columnIndex |
|||
}: SpanMethodProps) => { |
|||
// level列 |
|||
if (columnIndex === 0) { |
|||
// rowMergeArr[rowIndex] 取出当前存放行的合并状态 |
|||
const rowSpan = rowMergeArr[rowIndex]; |
|||
// 判断当前的 列是否需要显示 |
|||
return { |
|||
rowspan: rowSpan, |
|||
colspan: 1 |
|||
}; |
|||
} |
|||
}; |
|||
onMounted(()=>{ |
|||
Object.assign(formData,props.rowInfo); |
|||
rowMergeArr = tableRowMerge(tablea, 'dimensionname');// 主列的行合并 |
|||
}) |
|||
</script> |
|||
|
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue