1111 changed files with 86682 additions and 163468 deletions
@ -0,0 +1,119 @@ |
|||
{ |
|||
"name": "appsys", |
|||
"private": true, |
|||
"version": "2.3.0", |
|||
"type": "module", |
|||
"scripts": { |
|||
"dev": "vite ", |
|||
"build:prod": "vite build --mode production &&vue-tsc --noEmit", |
|||
"prepare": "husky install", |
|||
"lint:eslint": "eslint --fix --ext .ts,.js,.vue ./src ", |
|||
"lint:prettier": "prettier --write \"**/*.{js,cjs,ts,json,tsx,css,less,scss,vue,html,md}\"", |
|||
"lint:stylelint": "stylelint \"**/*.{css,scss,vue}\" --fix", |
|||
"lint:lint-staged": "lint-staged", |
|||
"commit": "git-cz", |
|||
"build": "webpack" |
|||
}, |
|||
"config": { |
|||
"commitizen": { |
|||
"path": "node_modules/cz-git" |
|||
} |
|||
}, |
|||
"lint-staged": { |
|||
"*.{js,ts}": [ |
|||
"eslint --fix", |
|||
"prettier --write" |
|||
], |
|||
"*.{cjs,json}": [ |
|||
"prettier --write" |
|||
], |
|||
"*.{vue,html}": [ |
|||
"eslint --fix", |
|||
"prettier --write", |
|||
"stylelint --fix" |
|||
], |
|||
"*.{scss,css}": [ |
|||
"stylelint --fix", |
|||
"prettier --write" |
|||
], |
|||
"*.md": [ |
|||
"prettier --write" |
|||
] |
|||
}, |
|||
"dependencies": { |
|||
"@element-plus/icons": "^0.0.11", |
|||
"@element-plus/icons-vue": "^2.1.0", |
|||
"@vitejs/plugin-vue": "^4.2.3", |
|||
"@vueuse/core": "^10.1.2", |
|||
"@wangeditor/editor": "^5.1.23", |
|||
"@wangeditor/editor-for-vue": "5.1.10", |
|||
"@wecom/jssdk": "^1.3.2", |
|||
"axios": "^1.4.0", |
|||
"build": "^0.1.4", |
|||
"clipboard": "^2.0.11", |
|||
"echarts": "^5.4.3", |
|||
"element-plus": "^2.3.12", |
|||
"js-beautify": "^1.14.8", |
|||
"js-md5": "^0.7.3", |
|||
"md5": "^2.3.0", |
|||
"nprogress": "^0.2.0", |
|||
"path-browserify": "^1.0.1", |
|||
"path-to-regexp": "^6.2.0", |
|||
"pinia": "^2.0.33", |
|||
"quill": "^1.3.7", |
|||
"screenfull": "^6.0.0", |
|||
"ts-md5": "^1.3.1", |
|||
"vue": "^3.3.4", |
|||
"vue-i18n": "9.2.2", |
|||
"vue-quill-editor": "^3.0.6", |
|||
"vue-router": "^4.2.0", |
|||
"vuedraggable": "^4.1.0", |
|||
"vuedraggable-es": "^4.1.1", |
|||
"wangeditor": "^4.7.15", |
|||
"webpack": "^5.88.2" |
|||
}, |
|||
"devDependencies": { |
|||
"@commitlint/cli": "^17.6.3", |
|||
"@commitlint/config-conventional": "^17.6.3", |
|||
"@iconify-json/ep": "^1.1.10", |
|||
"@types/md5": "^2.3.2", |
|||
"@types/nprogress": "^0.2.0", |
|||
"@types/path-browserify": "^1.0.0", |
|||
"@typescript-eslint/eslint-plugin": "^5.59.6", |
|||
"@typescript-eslint/parser": "^5.59.6", |
|||
"autoprefixer": "^10.4.14", |
|||
"commitizen": "^4.3.0", |
|||
"cz-git": "^1.6.1", |
|||
"eslint": "^8.40.0", |
|||
"eslint-config-prettier": "^8.8.0", |
|||
"eslint-plugin-prettier": "^4.2.1", |
|||
"eslint-plugin-vue": "^9.13.0", |
|||
"fast-glob": "^3.2.11", |
|||
"husky": "^8.0.3", |
|||
"lint-staged": "^13.2.2", |
|||
"postcss": "^8.4.23", |
|||
"postcss-html": "^1.5.0", |
|||
"postcss-scss": "^4.0.6", |
|||
"prettier": "^2.8.8", |
|||
"sass": "^1.58.3", |
|||
"stylelint": "^15.5.0", |
|||
"stylelint-config-html": "^1.1.0", |
|||
"stylelint-config-recess-order": "^4.0.0", |
|||
"stylelint-config-recommended-scss": "11.0.0 ", |
|||
"stylelint-config-recommended-vue": "^1.4.0", |
|||
"stylelint-config-standard": "^33.0.0", |
|||
"stylelint-config-standard-scss": "^9.0.0", |
|||
"typescript": "^5.0.4", |
|||
"unocss": "^0.51.13", |
|||
"unplugin-auto-import": "^0.15.3", |
|||
"unplugin-icons": "^0.16.1", |
|||
"unplugin-vue-components": "^0.24.1", |
|||
"vite": "^4.3.5", |
|||
"vite-plugin-svg-icons": "^2.0.1", |
|||
"vue-tsc": "^1.6.5 ", |
|||
"webpack-cli": "^5.1.4" |
|||
}, |
|||
"repository": "", |
|||
"author": "", |
|||
"license": "MIT" |
|||
} |
|||
@ -0,0 +1,119 @@ |
|||
{ |
|||
"name": "appsys", |
|||
"private": true, |
|||
"version": "2.3.0", |
|||
"type": "module", |
|||
"scripts": { |
|||
"dev": "vite serve --mode development", |
|||
"build:prod": "vite build --mode production &&vue-tsc --noEmit", |
|||
"prepare": "husky install", |
|||
"lint:eslint": "eslint --fix --ext .ts,.js,.vue ./src ", |
|||
"lint:prettier": "prettier --write \"**/*.{js,cjs,ts,json,tsx,css,less,scss,vue,html,md}\"", |
|||
"lint:stylelint": "stylelint \"**/*.{css,scss,vue}\" --fix", |
|||
"lint:lint-staged": "lint-staged", |
|||
"commit": "git-cz", |
|||
"build": "webpack" |
|||
}, |
|||
"config": { |
|||
"commitizen": { |
|||
"path": "node_modules/cz-git" |
|||
} |
|||
}, |
|||
"lint-staged": { |
|||
"*.{js,ts}": [ |
|||
"eslint --fix", |
|||
"prettier --write" |
|||
], |
|||
"*.{cjs,json}": [ |
|||
"prettier --write" |
|||
], |
|||
"*.{vue,html}": [ |
|||
"eslint --fix", |
|||
"prettier --write", |
|||
"stylelint --fix" |
|||
], |
|||
"*.{scss,css}": [ |
|||
"stylelint --fix", |
|||
"prettier --write" |
|||
], |
|||
"*.md": [ |
|||
"prettier --write" |
|||
] |
|||
}, |
|||
"dependencies": { |
|||
"@element-plus/icons": "^0.0.11", |
|||
"@element-plus/icons-vue": "^2.1.0", |
|||
"@vitejs/plugin-vue": "^4.2.3", |
|||
"@vueuse/core": "^10.1.2", |
|||
"@wangeditor/editor": "^5.1.23", |
|||
"@wangeditor/editor-for-vue": "5.1.10", |
|||
"@wecom/jssdk": "^1.3.2", |
|||
"axios": "^1.4.0", |
|||
"build": "^0.1.4", |
|||
"clipboard": "^2.0.11", |
|||
"echarts": "^5.4.3", |
|||
"element-plus": "^2.3.12", |
|||
"js-beautify": "^1.14.8", |
|||
"js-md5": "^0.7.3", |
|||
"md5": "^2.3.0", |
|||
"nprogress": "^0.2.0", |
|||
"path-browserify": "^1.0.1", |
|||
"path-to-regexp": "^6.2.0", |
|||
"pinia": "^2.0.33", |
|||
"quill": "^1.3.7", |
|||
"screenfull": "^6.0.0", |
|||
"ts-md5": "^1.3.1", |
|||
"vue": "^3.3.4", |
|||
"vue-i18n": "9.2.2", |
|||
"vue-quill-editor": "^3.0.6", |
|||
"vue-router": "^4.2.0", |
|||
"vuedraggable": "^4.1.0", |
|||
"vuedraggable-es": "^4.1.1", |
|||
"wangeditor": "^4.7.15", |
|||
"webpack": "^5.88.2" |
|||
}, |
|||
"devDependencies": { |
|||
"@commitlint/cli": "^17.6.3", |
|||
"@commitlint/config-conventional": "^17.6.3", |
|||
"@iconify-json/ep": "^1.1.10", |
|||
"@types/md5": "^2.3.2", |
|||
"@types/nprogress": "^0.2.0", |
|||
"@types/path-browserify": "^1.0.0", |
|||
"@typescript-eslint/eslint-plugin": "^5.59.6", |
|||
"@typescript-eslint/parser": "^5.59.6", |
|||
"autoprefixer": "^10.4.14", |
|||
"commitizen": "^4.3.0", |
|||
"cz-git": "^1.6.1", |
|||
"eslint": "^8.40.0", |
|||
"eslint-config-prettier": "^8.8.0", |
|||
"eslint-plugin-prettier": "^4.2.1", |
|||
"eslint-plugin-vue": "^9.13.0", |
|||
"fast-glob": "^3.2.11", |
|||
"husky": "^8.0.3", |
|||
"lint-staged": "^13.2.2", |
|||
"postcss": "^8.4.23", |
|||
"postcss-html": "^1.5.0", |
|||
"postcss-scss": "^4.0.6", |
|||
"prettier": "^2.8.8", |
|||
"sass": "^1.58.3", |
|||
"stylelint": "^15.5.0", |
|||
"stylelint-config-html": "^1.1.0", |
|||
"stylelint-config-recess-order": "^4.0.0", |
|||
"stylelint-config-recommended-scss": "11.0.0 ", |
|||
"stylelint-config-recommended-vue": "^1.4.0", |
|||
"stylelint-config-standard": "^33.0.0", |
|||
"stylelint-config-standard-scss": "^9.0.0", |
|||
"typescript": "^5.0.4", |
|||
"unocss": "^0.51.13", |
|||
"unplugin-auto-import": "^0.15.3", |
|||
"unplugin-icons": "^0.16.1", |
|||
"unplugin-vue-components": "^0.24.1", |
|||
"vite": "^4.3.5", |
|||
"vite-plugin-svg-icons": "^2.0.1", |
|||
"vue-tsc": "^1.6.5 ", |
|||
"webpack-cli": "^5.1.4" |
|||
}, |
|||
"repository": "", |
|||
"author": "", |
|||
"license": "MIT" |
|||
} |
|||
@ -1,46 +0,0 @@ |
|||
import { createApp } from 'vue'; |
|||
import App from './App.vue'; |
|||
import router from '@/router'; |
|||
import { setupStore } from '@/store'; |
|||
import { setupDirective } from '@/directive'; |
|||
|
|||
import ElementPlus from 'element-plus' |
|||
import zhCn from 'element-plus/es/locale/lang/zh-cn' |
|||
|
|||
import '@/permission'; |
|||
|
|||
// 本地SVG图标
|
|||
import 'virtual:svg-icons-register'; |
|||
|
|||
// 国际化
|
|||
import i18n from '@/lang/index'; |
|||
|
|||
// 样式
|
|||
import 'element-plus/theme-chalk/dark/css-vars.css'; |
|||
import '@/styles/index.scss'; |
|||
import 'uno.css'; |
|||
import VueQuillEditor from 'vue-quill-editor' |
|||
import 'quill/dist/quill.core.css' |
|||
import 'quill/dist/quill.snow.css' |
|||
import 'quill/dist/quill.bubble.css' |
|||
Vue.use(VueQuillEditor); |
|||
|
|||
|
|||
const app = createApp(App); |
|||
// 全局注册 自定义指令(directive)
|
|||
setupDirective(app); |
|||
// 全局注册 状态管理(store)
|
|||
setupStore(app); |
|||
import * as ElementPlusIconsVue from '@element-plus/icons-vue' |
|||
|
|||
import AKDesign from '@/views/sysworkflow/codepage/index' |
|||
|
|||
for (const [key, component] of Object.entries(ElementPlusIconsVue)) { |
|||
app.component(key, component) |
|||
} |
|||
|
|||
app.use(router).use(i18n).use(ElementPlus, { |
|||
locale: zhCn |
|||
}).use(AKDesign).mount('#app'); |
|||
|
|||
|
|||
@ -1,46 +0,0 @@ |
|||
import { createApp } from 'vue'; |
|||
import App from './App.vue'; |
|||
import router from '@/router'; |
|||
import { setupStore } from '@/store'; |
|||
import { setupDirective } from '@/directive'; |
|||
|
|||
import ElementPlus from 'element-plus' |
|||
import zhCn from 'element-plus/es/locale/lang/zh-cn' |
|||
|
|||
import '@/permission'; |
|||
|
|||
// 本地SVG图标
|
|||
import 'virtual:svg-icons-register'; |
|||
|
|||
// 国际化
|
|||
import i18n from '@/lang/index'; |
|||
|
|||
// 样式
|
|||
import 'element-plus/theme-chalk/dark/css-vars.css'; |
|||
import '@/styles/index.scss'; |
|||
import 'uno.css'; |
|||
import VueQuillEditor from 'vue-quill-editor' |
|||
import 'quill/dist/quill.core.css' |
|||
import 'quill/dist/quill.snow.css' |
|||
import 'quill/dist/quill.bubble.css' |
|||
|
|||
|
|||
|
|||
const app = createApp(App); |
|||
// 全局注册 自定义指令(directive)
|
|||
setupDirective(app); |
|||
// 全局注册 状态管理(store)
|
|||
setupStore(app); |
|||
import * as ElementPlusIconsVue from '@element-plus/icons-vue' |
|||
|
|||
import AKDesign from '@/views/sysworkflow/codepage/index' |
|||
|
|||
for (const [key, component] of Object.entries(ElementPlusIconsVue)) { |
|||
app.component(key, component) |
|||
} |
|||
|
|||
app.use(router).use(i18n).use(ElementPlus, { |
|||
locale: zhCn |
|||
}).use(AKDesign).mount('#app'); |
|||
|
|||
|
|||
@ -1,45 +0,0 @@ |
|||
import { createApp } from 'vue'; |
|||
import App from './App.vue'; |
|||
import router from '@/router'; |
|||
import { setupStore } from '@/store'; |
|||
import { setupDirective } from '@/directive'; |
|||
|
|||
import ElementPlus from 'element-plus' |
|||
import zhCn from 'element-plus/es/locale/lang/zh-cn' |
|||
|
|||
import '@/permission'; |
|||
|
|||
// 本地SVG图标
|
|||
import 'virtual:svg-icons-register'; |
|||
|
|||
// 国际化
|
|||
import i18n from '@/lang/index'; |
|||
|
|||
// 样式
|
|||
import 'element-plus/theme-chalk/dark/css-vars.css'; |
|||
import '@/styles/index.scss'; |
|||
import 'uno.css'; |
|||
import VueQuillEditor from 'vue-quill-editor' |
|||
import 'quill/dist/quill.core.css' |
|||
import 'quill/dist/quill.snow.css' |
|||
import 'quill/dist/quill.bubble.css' |
|||
|
|||
|
|||
const app = createApp(App); |
|||
// 全局注册 自定义指令(directive)
|
|||
setupDirective(app); |
|||
// 全局注册 状态管理(store)
|
|||
setupStore(app); |
|||
import * as ElementPlusIconsVue from '@element-plus/icons-vue' |
|||
|
|||
import AKDesign from '@/views/sysworkflow/codepage/index' |
|||
|
|||
for (const [key, component] of Object.entries(ElementPlusIconsVue)) { |
|||
app.component(key, component) |
|||
} |
|||
|
|||
app.use(router).use(i18n).use(ElementPlus, { |
|||
locale: zhCn |
|||
}).use(AKDesign).mount('#app'); |
|||
|
|||
|
|||
@ -1,43 +0,0 @@ |
|||
import { createApp } from 'vue'; |
|||
import App from './App.vue'; |
|||
import router from '@/router'; |
|||
import { setupStore } from '@/store'; |
|||
import { setupDirective } from '@/directive'; |
|||
|
|||
import ElementPlus from 'element-plus' |
|||
import zhCn from 'element-plus/es/locale/lang/zh-cn' |
|||
|
|||
import '@/permission'; |
|||
|
|||
// 本地SVG图标
|
|||
import 'virtual:svg-icons-register'; |
|||
|
|||
// 国际化
|
|||
import i18n from '@/lang/index'; |
|||
|
|||
// 样式
|
|||
import 'element-plus/theme-chalk/dark/css-vars.css'; |
|||
import '@/styles/index.scss'; |
|||
import 'uno.css'; |
|||
import VueQuillEditor from 'vue-quill-editor' |
|||
import 'quill/dist/quill.core.css' |
|||
import 'quill/dist/quill.snow.css' |
|||
import 'quill/dist/quill.bubble.css' |
|||
const app = createApp(App); |
|||
// 全局注册 自定义指令(directive)
|
|||
setupDirective(app); |
|||
// 全局注册 状态管理(store)
|
|||
setupStore(app); |
|||
import * as ElementPlusIconsVue from '@element-plus/icons-vue' |
|||
|
|||
import AKDesign from '@/views/sysworkflow/codepage/index' |
|||
|
|||
for (const [key, component] of Object.entries(ElementPlusIconsVue)) { |
|||
app.component(key, component) |
|||
} |
|||
|
|||
app.use(router).use(i18n).use(ElementPlus, { |
|||
locale: zhCn |
|||
}).use(AKDesign).mount('#app'); |
|||
|
|||
|
|||
@ -1,201 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
type:"", |
|||
value1:"2023", |
|||
}) |
|||
// 获取数据 |
|||
const tableq = ref([]) |
|||
const postt = ()=>{ |
|||
const add = formdate.orgidlist.toString(); |
|||
const ass = new Date(formdate.value1); |
|||
const qwe = ass.getFullYear(); |
|||
const zjr = qwe.toString(); |
|||
departmentprogramme({orgid:add,year:zjr,version:formdate.name}) |
|||
.then(data => { |
|||
tableq.value = data.data; |
|||
total.value = data.data.count; |
|||
}) |
|||
} |
|||
postt() |
|||
// 新增数据 |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 handle=(data:any)=>{ |
|||
formdate.orgidlist = data.id |
|||
console.log(formdate.orgidlist) |
|||
} |
|||
const handleedit=(val:any)=>{ |
|||
data.editPostCont=true, |
|||
rowInfo.value=val; |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfo.value=val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<el-container style="width: 100%"> |
|||
<diV> |
|||
<el-button @click="zjr">重置</el-button> |
|||
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" show-checkbox clearable multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @check="handle"/> |
|||
</div> |
|||
<el-col :span="22"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,201 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
type:"", |
|||
value1:"2023", |
|||
}) |
|||
// 获取数据 |
|||
const tableq = ref([]) |
|||
const postt = ()=>{ |
|||
const add = formdate.orgidlist.toString(); |
|||
const ass = new Date(formdate.value1); |
|||
const qwe = ass.getFullYear(); |
|||
const zjr = qwe.toString(); |
|||
departmentprogramme({orgid:add,year:zjr,version:formdate.name}) |
|||
.then(data => { |
|||
tableq.value = data.data; |
|||
total.value = data.data.count; |
|||
}) |
|||
} |
|||
postt() |
|||
// 新增数据 |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 handle=(data:any)=>{ |
|||
formdate.orgidlist = data.id |
|||
console.log(formdate.orgidlist) |
|||
} |
|||
const handleedit=(val:any)=>{ |
|||
data.editPostCont=true, |
|||
rowInfo.value=val; |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfo.value=val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<el-container style="width: 100%"> |
|||
<diV> |
|||
<el-button @click="zjr">重置</el-button> |
|||
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" show-checkbox clearable multiple node-key="id" class="orgTree" :data="tableData" getcompany :default-expand-all="false" @check="handle"/> |
|||
</div> |
|||
<el-col :span="22"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,201 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
type:"", |
|||
value1:"2023", |
|||
}) |
|||
// 获取数据 |
|||
const tableq = ref([]) |
|||
const postt = ()=>{ |
|||
const add = formdate.orgidlist.toString(); |
|||
const ass = new Date(formdate.value1); |
|||
const qwe = ass.getFullYear(); |
|||
const zjr = qwe.toString(); |
|||
departmentprogramme({orgid:add,year:zjr,version:formdate.name}) |
|||
.then(data => { |
|||
tableq.value = data.data; |
|||
total.value = data.data.count; |
|||
}) |
|||
} |
|||
postt() |
|||
// 新增数据 |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 handle=(data:any)=>{ |
|||
formdate.orgidlist = data.id |
|||
console.log(formdate.orgidlist) |
|||
} |
|||
const handleedit=(val:any)=>{ |
|||
data.editPostCont=true, |
|||
rowInfo.value=val; |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfo.value=val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<el-container style="width: 100%"> |
|||
<diV> |
|||
<el-button @click="zjr">重置</el-button> |
|||
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" show-checkbox clearable multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @check="handle"/> |
|||
</div> |
|||
<el-col :span="22"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,201 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
type:"", |
|||
value1:"2023", |
|||
}) |
|||
// 获取数据 |
|||
const tableq = ref([]) |
|||
const postt = ()=>{ |
|||
const add = formdate.orgidlist.toString(); |
|||
const ass = new Date(formdate.value1); |
|||
const qwe = ass.getFullYear(); |
|||
const zjr = qwe.toString(); |
|||
departmentprogramme({orgid:add,year:zjr,version:formdate.name}) |
|||
.then(data => { |
|||
tableq.value = data.data; |
|||
total.value = data.data.count; |
|||
}) |
|||
} |
|||
postt() |
|||
// 新增数据 |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 handle=(data:any)=>{ |
|||
formdate.orgidlist = data.id |
|||
console.log(formdate.orgidlist) |
|||
} |
|||
const handleedit=(val:any)=>{ |
|||
data.editPostCont=true, |
|||
rowInfo.value=val; |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfo.value=val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<el-container style="width: 100%"> |
|||
<diV> |
|||
<el-button @click="zjr">全选</el-button> |
|||
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" show-checkbox clearable multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @check="handle"/> |
|||
</div> |
|||
<el-col :span="22"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,201 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
type:"", |
|||
value1:"2023", |
|||
}) |
|||
// 获取数据 |
|||
const tableq = ref([]) |
|||
const postt = ()=>{ |
|||
const add = formdate.orgidlist.toString(); |
|||
const ass = new Date(formdate.value1); |
|||
const qwe = ass.getFullYear(); |
|||
const zjr = qwe.toString(); |
|||
departmentprogramme({orgid:add,year:zjr,version:formdate.name}) |
|||
.then(data => { |
|||
tableq.value = data.data; |
|||
total.value = data.data.count; |
|||
}) |
|||
} |
|||
postt() |
|||
// 新增数据 |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 handle=(data:any)=>{ |
|||
formdate.orgidlist = data.id |
|||
console.log(formdate.orgidlist) |
|||
} |
|||
const handleedit=(val:any)=>{ |
|||
data.editPostCont=true, |
|||
rowInfo.value=val; |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfo.value=val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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" show-checkbox clearable multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @check="handle"/> |
|||
</div> |
|||
<el-col :span="22"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,201 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
type:"", |
|||
value1:"2023", |
|||
}) |
|||
// 获取数据 |
|||
const tableq = ref([]) |
|||
const postt = ()=>{ |
|||
const add = formdate.orgidlist.toString(); |
|||
const ass = new Date(formdate.value1); |
|||
const qwe = ass.getFullYear(); |
|||
const zjr = qwe.toString(); |
|||
departmentprogramme({orgid:add,year:zjr,version:formdate.name}) |
|||
.then(data => { |
|||
tableq.value = data.data; |
|||
total.value = data.data.count; |
|||
}) |
|||
} |
|||
postt() |
|||
// 新增数据 |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 handle=(data:any)=>{ |
|||
formdate.orgidlist = data.id |
|||
console.log(formdate.orgidlist) |
|||
} |
|||
const handleedit=(val:any)=>{ |
|||
data.editPostCont=true, |
|||
rowInfo.value=val; |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfo.value=val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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" show-checkbox clearable multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @check="handle"/> |
|||
</div> |
|||
<el-col :span="22"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,201 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
type:"", |
|||
value1:"2023", |
|||
}) |
|||
// 获取数据 |
|||
const tableq = ref([]) |
|||
const postt = ()=>{ |
|||
const add = formdate.orgidlist.toString(); |
|||
const ass = new Date(formdate.value1); |
|||
const qwe = ass.getFullYear(); |
|||
const zjr = qwe.toString(); |
|||
departmentprogramme({orgid:add,year:zjr,version:formdate.name}) |
|||
.then(data => { |
|||
tableq.value = data.data; |
|||
total.value = data.data.count; |
|||
}) |
|||
} |
|||
postt() |
|||
// 新增数据 |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 handle=(data:any)=>{ |
|||
formdate.orgidlist = data.id.toString().split() |
|||
newtarlist() |
|||
} |
|||
const handleedit=(val:any)=>{ |
|||
data.editPostCont=true, |
|||
rowInfo.value=val; |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfo.value=val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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" show-checkbox clearable multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @check="handle"/> |
|||
</div> |
|||
<el-col :span="22"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,205 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
type:"", |
|||
value1:"2023", |
|||
}) |
|||
// 获取数据 |
|||
const tableq = ref([]) |
|||
const postt = ()=>{ |
|||
const add = formdate.orgidlist.toString(); |
|||
const ass = new Date(formdate.value1); |
|||
const qwe = ass.getFullYear(); |
|||
const zjr = qwe.toString(); |
|||
departmentprogramme({orgid:add,year:zjr,version:formdate.name}) |
|||
.then(data => { |
|||
tableq.value = data.data; |
|||
total.value = data.data.count; |
|||
}) |
|||
} |
|||
postt() |
|||
// 新增数据 |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 = [] |
|||
newtarlist() |
|||
} |
|||
const handle=(data:any)=>{ |
|||
formdate.orgidlist = data.id.toString().split() |
|||
newtarlist() |
|||
} |
|||
const handleedit=(val:any)=>{ |
|||
data.editPostCont=true, |
|||
rowInfo.value=val; |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfo.value=val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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" show-checkbox clearable multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @check="handle"/> |
|||
</div> |
|||
<el-col :span="22"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,205 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
type:"", |
|||
value1:"2023", |
|||
}) |
|||
// 获取数据 |
|||
const tableq = ref([]) |
|||
const postt = ()=>{ |
|||
const add = formdate.orgidlist.toString(); |
|||
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; |
|||
}) |
|||
} |
|||
postt() |
|||
// 新增数据 |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 = [] |
|||
newtarlist() |
|||
} |
|||
const handle=(data:any)=>{ |
|||
formdate.orgidlist = data.id.toString().split() |
|||
newtarlist() |
|||
} |
|||
const handleedit=(val:any)=>{ |
|||
data.editPostCont=true, |
|||
rowInfo.value=val; |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfo.value=val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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" show-checkbox clearable multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @check="handle"/> |
|||
</div> |
|||
<el-col :span="22"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,204 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
}) |
|||
} |
|||
postt() |
|||
// 新增数据 |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 = [] |
|||
newtarlist() |
|||
} |
|||
const handle=(data:any)=>{ |
|||
formdate.orgidlist = data.id.toString().split() |
|||
newtarlist() |
|||
} |
|||
const handleedit=(val:any)=>{ |
|||
data.editPostCont=true, |
|||
rowInfo.value=val; |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfo.value=val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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" show-checkbox clearable multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @check="handle"/> |
|||
</div> |
|||
<el-col :span="22"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,203 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 = [] |
|||
newtarlist() |
|||
} |
|||
const handle=(data:any)=>{ |
|||
formdate.orgidlist = data.id.toString().split() |
|||
newtarlist() |
|||
} |
|||
const handleedit=(val:any)=>{ |
|||
data.editPostCont=true, |
|||
rowInfo.value=val; |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfo.value=val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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" show-checkbox clearable multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @check="handle"/> |
|||
</div> |
|||
<el-col :span="22"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,203 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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().split() |
|||
newtarlist() |
|||
} |
|||
const handleedit=(val:any)=>{ |
|||
data.editPostCont=true, |
|||
rowInfo.value=val; |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfo.value=val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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" show-checkbox clearable multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @check="handle"/> |
|||
</div> |
|||
<el-col :span="22"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,203 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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().split() |
|||
postt() |
|||
} |
|||
const handleedit=(val:any)=>{ |
|||
data.editPostCont=true, |
|||
rowInfo.value=val; |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfo.value=val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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" show-checkbox clearable multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @check="handle"/> |
|||
</div> |
|||
<el-col :span="22"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,204 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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().split() |
|||
postt() |
|||
} |
|||
const handleedit=(val:any)=>{ |
|||
data.editPostCont=true, |
|||
rowInfo.value=val; |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfo.value=val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt( |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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" show-checkbox clearable multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @check="handle"/> |
|||
</div> |
|||
<el-col :span="22"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,204 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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().split() |
|||
postt() |
|||
} |
|||
const handleedit=(val:any)=>{ |
|||
data.editPostCont=true, |
|||
rowInfo.value=val; |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfo.value=val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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" show-checkbox clearable multiple node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @check="handle"/> |
|||
</div> |
|||
<el-col :span="22"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,204 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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().split() |
|||
postt() |
|||
} |
|||
const handleedit=(val:any)=>{ |
|||
data.editPostCont=true, |
|||
rowInfo.value=val; |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfo.value=val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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" @check="handle"/> |
|||
</div> |
|||
<el-col :span="22"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,204 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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().split() |
|||
postt() |
|||
} |
|||
const handleedit=(val:any)=>{ |
|||
data.editPostCont=true, |
|||
rowInfo.value=val; |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfo.value=val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,204 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 handleedit=(val:any)=>{ |
|||
data.editPostCont=true, |
|||
rowInfo.value=val; |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfo.value=val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,204 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 handleedit=(val:any)=>{ |
|||
data.editPostCont=true, |
|||
rowInfo.value=val; |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfos.value=val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,205 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 handleedit=(val:any)=>{ |
|||
data.editPostCont=true, |
|||
rowInfo.value=val; |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfos.value=val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,205 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 handleedit=(val:any)=>{ |
|||
data.editPostCont=true, |
|||
rowInfo.value=val; |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfos.value=val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,205 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
let rowInfos = 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:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 handleedit=(val:any)=>{ |
|||
data.editPostCont=true, |
|||
rowInfo.value=val; |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfos.value=val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,205 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
let rowInfos = 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:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 handleedit=(val:any)=>{ |
|||
data.editPostCont=true, |
|||
rowInfo.value=val; |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfos.value=val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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="rowInfos" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,205 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
let rowInfos = 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:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 handleedit=(val:any)=>{ |
|||
data.editPostCont=true, |
|||
rowInfo.value=val; |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfos.value=val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,205 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 handleedit=(val:any)=>{ |
|||
data.editPostCont=true, |
|||
rowInfo.value=val; |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfos.value=val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,205 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
let rowInfso = 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:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 handleedit=(val:any)=>{ |
|||
data.editPostCont=true, |
|||
rowInfo.value=val; |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfos.value=val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,204 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 handleedit=(val:any)=>{ |
|||
data.editPostCont=true, |
|||
rowInfo.value=val; |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfo.value=val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,200 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,199 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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("删除成功")) |
|||
}) |
|||
}; |
|||
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 zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,200 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,200 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,200 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="'deaprtname'" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,200 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="'deaprtname'+" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,200 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="'deaprtname'" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,200 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="'deaprtname''deaprtname'" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,200 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="'deaprtname'+'deaprtname'" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,200 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname+'deaprtname'" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,200 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname+deaprtname'" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,200 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname+deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,200 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="groupname+deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,200 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,200 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="groupname+""deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,200 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="groupname""deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,200 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="groupname"+"deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,200 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop=""groupname"+"deaprtname"" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,200 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,201 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,201 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,201 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handle(row)">复制</el-button> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,201 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleio(row)">复制</el-button> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,201 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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 zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleio(row)">查看详情</el-button> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,202 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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; |
|||
} |
|||
handleio |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleio(row)">查看详情</el-button> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,202 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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=() |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleio(row)">查看详情</el-button> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,204 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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=()=>{ |
|||
|
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleio(row)">查看详情</el-button> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,205 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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 |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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=()=>{ |
|||
|
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleio(row)">查看详情</el-button> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,205 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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 './' |
|||
// eslint-disable-next-line vue/require-prop-types |
|||
const { addShow, title } = defineProps(['addShow', 'title']) |
|||
const data = reactive({ |
|||
formInline:{ |
|||
region:'', |
|||
}, |
|||
title:"", |
|||
addPostBox: false, |
|||
edPostBox:false, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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=()=>{ |
|||
|
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleio(row)">查看详情</el-button> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,205 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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=()=>{ |
|||
|
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleio(row)">查看详情</el-button> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,205 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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=()=>{ |
|||
|
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleio(row)">查看详情</el-button> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,206 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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=()=>{ |
|||
|
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleio(row)">查看详情</el-button> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
|
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,206 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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=()=>{ |
|||
|
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleio(row)">查看详情</el-button> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
< |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,206 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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=()=>{ |
|||
|
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleio(row)">查看详情</el-button> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
<Yg></Yg> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,206 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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=()=>{ |
|||
|
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleio(row)">查看详情</el-button> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
<Yg v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Yg> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,206 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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=()=>{ |
|||
|
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleio(row)">查看详情</el-button> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialoglog> |
|||
<Yg v-if="data.ygPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Yg> |
|||
</div> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
.horizontal-controls { |
|||
display: flex; |
|||
float: left; |
|||
|
|||
} |
|||
|
|||
/* 可以根据需要调整样式 */ |
|||
</style> |
|||
@ -1,206 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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, |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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=()=>{ |
|||
|
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleio(row)">查看详情</el-button> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></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> |
|||
@ -1,207 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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, |
|||
yg |
|||
}) |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
children:'child' |
|||
} |
|||
const orgTreeProp ={ |
|||
label: 'title', |
|||
children:'childen' |
|||
} |
|||
const formdat = { |
|||
someProp:"", |
|||
} |
|||
const total =ref(0) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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=()=>{ |
|||
|
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleio(row)">查看详情</el-button> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></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> |
|||
@ -1,207 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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=()=>{ |
|||
|
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleio(row)">查看详情</el-button> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></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> |
|||
@ -1,207 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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=()=>{ |
|||
data.yg |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleio(row)">查看详情</el-button> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></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> |
|||
@ -1,208 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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=()=>{ |
|||
data.ygPostBox=true; |
|||
|
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleio(row)">查看详情</el-button> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></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> |
|||
@ -1,208 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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=()=>{ |
|||
data.ygPostBox=true; |
|||
rowInfo |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleio(row)">查看详情</el-button> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></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> |
|||
@ -1,208 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
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=()=>{ |
|||
data.ygPostBox=true; |
|||
rowInfo.value = val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleio(row)">查看详情</el-button> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></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> |
|||
@ -1,208 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
const handleDel = (val:any) => { |
|||
const dictTypeIds = [val.outID || postIds.value].join(","); |
|||
let dictTypeIdAry = dictTypeIds.split(",") |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const add = val.key.toString() |
|||
handleSure(val) |
|||
console.log(val.id) |
|||
edit_depart({id:add,state:3,istrue:2}).then(()=> |
|||
ElMessage.success("删除成功")) |
|||
}) |
|||
postt() |
|||
}; |
|||
const handleSure = (val:any)=> { |
|||
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
|||
if(index!=-1){ |
|||
tableData.value.splice(index, 1); |
|||
} |
|||
} |
|||
const resetChecked=()=> { |
|||
formdate.orgidlist = [] |
|||
postt() |
|||
} |
|||
const handle=(data:any)=>{ |
|||
formdate.orgidlist = data.id.toString() |
|||
postt() |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfo.value=val; |
|||
} |
|||
const handleio=(val:any)=>{ |
|||
data.ygPostBox=true; |
|||
rowInfo.value = val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleio(row)">查看详情</el-button> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></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> |
|||
@ -1,208 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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) |
|||
let rowInfo = ref<any>({}) |
|||
const postIds = ref<number[]>([]) |
|||
const tableData = ref<any>([]); |
|||
const tables = ref<any>([]); |
|||
// 获取侧栏数据 |
|||
function jjjs(){ |
|||
addPostCont("/hrapi/org/govthree","post") |
|||
.then(data => { |
|||
tableData.value = data.data[3].child[14].child; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}); |
|||
} |
|||
jjjs() |
|||
function editPost(){ |
|||
editPostCont({}) |
|||
.then(data => { |
|||
tables.value = data.data.list; |
|||
}) |
|||
} |
|||
editPost() |
|||
const table = ref<any>([]) |
|||
const formdate = reactive({ |
|||
page:0, |
|||
pagesize:20, |
|||
name:"", |
|||
dimension:"", |
|||
attribute:"", |
|||
orgidlist:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
const handleDel = (val:any) => { |
|||
const dictTypeIds = [val.outID || postIds.value].join(","); |
|||
let dictTypeIdAry = dictTypeIds.split(",") |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const add = val.key.toString() |
|||
handleSure(val) |
|||
console.log(val.id) |
|||
edit_depart({id:add,state:3,istrue:2}).then(()=> |
|||
ElMessage.success("删除成功")) |
|||
}) |
|||
postt() |
|||
}; |
|||
const handleSure = (val:any)=> { |
|||
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
|||
if(index!=-1){ |
|||
tableData.value.splice(index, 1); |
|||
} |
|||
} |
|||
const resetChecked=()=> { |
|||
formdate.orgidlist = [] |
|||
postt() |
|||
} |
|||
const handle=(data:any)=>{ |
|||
formdate.orgidlist = data.id.toString() |
|||
postt() |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfo.value=val; |
|||
} |
|||
const handleio=(val:any)=>{ |
|||
data.ygPostBox=true; |
|||
rowInfo.value = val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleio(row)">查看详情</el-button> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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> |
|||
@ -1,208 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 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 } 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:[]as String[], |
|||
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; |
|||
} |
|||
// 删除数据 |
|||
const handleDel = (val:any) => { |
|||
const dictTypeIds = [val.outID || postIds.value].join(","); |
|||
let dictTypeIdAry = dictTypeIds.split(",") |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(() => { |
|||
const add = val.key.toString() |
|||
handleSure(val) |
|||
console.log(val.id) |
|||
edit_depart({id:add,state:3,istrue:2}).then(()=> |
|||
ElMessage.success("删除成功")) |
|||
}) |
|||
postt() |
|||
}; |
|||
const handleSure = (val:any)=> { |
|||
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
|||
if(index!=-1){ |
|||
tableData.value.splice(index, 1); |
|||
} |
|||
} |
|||
const resetChecked=()=> { |
|||
formdate.orgidlist = [] |
|||
postt() |
|||
} |
|||
const handle=(data:any)=>{ |
|||
formdate.orgidlist = data.id.toString() |
|||
postt() |
|||
} |
|||
const handleErd=(val:any)=>{ |
|||
data.edPostBox=true; |
|||
rowInfo.value=val; |
|||
} |
|||
const handleio=(val:any)=>{ |
|||
data.ygPostBox=true; |
|||
rowInfo.value = val; |
|||
} |
|||
//重置 |
|||
const zjr = ()=>{ |
|||
formdate.orgidlist = ""; |
|||
} |
|||
onMounted(()=>{ |
|||
jjjs() |
|||
postt() |
|||
}) |
|||
</script> |
|||
<template> |
|||
<div> |
|||
<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"> |
|||
<div class="horizontal-controls"> |
|||
<el-form-item label="方案版本号"> |
|||
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span class="demonstration">年度</span> |
|||
<el-date-picker v-model="formdate.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-button @click="postt">查询</el-button> |
|||
<el-button class="new_btn" type="success" @click="addtableData">新增</el-button> |
|||
</div> |
|||
<el-table :data="tableq" border style="width: 100%"> |
|||
<el-table-column prop="deaprtname" label="部门"/> |
|||
<el-table-column prop="year" label="年"/> |
|||
<el-table-column prop="key" label="版本号"/> |
|||
<el-table-column prop="time" label="时间" /> |
|||
<el-table-column prop="" label="状态" width="70"> |
|||
<template #default="scope"> |
|||
<el-switch v-model="scope.row.status" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" width="200"> |
|||
<template #default="{ row }"> |
|||
<el-button type="success" link @click="handleio(row)">查看详情</el-button> |
|||
<el-button type="success" link @click="handleErd(row)">复制</el-button> |
|||
<el-button type="danger" link @click="handleDel(row)">删除</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> |
|||
@ -1,209 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
|||
<el-form ref="ruleFormRef" :model="formData" label-width="120px" class="demo-ruleForm" style="width:100%"> |
|||
<el-form-item label="行政组织"> |
|||
<el-tree-select ref="orgTreeRef" v-model="formData.deaprtname" show-checkbox clearable node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :render-after-expand="false" @check="ge_adds"/> |
|||
<el-form-item label="年度"> |
|||
<el-date-picker v-model="formData.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-table v-loading="isshow" :data="tablea"> |
|||
<el-table-column prop="id" label="考核维度" width="1000"> |
|||
<template #default="scope"> |
|||
<el-table :data="scope.row.child"> |
|||
<el-table-column prop="name" label="指标名称"/> |
|||
<el-table-column prop="" label="说明"> |
|||
<el-input v-model="formData.value1"/> |
|||
</el-table-column> |
|||
<el-table-column prop="referencescore" label="指标权重"> |
|||
<el-input v-model="scope.row.referencescore"/> |
|||
</el-table-column> |
|||
<el-table-column prop="" label="状态"> |
|||
<el-select v-model="scope.row.lzq"> |
|||
<el-option label="使用" :value="1" /> |
|||
<el-option label="禁用" :value="2" /> |
|||
<el-option label="观察" :value="3" /> |
|||
</el-select> |
|||
</el-table-column> |
|||
</el-table> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button type="primary" @click="submitForm()">确定</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import { create_scheme } from '@/api/opk/zxy/news/api' |
|||
import "quill/dist/quill.snow.css"; |
|||
interface FormInfo { |
|||
id: string; |
|||
age: string; |
|||
name: string; |
|||
sex: string; |
|||
ccc: string; |
|||
ade: string; |
|||
sort: number; |
|||
title: string; |
|||
type: number; |
|||
} |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
addPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
addrowInfo: { |
|||
type: Object as () => FormInfo, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const emit = defineEmits(["update:addPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
value1:"", |
|||
asd:[] as string[], |
|||
lzq:"", |
|||
}) |
|||
const tableData = 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() |
|||
const handle = (data:any)=>{ |
|||
formData.deaprtname = data.id; |
|||
ge_adds() |
|||
} |
|||
//行政组织 |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const add = formData.deaprtname.toString() |
|||
ge_add({id:add}) |
|||
.then(data => { |
|||
tablea.value = data.data; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:addPostBox", false); |
|||
} |
|||
const handleDel = (val:any) => { |
|||
const dictTypeIds = [val.outID || postIds.value].join(","); |
|||
let dictTypeIdAry = dictTypeIds.split(",") |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
handleSure(val) |
|||
console.log(val.id) |
|||
}; |
|||
const handleSure = (val:any)=> { |
|||
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
|||
if(index!=-1){ |
|||
tableData.value.splice(index, 1); |
|||
} |
|||
} |
|||
const submitForm=()=> { |
|||
handleClose() |
|||
const add = formData.deaprtname.toString() |
|||
const edd = tablea._value |
|||
const ess = formData.value1.getFullYear() |
|||
const see = ess.toString() |
|||
if (props.addrowInfo.name) { |
|||
// 修改 |
|||
const id = props.addrowInfo; // 假设你有一个唯一的ID来识别要修改的项 |
|||
emit("editRow", formData); |
|||
} else { |
|||
// 新增 |
|||
create_scheme({orgid:add,year:see,child:edd}) |
|||
.then((response:any) => { |
|||
// 处理新增成功的情况 |
|||
if (response.code === 200) { |
|||
ElMessage.success("新增成功"); |
|||
emit("addRow", formData); |
|||
} else { |
|||
// 处理新增失败的情况 |
|||
ElMessage.error("新增成功"); |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
|
|||
.avatar-uploader .avatar { |
|||
display: block; |
|||
width: 178px; |
|||
height: 178px; |
|||
} |
|||
</style> |
|||
|
|||
<style lang="scss"> |
|||
.avatar-uploader .el-upload { |
|||
position: relative; |
|||
overflow: hidden; |
|||
cursor: pointer; |
|||
border: 1px dashed var(--el-border-color); |
|||
border-radius: 6px; |
|||
transition: var(--el-transition-duration-fast); |
|||
} |
|||
|
|||
.avatar-uploader .el-upload:hover { |
|||
border-color: var(--el-color-primary); |
|||
} |
|||
|
|||
.el-icon.avatar-uploader-icon { |
|||
width: 178px; |
|||
height: 178px; |
|||
font-size: 28px; |
|||
color: #8c939d; |
|||
text-align: center; |
|||
} |
|||
.el-dialog{ |
|||
width:1200px; |
|||
} |
|||
</style> |
|||
|
|||
@ -1,221 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
|||
<el-form ref="ruleFormRef" :model="formData" label-width="120px" class="demo-ruleForm" style="width:100%"> |
|||
<el-form-item label="行政组织"> |
|||
<el-tree-select ref="orgTreeRef" v-model="formData.deaprtname" show-checkbox clearable node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :render-after-expand="false" @check="ge_adds"/> |
|||
<el-form-item label="年度"> |
|||
<el-date-picker v-model="formData.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-form-item v-loading="isshow" :data="tablea"> |
|||
<el-row> |
|||
<el-col v-for="item in tablea.child" :key="item.id" label="item.name"> |
|||
<el-card v-model="formData.zjr"> |
|||
<template #header> |
|||
<div> |
|||
<span>{{item.name}}</span> |
|||
</div> |
|||
<el-table border :data="item.child"> |
|||
<el-table-column label="指标名称" prop="name" /> |
|||
<el-table-column label="说明" prop="content"> |
|||
<template #default="scope"> |
|||
<el-input v-model="scope.row.content" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="指标权重" prop="referencescore"> |
|||
<template #default="scope"> |
|||
<el-input v-model="scope.row.referencescore" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="状态" prop="status"> |
|||
<template #default="scope"> |
|||
<el-select v-model="scope.row.status"> |
|||
<el-option label="使用" :value="1"/> |
|||
<el-option label="禁用" :value="2"/> |
|||
<el-option label="观察" :value="3"/> |
|||
</el-select> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</template> |
|||
</el-card> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button type="primary" @click="submitForm()">确定</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import { create_scheme } from '@/api/opk/zxy/news/api' |
|||
import "quill/dist/quill.snow.css"; |
|||
interface FormInfo { |
|||
id: string; |
|||
age: string; |
|||
name: string; |
|||
sex: string; |
|||
ccc: string; |
|||
ade: string; |
|||
sort: number; |
|||
title: string; |
|||
type: number; |
|||
} |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
addPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
addrowInfo: { |
|||
type: Object as () => FormInfo, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const emit = defineEmits(["update:addPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
value1:"", |
|||
asd:[] as string[], |
|||
lzq:"", |
|||
}) |
|||
const tableData = 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() |
|||
const handle = (data:any)=>{ |
|||
formData.deaprtname = data.id; |
|||
ge_adds() |
|||
} |
|||
//行政组织 |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const add = formData.deaprtname.toString() |
|||
ge_add({id:add}) |
|||
.then(data => { |
|||
tablea.value = data.data; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:addPostBox", false); |
|||
} |
|||
const handleDel = (val:any) => { |
|||
const dictTypeIds = [val.outID || postIds.value].join(","); |
|||
let dictTypeIdAry = dictTypeIds.split(",") |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
handleSure(val) |
|||
console.log(val.id) |
|||
}; |
|||
const handleSure = (val:any)=> { |
|||
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
|||
if(index!=-1){ |
|||
tableData.value.splice(index, 1); |
|||
} |
|||
} |
|||
const submitForm=()=> { |
|||
handleClose() |
|||
const add = formData.deaprtname.toString() |
|||
const edd = tablea._value |
|||
const ess = formData.value1.getFullYear() |
|||
const see = ess.toString() |
|||
if (props.addrowInfo.name) { |
|||
// 修改 |
|||
const id = props.addrowInfo; // 假设你有一个唯一的ID来识别要修改的项 |
|||
emit("editRow", formData); |
|||
} else { |
|||
// 新增 |
|||
create_scheme({orgid:add,year:see,child:edd}) |
|||
.then((response:any) => { |
|||
// 处理新增成功的情况 |
|||
if (response.code === 200) { |
|||
ElMessage.success("新增成功"); |
|||
emit("addRow", formData); |
|||
} else { |
|||
// 处理新增失败的情况 |
|||
ElMessage.error("新增成功"); |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
|
|||
.avatar-uploader .avatar { |
|||
display: block; |
|||
width: 178px; |
|||
height: 178px; |
|||
} |
|||
</style> |
|||
|
|||
<style lang="scss"> |
|||
.avatar-uploader .el-upload { |
|||
position: relative; |
|||
overflow: hidden; |
|||
cursor: pointer; |
|||
border: 1px dashed var(--el-border-color); |
|||
border-radius: 6px; |
|||
transition: var(--el-transition-duration-fast); |
|||
} |
|||
|
|||
.avatar-uploader .el-upload:hover { |
|||
border-color: var(--el-color-primary); |
|||
} |
|||
|
|||
.el-icon.avatar-uploader-icon { |
|||
width: 178px; |
|||
height: 178px; |
|||
font-size: 28px; |
|||
color: #8c939d; |
|||
text-align: center; |
|||
} |
|||
.el-dialog{ |
|||
width:1200px; |
|||
} |
|||
</style> |
|||
|
|||
@ -1,209 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
|||
<el-form ref="ruleFormRef" :model="formData" label-width="120px" class="demo-ruleForm" style="width:100%"> |
|||
<el-form-item label="行政组织"> |
|||
<el-tree-select ref="orgTreeRef" v-model="formData.deaprtname" show-checkbox clearable node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :render-after-expand="false" @check="ge_adds"/> |
|||
<el-form-item label="年度"> |
|||
<el-date-picker v-model="formData.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-table v-loading="isshow" :data="tablea"> |
|||
<el-table-column prop="id" label="考核维度" width="1000"> |
|||
<template #default="scope"> |
|||
<el-table :data="scope.row.child"> |
|||
<el-table-column prop="name" label="指标名称"/> |
|||
<el-table-column prop="" label="说明"> |
|||
<el-input v-model="formData.value1"/> |
|||
</el-table-column> |
|||
<el-table-column prop="referencescore" label="指标权重"> |
|||
<el-input v-model="scope.row.referencescore"/> |
|||
</el-table-column> |
|||
<el-table-column prop="" label="状态"> |
|||
<el-select v-model="scope.row.lzq"> |
|||
<el-option label="使用" :value="1" /> |
|||
<el-option label="禁用" :value="2" /> |
|||
<el-option label="观察" :value="3" /> |
|||
</el-select> |
|||
</el-table-column> |
|||
</el-table> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button type="primary" @click="submitForm()">确定</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import { create_scheme } from '@/api/opk/zxy/news/api' |
|||
import "quill/dist/quill.snow.css"; |
|||
interface FormInfo { |
|||
id: string; |
|||
age: string; |
|||
name: string; |
|||
sex: string; |
|||
ccc: string; |
|||
ade: string; |
|||
sort: number; |
|||
title: string; |
|||
type: number; |
|||
} |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
addPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
addrowInfo: { |
|||
type: Object as () => FormInfo, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const emit = defineEmits(["update:addPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
value1:"", |
|||
asd:[] as string[], |
|||
lzq:"", |
|||
}) |
|||
const tableData = 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() |
|||
const handle = (data:any)=>{ |
|||
formData.deaprtname = data.id; |
|||
ge_adds() |
|||
} |
|||
//行政组织 |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const add = formData.deaprtname.toString() |
|||
ge_add({id:add}) |
|||
.then(data => { |
|||
tablea.value = data.data; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:addPostBox", false); |
|||
} |
|||
const handleDel = (val:any) => { |
|||
const dictTypeIds = [val.outID || postIds.value].join(","); |
|||
let dictTypeIdAry = dictTypeIds.split(",") |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
handleSure(val) |
|||
console.log(val.id) |
|||
}; |
|||
const handleSure = (val:any)=> { |
|||
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
|||
if(index!=-1){ |
|||
tableData.value.splice(index, 1); |
|||
} |
|||
} |
|||
const submitForm=()=> { |
|||
handleClose() |
|||
const add = formData.deaprtname.toString() |
|||
const edd = tablea._value |
|||
const ess = formData.value1.getFullYear() |
|||
const see = ess.toString() |
|||
if (props.addrowInfo.name) { |
|||
// 修改 |
|||
const id = props.addrowInfo; // 假设你有一个唯一的ID来识别要修改的项 |
|||
emit("editRow", formData); |
|||
} else { |
|||
// 新增 |
|||
create_scheme({orgid:add,year:see,child:edd}) |
|||
.then((response:any) => { |
|||
// 处理新增成功的情况 |
|||
if (response.code === 200) { |
|||
ElMessage.success("新增成功"); |
|||
emit("addRow", formData); |
|||
} else { |
|||
// 处理新增失败的情况 |
|||
ElMessage.error("新增成功"); |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
|
|||
.avatar-uploader .avatar { |
|||
display: block; |
|||
width: 178px; |
|||
height: 178px; |
|||
} |
|||
</style> |
|||
|
|||
<style lang="scss"> |
|||
.avatar-uploader .el-upload { |
|||
position: relative; |
|||
overflow: hidden; |
|||
cursor: pointer; |
|||
border: 1px dashed var(--el-border-color); |
|||
border-radius: 6px; |
|||
transition: var(--el-transition-duration-fast); |
|||
} |
|||
|
|||
.avatar-uploader .el-upload:hover { |
|||
border-color: var(--el-color-primary); |
|||
} |
|||
|
|||
.el-icon.avatar-uploader-icon { |
|||
width: 178px; |
|||
height: 178px; |
|||
font-size: 28px; |
|||
color: #8c939d; |
|||
text-align: center; |
|||
} |
|||
.el-dialog{ |
|||
width:1200px; |
|||
} |
|||
</style> |
|||
|
|||
@ -1,209 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
|||
<el-form ref="ruleFormRef" :model="formData" label-width="120px" class="demo-ruleForm" style="width:100%"> |
|||
<el-form-item label="行政组织"> |
|||
<el-tree-select ref="orgTreeRef" v-model="formData.deaprtname" show-checkbox clearable node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :render-after-expand="false" @check="ge_adds"/> |
|||
<el-form-item label="年度"> |
|||
<el-date-picker v-model="formData.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-table v-loading="isshow" :data="tablea"> |
|||
<el-table-column prop="id" label="考核维度" width="1000"> |
|||
<template #default="scope"> |
|||
<el-table :data="scope.row.child"> |
|||
<el-table-column prop="name" label="指标名称"/> |
|||
<el-table-column prop="" label="说明"> |
|||
<el-input v-model="formData.value1"/> |
|||
</el-table-column> |
|||
<el-table-column prop="referencescore" label="指标权重"> |
|||
<el-input v-model="scope.row.referencescore"/> |
|||
</el-table-column> |
|||
<el-table-column prop="" label="状态"> |
|||
<el-select v-model="scope.row.lzq"> |
|||
<el-option label="使用" :value="1" /> |
|||
<el-option label="禁用" :value="2" /> |
|||
<el-option label="观察" :value="3" /> |
|||
</el-select> |
|||
</el-table-column> |
|||
</el-table> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button type="primary" @click="submitForm()">确定</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import { create_scheme } from '@/api/opk/zxy/news/api' |
|||
import "quill/dist/quill.snow.css"; |
|||
interface FormInfo { |
|||
id: string; |
|||
age: string; |
|||
name: string; |
|||
sex: string; |
|||
ccc: string; |
|||
ade: string; |
|||
sort: number; |
|||
title: string; |
|||
type: number; |
|||
} |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
addPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
addrowInfo: { |
|||
type: Object as () => FormInfo, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const emit = defineEmits(["update:addPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
value1:"", |
|||
asd:[] as string[], |
|||
lzq:"", |
|||
}) |
|||
const tableData = 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() |
|||
const handle = (data:any)=>{ |
|||
formData.deaprtname = data.id; |
|||
ge_adds() |
|||
} |
|||
//行政组织 |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const add = formData.deaprtname.toString() |
|||
ge_add({id:add}) |
|||
.then(data => { |
|||
tablea.value = data.data; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:addPostBox", false); |
|||
} |
|||
const handleDel = (val:any) => { |
|||
const dictTypeIds = [val.outID || postIds.value].join(","); |
|||
let dictTypeIdAry = dictTypeIds.split(",") |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
handleSure(val) |
|||
console.log(val.id) |
|||
}; |
|||
const handleSure = (val:any)=> { |
|||
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
|||
if(index!=-1){ |
|||
tableData.value.splice(index, 1); |
|||
} |
|||
} |
|||
const submitForm=()=> { |
|||
handleClose() |
|||
const add = formData.deaprtname.toString() |
|||
const edd = tablea._value |
|||
const ess = formData.value1.getFullYear() |
|||
const see = ess.toString() |
|||
if (props.addrowInfo.name) { |
|||
// 修改 |
|||
const id = props.addrowInfo; // 假设你有一个唯一的ID来识别要修改的项 |
|||
emit("editRow", formData); |
|||
} else { |
|||
// 新增 |
|||
create_scheme({orgid:add,year:see,child:edd}) |
|||
.then((response:any) => { |
|||
// 处理新增成功的情况 |
|||
if (response.code === 200) { |
|||
ElMessage.success("新增成功"); |
|||
emit("addRow", formData); |
|||
} else { |
|||
// 处理新增失败的情况 |
|||
ElMessage.error("新增成功"); |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
|
|||
.avatar-uploader .avatar { |
|||
display: block; |
|||
width: 178px; |
|||
height: 178px; |
|||
} |
|||
</style> |
|||
|
|||
<style lang="scss"> |
|||
.avatar-uploader .el-upload { |
|||
position: relative; |
|||
overflow: hidden; |
|||
cursor: pointer; |
|||
border: 1px dashed var(--el-border-color); |
|||
border-radius: 6px; |
|||
transition: var(--el-transition-duration-fast); |
|||
} |
|||
|
|||
.avatar-uploader .el-upload:hover { |
|||
border-color: var(--el-color-primary); |
|||
} |
|||
|
|||
.el-icon.avatar-uploader-icon { |
|||
width: 178px; |
|||
height: 178px; |
|||
font-size: 28px; |
|||
color: #8c939d; |
|||
text-align: center; |
|||
} |
|||
.el-dialog{ |
|||
width:1200px; |
|||
} |
|||
</style> |
|||
|
|||
@ -1,221 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
|||
<el-form ref="ruleFormRef" :model="formData" label-width="120px" class="demo-ruleForm" style="width:100%"> |
|||
<el-form-item label="行政组织"> |
|||
<el-tree-select ref="orgTreeRef" v-model="formData.deaprtname" show-checkbox clearable node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :render-after-expand="false" @check="ge_adds"/> |
|||
<el-form-item label="年度"> |
|||
<el-date-picker v-model="formData.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-form-item v-loading="isshow" :data="tablea"> |
|||
<el-row> |
|||
<el-col v-for="item in tablea.child" :key="item.id" label="item.name"> |
|||
<el-card v-model="formData.zjr"> |
|||
<template #header> |
|||
<div> |
|||
<span>{{item.name}}</span> |
|||
</div> |
|||
<el-table border :data="item.child"> |
|||
<el-table-column label="指标名称" prop="name" /> |
|||
<el-table-column label="说明" prop="content"> |
|||
<template #default="scope"> |
|||
<el-input v-model="scope.row.content" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="指标权重" prop="referencescore"> |
|||
<template #default="scope"> |
|||
<el-input v-model="scope.row.referencescore" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="状态" prop="status"> |
|||
<template #default="scope"> |
|||
<el-select v-model="scope.row.status"> |
|||
<el-option label="使用" :value="1"/> |
|||
<el-option label="禁用" :value="2"/> |
|||
<el-option label="观察" :value="3"/> |
|||
</el-select> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</template> |
|||
</el-card> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button type="primary" @click="submitForm()">确定</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import { create_scheme } from '@/api/opk/zxy/news/api' |
|||
import "quill/dist/quill.snow.css"; |
|||
interface FormInfo { |
|||
id: string; |
|||
age: string; |
|||
name: string; |
|||
sex: string; |
|||
ccc: string; |
|||
ade: string; |
|||
sort: number; |
|||
title: string; |
|||
type: number; |
|||
} |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
addPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
addrowInfo: { |
|||
type: Object as () => FormInfo, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const emit = defineEmits(["update:addPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
value1:"", |
|||
asd:[] as string[], |
|||
lzq:"", |
|||
}) |
|||
const tableData = 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() |
|||
const handle = (data:any)=>{ |
|||
formData.deaprtname = data.id; |
|||
ge_adds() |
|||
} |
|||
//行政组织 |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const add = formData.deaprtname.toString() |
|||
ge_add({id:add}) |
|||
.then(data => { |
|||
tablea.value = data.data; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:addPostBox", false); |
|||
} |
|||
const handleDel = (val:any) => { |
|||
const dictTypeIds = [val.outID || postIds.value].join(","); |
|||
let dictTypeIdAry = dictTypeIds.split(",") |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
handleSure(val) |
|||
console.log(val.id) |
|||
}; |
|||
const handleSure = (val:any)=> { |
|||
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
|||
if(index!=-1){ |
|||
tableData.value.splice(index, 1); |
|||
} |
|||
} |
|||
const submitForm=()=> { |
|||
handleClose() |
|||
const add = formData.deaprtname.toString() |
|||
const edd = tablea._value |
|||
const ess = formData.value1.getFullYear() |
|||
const see = ess.toString() |
|||
if (props.addrowInfo.name) { |
|||
// 修改 |
|||
const id = props.addrowInfo; // 假设你有一个唯一的ID来识别要修改的项 |
|||
emit("editRow", formData); |
|||
} else { |
|||
// 新增 |
|||
create_scheme({orgid:add,year:see,child:edd}) |
|||
.then((response:any) => { |
|||
// 处理新增成功的情况 |
|||
if (response.code === 200) { |
|||
ElMessage.success("新增成功"); |
|||
emit("addRow", formData); |
|||
} else { |
|||
// 处理新增失败的情况 |
|||
ElMessage.error("新增成功"); |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
|
|||
.avatar-uploader .avatar { |
|||
display: block; |
|||
width: 178px; |
|||
height: 178px; |
|||
} |
|||
</style> |
|||
|
|||
<style lang="scss"> |
|||
.avatar-uploader .el-upload { |
|||
position: relative; |
|||
overflow: hidden; |
|||
cursor: pointer; |
|||
border: 1px dashed var(--el-border-color); |
|||
border-radius: 6px; |
|||
transition: var(--el-transition-duration-fast); |
|||
} |
|||
|
|||
.avatar-uploader .el-upload:hover { |
|||
border-color: var(--el-color-primary); |
|||
} |
|||
|
|||
.el-icon.avatar-uploader-icon { |
|||
width: 178px; |
|||
height: 178px; |
|||
font-size: 28px; |
|||
color: #8c939d; |
|||
text-align: center; |
|||
} |
|||
.el-dialog{ |
|||
width:1200px; |
|||
} |
|||
</style> |
|||
|
|||
@ -1,221 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
|||
<el-form ref="ruleFormRef" :model="formData" label-width="120px" class="demo-ruleForm" style="width:100%"> |
|||
<el-form-item label="行政组织"> |
|||
<el-tree-select ref="orgTreeRef" v-model="formData.deaprtname" show-checkbox clearable node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :render-after-expand="false" @check="ge_adds"/> |
|||
<el-form-item label="年度"> |
|||
<el-date-picker v-model="formData.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-form-item v-loading="isshow" :data="tablea"> |
|||
<el-row> |
|||
<el-col v-for="item in tablea.child" :key="item.id" label="item.name"> |
|||
<el-card v-model="formData.zjr"> |
|||
<template #header> |
|||
<div> |
|||
<span>{{item.name}}</span> |
|||
</div> |
|||
<el-table border :data="item.child"> |
|||
<el-table-column label="指标名称" prop="name" /> |
|||
<el-table-column label="说明" prop="content"> |
|||
<template #default="scope"> |
|||
<el-input v-model="scope.row.content" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="指标权重" prop="referencescore"> |
|||
<template #default="scope"> |
|||
<el-input v-model="scope.row.referencescore" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="状态" prop="status"> |
|||
<template #default="scope"> |
|||
<el-select v-model="scope.row.status"> |
|||
<el-option label="使用" :value="1"/> |
|||
<el-option label="禁用" :value="2"/> |
|||
<el-option label="观察" :value="3"/> |
|||
</el-select> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</template> |
|||
</el-card> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button type="primary" @click="submitForm()">确定</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import { create_scheme } from '@/api/opk/zxy/news/api' |
|||
import "quill/dist/quill.snow.css"; |
|||
interface FormInfo { |
|||
id: string; |
|||
age: string; |
|||
name: string; |
|||
sex: string; |
|||
ccc: string; |
|||
ade: string; |
|||
sort: number; |
|||
title: string; |
|||
type: number; |
|||
} |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
addPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
addrowInfo: { |
|||
type: Object as () => FormInfo, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const emit = defineEmits(["update:addPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
value1:"", |
|||
asd:[] as string[], |
|||
lzq:"", |
|||
}) |
|||
const tableData = 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() |
|||
const handle = (data:any)=>{ |
|||
formData.deaprtname = data.id; |
|||
ge_adds() |
|||
} |
|||
//行政组织 |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const add = formData.deaprtname.toString() |
|||
ge_add({id:add}) |
|||
.then(data => { |
|||
tablea.value = data.data; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:addPostBox", false); |
|||
} |
|||
const handleDel = (val:any) => { |
|||
const dictTypeIds = [val.outID || postIds.value].join(","); |
|||
let dictTypeIdAry = dictTypeIds.split(",") |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
handleSure(val) |
|||
console.log(val.id) |
|||
}; |
|||
const handleSure = (val:any)=> { |
|||
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
|||
if(index!=-1){ |
|||
tableData.value.splice(index, 1); |
|||
} |
|||
} |
|||
const submitForm=()=> { |
|||
handleClose() |
|||
const add = formData.deaprtname.toString() |
|||
const edd = tablea._value |
|||
const ess = formData.value1.getFullYear() |
|||
const see = ess.toString() |
|||
if (props.addrowInfo.name) { |
|||
// 修改 |
|||
const id = props.addrowInfo; // 假设你有一个唯一的ID来识别要修改的项 |
|||
emit("editRow", formData); |
|||
} else { |
|||
// 新增 |
|||
create_scheme({orgid:add,year:see,child:edd}) |
|||
.then((response:any) => { |
|||
// 处理新增成功的情况 |
|||
if (response.code === 200) { |
|||
ElMessage.success("新增成功"); |
|||
emit("addRow", formData); |
|||
} else { |
|||
// 处理新增失败的情况 |
|||
ElMessage.error("新增成功"); |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
|
|||
.avatar-uploader .avatar { |
|||
display: block; |
|||
width: 178px; |
|||
height: 178px; |
|||
} |
|||
</style> |
|||
|
|||
<style lang="scss"> |
|||
.avatar-uploader .el-upload { |
|||
position: relative; |
|||
overflow: hidden; |
|||
cursor: pointer; |
|||
border: 1px dashed var(--el-border-color); |
|||
border-radius: 6px; |
|||
transition: var(--el-transition-duration-fast); |
|||
} |
|||
|
|||
.avatar-uploader .el-upload:hover { |
|||
border-color: var(--el-color-primary); |
|||
} |
|||
|
|||
.el-icon.avatar-uploader-icon { |
|||
width: 178px; |
|||
height: 178px; |
|||
font-size: 28px; |
|||
color: #8c939d; |
|||
text-align: center; |
|||
} |
|||
.el-dialog{ |
|||
width:1200px; |
|||
} |
|||
</style> |
|||
|
|||
@ -1,221 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" :title="title" @close="handleClose">{{tablea}} |
|||
<el-form ref="ruleFormRef" :model="formData" label-width="120px" class="demo-ruleForm" style="width:100%"> |
|||
<el-form-item label="行政组织"> |
|||
<el-tree-select ref="orgTreeRef" v-model="formData.deaprtname" show-checkbox clearable node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :render-after-expand="false" @check="ge_adds"/> |
|||
<el-form-item label="年度"> |
|||
<el-date-picker v-model="formData.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-form-item v-loading="isshow" :data="tablea"> |
|||
<el-row> |
|||
<el-col v-for="item in tablea.child" :key="item.id" label="item.name"> |
|||
<el-card v-model="formData.zjr"> |
|||
<template #header> |
|||
<div> |
|||
<span>{{item.name}}</span> |
|||
</div> |
|||
<el-table border :data="item.child"> |
|||
<el-table-column label="指标名称" prop="name" /> |
|||
<el-table-column label="说明" prop="content"> |
|||
<template #default="scope"> |
|||
<el-input v-model="scope.row.content" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="指标权重" prop="referencescore"> |
|||
<template #default="scope"> |
|||
<el-input v-model="scope.row.referencescore" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="状态" prop="status"> |
|||
<template #default="scope"> |
|||
<el-select v-model="scope.row.status"> |
|||
<el-option label="使用" :value="1"/> |
|||
<el-option label="禁用" :value="2"/> |
|||
<el-option label="观察" :value="3"/> |
|||
</el-select> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</template> |
|||
</el-card> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button type="primary" @click="submitForm()">确定</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import { create_scheme } from '@/api/opk/zxy/news/api' |
|||
import "quill/dist/quill.snow.css"; |
|||
interface FormInfo { |
|||
id: string; |
|||
age: string; |
|||
name: string; |
|||
sex: string; |
|||
ccc: string; |
|||
ade: string; |
|||
sort: number; |
|||
title: string; |
|||
type: number; |
|||
} |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
addPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
addrowInfo: { |
|||
type: Object as () => FormInfo, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const emit = defineEmits(["update:addPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
value1:"", |
|||
asd:[] as string[], |
|||
lzq:"", |
|||
}) |
|||
const tableData = 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() |
|||
const handle = (data:any)=>{ |
|||
formData.deaprtname = data.id; |
|||
ge_adds() |
|||
} |
|||
//行政组织 |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const add = formData.deaprtname.toString() |
|||
ge_add({id:add}) |
|||
.then(data => { |
|||
tablea.value = data.data; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:addPostBox", false); |
|||
} |
|||
const handleDel = (val:any) => { |
|||
const dictTypeIds = [val.outID || postIds.value].join(","); |
|||
let dictTypeIdAry = dictTypeIds.split(",") |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
handleSure(val) |
|||
console.log(val.id) |
|||
}; |
|||
const handleSure = (val:any)=> { |
|||
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
|||
if(index!=-1){ |
|||
tableData.value.splice(index, 1); |
|||
} |
|||
} |
|||
const submitForm=()=> { |
|||
handleClose() |
|||
const add = formData.deaprtname.toString() |
|||
const edd = tablea._value |
|||
const ess = formData.value1.getFullYear() |
|||
const see = ess.toString() |
|||
if (props.addrowInfo.name) { |
|||
// 修改 |
|||
const id = props.addrowInfo; // 假设你有一个唯一的ID来识别要修改的项 |
|||
emit("editRow", formData); |
|||
} else { |
|||
// 新增 |
|||
create_scheme({orgid:add,year:see,child:edd}) |
|||
.then((response:any) => { |
|||
// 处理新增成功的情况 |
|||
if (response.code === 200) { |
|||
ElMessage.success("新增成功"); |
|||
emit("addRow", formData); |
|||
} else { |
|||
// 处理新增失败的情况 |
|||
ElMessage.error("新增成功"); |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
|
|||
.avatar-uploader .avatar { |
|||
display: block; |
|||
width: 178px; |
|||
height: 178px; |
|||
} |
|||
</style> |
|||
|
|||
<style lang="scss"> |
|||
.avatar-uploader .el-upload { |
|||
position: relative; |
|||
overflow: hidden; |
|||
cursor: pointer; |
|||
border: 1px dashed var(--el-border-color); |
|||
border-radius: 6px; |
|||
transition: var(--el-transition-duration-fast); |
|||
} |
|||
|
|||
.avatar-uploader .el-upload:hover { |
|||
border-color: var(--el-color-primary); |
|||
} |
|||
|
|||
.el-icon.avatar-uploader-icon { |
|||
width: 178px; |
|||
height: 178px; |
|||
font-size: 28px; |
|||
color: #8c939d; |
|||
text-align: center; |
|||
} |
|||
.el-dialog{ |
|||
width:1200px; |
|||
} |
|||
</style> |
|||
|
|||
@ -1,187 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" :title="title" @close="handleClose">{{tablea}} |
|||
<el-form ref="ruleFormRef" :model="formData" label-width="120px" class="demo-ruleForm" style="width:100%"> |
|||
<el-form-item label="行政组织"> |
|||
<el-tree-select ref="orgTreeRef" v-model="formData.deaprtname" show-checkbox clearable node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :render-after-expand="false" @check="ge_adds"/> |
|||
<el-form-item label="年度"> |
|||
<el-date-picker v-model="formData.value1" type="year"/> |
|||
</el-form-item> |
|||
|
|||
<el-form-item> |
|||
<el-button type="primary" @click="submitForm()">确定</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import { create_scheme } from '@/api/opk/zxy/news/api' |
|||
import "quill/dist/quill.snow.css"; |
|||
interface FormInfo { |
|||
id: string; |
|||
age: string; |
|||
name: string; |
|||
sex: string; |
|||
ccc: string; |
|||
ade: string; |
|||
sort: number; |
|||
title: string; |
|||
type: number; |
|||
} |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
addPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
addrowInfo: { |
|||
type: Object as () => FormInfo, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const emit = defineEmits(["update:addPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
value1:"", |
|||
asd:[] as string[], |
|||
lzq:"", |
|||
}) |
|||
const tableData = 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() |
|||
const handle = (data:any)=>{ |
|||
formData.deaprtname = data.id; |
|||
ge_adds() |
|||
} |
|||
//行政组织 |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const add = formData.deaprtname.toString() |
|||
ge_add({id:add}) |
|||
.then(data => { |
|||
tablea.value = data.data; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:addPostBox", false); |
|||
} |
|||
const handleDel = (val:any) => { |
|||
const dictTypeIds = [val.outID || postIds.value].join(","); |
|||
let dictTypeIdAry = dictTypeIds.split(",") |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
handleSure(val) |
|||
console.log(val.id) |
|||
}; |
|||
const handleSure = (val:any)=> { |
|||
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
|||
if(index!=-1){ |
|||
tableData.value.splice(index, 1); |
|||
} |
|||
} |
|||
const submitForm=()=> { |
|||
handleClose() |
|||
const add = formData.deaprtname.toString() |
|||
const edd = tablea._value |
|||
const ess = formData.value1.getFullYear() |
|||
const see = ess.toString() |
|||
if (props.addrowInfo.name) { |
|||
// 修改 |
|||
const id = props.addrowInfo; // 假设你有一个唯一的ID来识别要修改的项 |
|||
emit("editRow", formData); |
|||
} else { |
|||
// 新增 |
|||
create_scheme({orgid:add,year:see,child:edd}) |
|||
.then((response:any) => { |
|||
// 处理新增成功的情况 |
|||
if (response.code === 200) { |
|||
ElMessage.success("新增成功"); |
|||
emit("addRow", formData); |
|||
} else { |
|||
// 处理新增失败的情况 |
|||
ElMessage.error("新增成功"); |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
|
|||
.avatar-uploader .avatar { |
|||
display: block; |
|||
width: 178px; |
|||
height: 178px; |
|||
} |
|||
</style> |
|||
|
|||
<style lang="scss"> |
|||
.avatar-uploader .el-upload { |
|||
position: relative; |
|||
overflow: hidden; |
|||
cursor: pointer; |
|||
border: 1px dashed var(--el-border-color); |
|||
border-radius: 6px; |
|||
transition: var(--el-transition-duration-fast); |
|||
} |
|||
|
|||
.avatar-uploader .el-upload:hover { |
|||
border-color: var(--el-color-primary); |
|||
} |
|||
|
|||
.el-icon.avatar-uploader-icon { |
|||
width: 178px; |
|||
height: 178px; |
|||
font-size: 28px; |
|||
color: #8c939d; |
|||
text-align: center; |
|||
} |
|||
.el-dialog{ |
|||
width:1200px; |
|||
} |
|||
</style> |
|||
|
|||
@ -1,221 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" :title="title" @close="handleClose">{{tablea}} |
|||
<el-form ref="ruleFormRef" :model="formData" label-width="120px" class="demo-ruleForm" style="width:100%"> |
|||
<el-form-item label="行政组织"> |
|||
<el-tree-select ref="orgTreeRef" v-model="formData.deaprtname" show-checkbox clearable node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :render-after-expand="false" @check="ge_adds"/> |
|||
<el-form-item label="年度"> |
|||
<el-date-picker v-model="formData.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-form-item v-loading="isshow" :data="tablea"> |
|||
<el-row> |
|||
<el-col v-for="item in tablea.child" :key="item.id" label="item.name"> |
|||
<el-card v-model="formData.zjr"> |
|||
<template #header> |
|||
<div> |
|||
<span>{{item.name}}</span> |
|||
</div> |
|||
<el-table border :data="item.child"> |
|||
<el-table-column label="指标名称" prop="name" /> |
|||
<el-table-column label="说明" prop="content"> |
|||
<template #default="scope"> |
|||
<el-input v-model="scope.row.content" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="指标权重" prop="referencescore"> |
|||
<template #default="scope"> |
|||
<el-input v-model="scope.row.referencescore" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="状态" prop="status"> |
|||
<template #default="scope"> |
|||
<el-select v-model="scope.row.status"> |
|||
<el-option label="使用" :value="1"/> |
|||
<el-option label="禁用" :value="2"/> |
|||
<el-option label="观察" :value="3"/> |
|||
</el-select> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</template> |
|||
</el-card> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button type="primary" @click="submitForm()">确定</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import { create_scheme } from '@/api/opk/zxy/news/api' |
|||
import "quill/dist/quill.snow.css"; |
|||
interface FormInfo { |
|||
id: string; |
|||
age: string; |
|||
name: string; |
|||
sex: string; |
|||
ccc: string; |
|||
ade: string; |
|||
sort: number; |
|||
title: string; |
|||
type: number; |
|||
} |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
addPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
addrowInfo: { |
|||
type: Object as () => FormInfo, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const emit = defineEmits(["update:addPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
value1:"", |
|||
asd:[] as string[], |
|||
lzq:"", |
|||
}) |
|||
const tableData = 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() |
|||
const handle = (data:any)=>{ |
|||
formData.deaprtname = data.id; |
|||
ge_adds() |
|||
} |
|||
//行政组织 |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const add = formData.deaprtname.toString() |
|||
ge_add({id:add}) |
|||
.then(data => { |
|||
tablea.value = data.data; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:addPostBox", false); |
|||
} |
|||
const handleDel = (val:any) => { |
|||
const dictTypeIds = [val.outID || postIds.value].join(","); |
|||
let dictTypeIdAry = dictTypeIds.split(",") |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
handleSure(val) |
|||
console.log(val.id) |
|||
}; |
|||
const handleSure = (val:any)=> { |
|||
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
|||
if(index!=-1){ |
|||
tableData.value.splice(index, 1); |
|||
} |
|||
} |
|||
const submitForm=()=> { |
|||
handleClose() |
|||
const add = formData.deaprtname.toString() |
|||
const edd = tablea._value |
|||
const ess = formData.value1.getFullYear() |
|||
const see = ess.toString() |
|||
if (props.addrowInfo.name) { |
|||
// 修改 |
|||
const id = props.addrowInfo; // 假设你有一个唯一的ID来识别要修改的项 |
|||
emit("editRow", formData); |
|||
} else { |
|||
// 新增 |
|||
create_scheme({orgid:add,year:see,child:edd}) |
|||
.then((response:any) => { |
|||
// 处理新增成功的情况 |
|||
if (response.code === 200) { |
|||
ElMessage.success("新增成功"); |
|||
emit("addRow", formData); |
|||
} else { |
|||
// 处理新增失败的情况 |
|||
ElMessage.error("新增成功"); |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
|
|||
.avatar-uploader .avatar { |
|||
display: block; |
|||
width: 178px; |
|||
height: 178px; |
|||
} |
|||
</style> |
|||
|
|||
<style lang="scss"> |
|||
.avatar-uploader .el-upload { |
|||
position: relative; |
|||
overflow: hidden; |
|||
cursor: pointer; |
|||
border: 1px dashed var(--el-border-color); |
|||
border-radius: 6px; |
|||
transition: var(--el-transition-duration-fast); |
|||
} |
|||
|
|||
.avatar-uploader .el-upload:hover { |
|||
border-color: var(--el-color-primary); |
|||
} |
|||
|
|||
.el-icon.avatar-uploader-icon { |
|||
width: 178px; |
|||
height: 178px; |
|||
font-size: 28px; |
|||
color: #8c939d; |
|||
text-align: center; |
|||
} |
|||
.el-dialog{ |
|||
width:1200px; |
|||
} |
|||
</style> |
|||
|
|||
@ -1,221 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" :title="title" @close="handleClose">{} |
|||
<el-form ref="ruleFormRef" :model="formData" label-width="120px" class="demo-ruleForm" style="width:100%"> |
|||
<el-form-item label="行政组织"> |
|||
<el-tree-select ref="orgTreeRef" v-model="formData.deaprtname" show-checkbox clearable node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :render-after-expand="false" @check="ge_adds"/> |
|||
<el-form-item label="年度"> |
|||
<el-date-picker v-model="formData.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-form-item v-loading="isshow" :data="tablea"> |
|||
<el-row> |
|||
<el-col v-for="item in tablea.child" :key="item.id" label="item.name"> |
|||
<el-card v-model="formData.zjr"> |
|||
<template #header> |
|||
<div> |
|||
<span>{{item.name}}</span> |
|||
</div> |
|||
<el-table border :data="item.child"> |
|||
<el-table-column label="指标名称" prop="name" /> |
|||
<el-table-column label="说明" prop="content"> |
|||
<template #default="scope"> |
|||
<el-input v-model="scope.row.content" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="指标权重" prop="referencescore"> |
|||
<template #default="scope"> |
|||
<el-input v-model="scope.row.referencescore" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="状态" prop="status"> |
|||
<template #default="scope"> |
|||
<el-select v-model="scope.row.status"> |
|||
<el-option label="使用" :value="1"/> |
|||
<el-option label="禁用" :value="2"/> |
|||
<el-option label="观察" :value="3"/> |
|||
</el-select> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</template> |
|||
</el-card> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button type="primary" @click="submitForm()">确定</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import { create_scheme } from '@/api/opk/zxy/news/api' |
|||
import "quill/dist/quill.snow.css"; |
|||
interface FormInfo { |
|||
id: string; |
|||
age: string; |
|||
name: string; |
|||
sex: string; |
|||
ccc: string; |
|||
ade: string; |
|||
sort: number; |
|||
title: string; |
|||
type: number; |
|||
} |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
addPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
addrowInfo: { |
|||
type: Object as () => FormInfo, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const emit = defineEmits(["update:addPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
value1:"", |
|||
asd:[] as string[], |
|||
lzq:"", |
|||
}) |
|||
const tableData = 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() |
|||
const handle = (data:any)=>{ |
|||
formData.deaprtname = data.id; |
|||
ge_adds() |
|||
} |
|||
//行政组织 |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const add = formData.deaprtname.toString() |
|||
ge_add({id:add}) |
|||
.then(data => { |
|||
tablea.value = data.data; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:addPostBox", false); |
|||
} |
|||
const handleDel = (val:any) => { |
|||
const dictTypeIds = [val.outID || postIds.value].join(","); |
|||
let dictTypeIdAry = dictTypeIds.split(",") |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
handleSure(val) |
|||
console.log(val.id) |
|||
}; |
|||
const handleSure = (val:any)=> { |
|||
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
|||
if(index!=-1){ |
|||
tableData.value.splice(index, 1); |
|||
} |
|||
} |
|||
const submitForm=()=> { |
|||
handleClose() |
|||
const add = formData.deaprtname.toString() |
|||
const edd = tablea._value |
|||
const ess = formData.value1.getFullYear() |
|||
const see = ess.toString() |
|||
if (props.addrowInfo.name) { |
|||
// 修改 |
|||
const id = props.addrowInfo; // 假设你有一个唯一的ID来识别要修改的项 |
|||
emit("editRow", formData); |
|||
} else { |
|||
// 新增 |
|||
create_scheme({orgid:add,year:see,child:edd}) |
|||
.then((response:any) => { |
|||
// 处理新增成功的情况 |
|||
if (response.code === 200) { |
|||
ElMessage.success("新增成功"); |
|||
emit("addRow", formData); |
|||
} else { |
|||
// 处理新增失败的情况 |
|||
ElMessage.error("新增成功"); |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
|
|||
.avatar-uploader .avatar { |
|||
display: block; |
|||
width: 178px; |
|||
height: 178px; |
|||
} |
|||
</style> |
|||
|
|||
<style lang="scss"> |
|||
.avatar-uploader .el-upload { |
|||
position: relative; |
|||
overflow: hidden; |
|||
cursor: pointer; |
|||
border: 1px dashed var(--el-border-color); |
|||
border-radius: 6px; |
|||
transition: var(--el-transition-duration-fast); |
|||
} |
|||
|
|||
.avatar-uploader .el-upload:hover { |
|||
border-color: var(--el-color-primary); |
|||
} |
|||
|
|||
.el-icon.avatar-uploader-icon { |
|||
width: 178px; |
|||
height: 178px; |
|||
font-size: 28px; |
|||
color: #8c939d; |
|||
text-align: center; |
|||
} |
|||
.el-dialog{ |
|||
width:1200px; |
|||
} |
|||
</style> |
|||
|
|||
@ -1,221 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
|||
<el-form ref="ruleFormRef" :model="formData" label-width="120px" class="demo-ruleForm" style="width:100%"> |
|||
<el-form-item label="行政组织"> |
|||
<el-tree-select ref="orgTreeRef" v-model="formData.deaprtname" show-checkbox clearable node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :render-after-expand="false" @check="ge_adds"/> |
|||
<el-form-item label="年度"> |
|||
<el-date-picker v-model="formData.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-form-item v-loading="isshow" :data="tablea"> |
|||
<el-row> |
|||
<el-col v-for="item in tablea.child" :key="item.id" label="item.name"> |
|||
<el-card v-model="formData.zjr"> |
|||
<template #header> |
|||
<div> |
|||
<span>{{item.name}}</span> |
|||
</div> |
|||
<el-table border :data="item.child"> |
|||
<el-table-column label="指标名称" prop="name" /> |
|||
<el-table-column label="说明" prop="content"> |
|||
<template #default="scope"> |
|||
<el-input v-model="scope.row.content" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="指标权重" prop="referencescore"> |
|||
<template #default="scope"> |
|||
<el-input v-model="scope.row.referencescore" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="状态" prop="status"> |
|||
<template #default="scope"> |
|||
<el-select v-model="scope.row.status"> |
|||
<el-option label="使用" :value="1"/> |
|||
<el-option label="禁用" :value="2"/> |
|||
<el-option label="观察" :value="3"/> |
|||
</el-select> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</template> |
|||
</el-card> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button type="primary" @click="submitForm()">确定</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import { create_scheme } from '@/api/opk/zxy/news/api' |
|||
import "quill/dist/quill.snow.css"; |
|||
interface FormInfo { |
|||
id: string; |
|||
age: string; |
|||
name: string; |
|||
sex: string; |
|||
ccc: string; |
|||
ade: string; |
|||
sort: number; |
|||
title: string; |
|||
type: number; |
|||
} |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
addPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
addrowInfo: { |
|||
type: Object as () => FormInfo, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const emit = defineEmits(["update:addPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
value1:"", |
|||
asd:[] as string[], |
|||
lzq:"", |
|||
}) |
|||
const tableData = 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() |
|||
const handle = (data:any)=>{ |
|||
formData.deaprtname = data.id; |
|||
ge_adds() |
|||
} |
|||
//行政组织 |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const add = formData.deaprtname.toString() |
|||
ge_add({id:add}) |
|||
.then(data => { |
|||
tablea.value = data.data; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:addPostBox", false); |
|||
} |
|||
const handleDel = (val:any) => { |
|||
const dictTypeIds = [val.outID || postIds.value].join(","); |
|||
let dictTypeIdAry = dictTypeIds.split(",") |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
handleSure(val) |
|||
console.log(val.id) |
|||
}; |
|||
const handleSure = (val:any)=> { |
|||
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
|||
if(index!=-1){ |
|||
tableData.value.splice(index, 1); |
|||
} |
|||
} |
|||
const submitForm=()=> { |
|||
handleClose() |
|||
const add = formData.deaprtname.toString() |
|||
const edd = tablea._value |
|||
const ess = formData.value1.getFullYear() |
|||
const see = ess.toString() |
|||
if (props.addrowInfo.name) { |
|||
// 修改 |
|||
const id = props.addrowInfo; // 假设你有一个唯一的ID来识别要修改的项 |
|||
emit("editRow", formData); |
|||
} else { |
|||
// 新增 |
|||
create_scheme({orgid:add,year:see,child:edd}) |
|||
.then((response:any) => { |
|||
// 处理新增成功的情况 |
|||
if (response.code === 200) { |
|||
ElMessage.success("新增成功"); |
|||
emit("addRow", formData); |
|||
} else { |
|||
// 处理新增失败的情况 |
|||
ElMessage.error("新增成功"); |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
|
|||
.avatar-uploader .avatar { |
|||
display: block; |
|||
width: 178px; |
|||
height: 178px; |
|||
} |
|||
</style> |
|||
|
|||
<style lang="scss"> |
|||
.avatar-uploader .el-upload { |
|||
position: relative; |
|||
overflow: hidden; |
|||
cursor: pointer; |
|||
border: 1px dashed var(--el-border-color); |
|||
border-radius: 6px; |
|||
transition: var(--el-transition-duration-fast); |
|||
} |
|||
|
|||
.avatar-uploader .el-upload:hover { |
|||
border-color: var(--el-color-primary); |
|||
} |
|||
|
|||
.el-icon.avatar-uploader-icon { |
|||
width: 178px; |
|||
height: 178px; |
|||
font-size: 28px; |
|||
color: #8c939d; |
|||
text-align: center; |
|||
} |
|||
.el-dialog{ |
|||
width:1200px; |
|||
} |
|||
</style> |
|||
|
|||
@ -1,221 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
|||
<el-form ref="ruleFormRef" :model="formData" label-width="120px" class="demo-ruleForm" style="width:100%"> |
|||
<el-form-item label="行政组织"> |
|||
<el-tree-select ref="orgTreeRef" v-model="formData.deaprtname" show-checkbox clearable node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :render-after-expand="false" @check="ge_adds"/> |
|||
<el-form-item label="年度"> |
|||
<el-date-picker v-model="formData.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-form-item v-loading="isshow" :data="tablea"> |
|||
<el-row> |
|||
<el-col v-for="item in tablea.child" :key="item.id" label="item.name"> |
|||
<el-card v-model="formData.zjr"> |
|||
<template #header> |
|||
<div> |
|||
<span>{{item.name}}</span> |
|||
</div> |
|||
<el-table border :data="item.child"> |
|||
<el-table-column label="指标名称" prop="name" /> |
|||
<el-table-column label="说明" prop="content"> |
|||
<template #default="scope"> |
|||
<el-input v-model="scope.row.content" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="指标权重" prop="referencescore"> |
|||
<template #default="scope"> |
|||
<el-input v-model="scope.row.referencescore" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="状态" prop="status"> |
|||
<template #default="scope"> |
|||
<el-select v-model="scope.row.status"> |
|||
<el-option label="使用" :value="1"/> |
|||
<el-option label="禁用" :value="2"/> |
|||
<el-option label="观察" :value="3"/> |
|||
</el-select> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</template> |
|||
</el-card> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button type="primary" @click="submitForm()">确定</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import { create_scheme } from '@/api/opk/zxy/news/api' |
|||
import "quill/dist/quill.snow.css"; |
|||
interface FormInfo { |
|||
id: string; |
|||
age: string; |
|||
name: string; |
|||
sex: string; |
|||
ccc: string; |
|||
ade: string; |
|||
sort: number; |
|||
title: string; |
|||
type: number; |
|||
} |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
addPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
addrowInfo: { |
|||
type: Object as () => FormInfo, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const emit = defineEmits(["update:addPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
value1:"", |
|||
asd:[] as string[], |
|||
lzq:"", |
|||
}) |
|||
const tableData = 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() |
|||
const handle = (data:any)=>{ |
|||
formData.deaprtname = data.id; |
|||
ge_adds() |
|||
} |
|||
//行政组织 |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const add = formData.deaprtname.toString() |
|||
ge_add({id:add}) |
|||
.then(data => { |
|||
tablea.value = data.data; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:addPostBox", false); |
|||
} |
|||
const handleDel = (val:any) => { |
|||
const dictTypeIds = [val.outID || postIds.value].join(","); |
|||
let dictTypeIdAry = dictTypeIds.split(",") |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
handleSure(val) |
|||
console.log(val.id) |
|||
}; |
|||
const handleSure = (val:any)=> { |
|||
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
|||
if(index!=-1){ |
|||
tableData.value.splice(index, 1); |
|||
} |
|||
} |
|||
const submitForm=()=> { |
|||
handleClose() |
|||
const add = formData.deaprtname.toString() |
|||
const edd = tablea._value |
|||
const ess = formData.value1.getFullYear() |
|||
const see = ess.toString() |
|||
if (props.addrowInfo.name) { |
|||
// 修改 |
|||
const id = props.addrowInfo; // 假设你有一个唯一的ID来识别要修改的项 |
|||
emit("editRow", formData); |
|||
} else { |
|||
// 新增 |
|||
create_scheme({orgid:add,year:see,child:edd}) |
|||
.then((response:any) => { |
|||
// 处理新增成功的情况 |
|||
if (response.code === 200) { |
|||
ElMessage.success("新增成功"); |
|||
emit("addRow", formData); |
|||
} else { |
|||
// 处理新增失败的情况 |
|||
ElMessage.error("新增成功"); |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
|
|||
.avatar-uploader .avatar { |
|||
display: block; |
|||
width: 178px; |
|||
height: 178px; |
|||
} |
|||
</style> |
|||
|
|||
<style lang="scss"> |
|||
.avatar-uploader .el-upload { |
|||
position: relative; |
|||
overflow: hidden; |
|||
cursor: pointer; |
|||
border: 1px dashed var(--el-border-color); |
|||
border-radius: 6px; |
|||
transition: var(--el-transition-duration-fast); |
|||
} |
|||
|
|||
.avatar-uploader .el-upload:hover { |
|||
border-color: var(--el-color-primary); |
|||
} |
|||
|
|||
.el-icon.avatar-uploader-icon { |
|||
width: 178px; |
|||
height: 178px; |
|||
font-size: 28px; |
|||
color: #8c939d; |
|||
text-align: center; |
|||
} |
|||
.el-dialog{ |
|||
width:1200px; |
|||
} |
|||
</style> |
|||
|
|||
@ -1,221 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
|||
<el-form ref="ruleFormRef" :model="formData" label-width="120px" class="demo-ruleForm" style="width:100%"> |
|||
<el-form-item label="行政组织"> |
|||
<el-tree-select ref="orgTreeRef" v-model="formData.deaprtname" show-checkbox clearable node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :render-after-expand="false" @check="ge_adds"/> |
|||
<el-form-item label="年度"> |
|||
<el-date-picker v-model="formData.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-form-item v-loading="isshow" :data="tablea"> |
|||
<el-row> |
|||
<el-col v-for="item in tablea.child" :key="item.id" label="item.name"> |
|||
<el-card v-model="formData.zjr"> |
|||
<template #header> |
|||
<div> |
|||
<span>{{item.name}}</span> |
|||
</div> |
|||
<el-table border :data="item.child"> |
|||
<el-table-column label="指标名称" prop="name" /> |
|||
<el-table-column label="说明" prop="content"> |
|||
<template #default="scope"> |
|||
<el-input v-model="scope.row.content" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="指标权重" prop="referencescore"> |
|||
<template #default="scope"> |
|||
<el-input v-model="scope.row.referencescore" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="状态" prop="status"> |
|||
<template #default="scope"> |
|||
<el-select v-model="scope.row.status"> |
|||
<el-option label="使用" :value="1"/> |
|||
<el-option label="禁用" :value="2"/> |
|||
<el-option label="观察" :value="3"/> |
|||
</el-select> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</template> |
|||
</el-card> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button type="primary" @click="submitForm()">确定</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import { create_scheme } from '@/api/opk/zxy/news/api' |
|||
import "quill/dist/quill.snow.css"; |
|||
interface FormInfo { |
|||
id: string; |
|||
age: string; |
|||
name: string; |
|||
sex: string; |
|||
ccc: string; |
|||
ade: string; |
|||
sort: number; |
|||
title: string; |
|||
type: number; |
|||
} |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
addPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
addrowInfo: { |
|||
type: Object as () => FormInfo, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const emit = defineEmits(["update:addPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
value1:"", |
|||
asd:[] as string[], |
|||
lzq:"", |
|||
}) |
|||
const tableData = 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() |
|||
const handle = (data:any)=>{ |
|||
formData.deaprtname = data.id; |
|||
ge_adds() |
|||
} |
|||
//行政组织 |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const add = formData.deaprtname.toString() |
|||
ge_add({id:add}) |
|||
.then(data => { |
|||
tablea.value = data.data; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:addPostBox", false); |
|||
} |
|||
const handleDel = (val:any) => { |
|||
const dictTypeIds = [val.outID || postIds.value].join(","); |
|||
let dictTypeIdAry = dictTypeIds.split(",") |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
handleSure(val) |
|||
console.log(val.id) |
|||
}; |
|||
const handleSure = (val:any)=> { |
|||
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
|||
if(index!=-1){ |
|||
tableData.value.splice(index, 1); |
|||
} |
|||
} |
|||
const submitForm=()=> { |
|||
handleClose() |
|||
const add = formData.deaprtname.toString() |
|||
const edd = tablea._value |
|||
const ess = formData.value1.getFullYear() |
|||
const see = ess.toString() |
|||
if (props.addrowInfo.name) { |
|||
// 修改 |
|||
const id = props.addrowInfo; // 假设你有一个唯一的ID来识别要修改的项 |
|||
emit("editRow", formData); |
|||
} else { |
|||
// 新增 |
|||
create_scheme({orgid:add,year:see,child:edd}) |
|||
.then((response:any) => { |
|||
// 处理新增成功的情况 |
|||
if (response.code === 200) { |
|||
ElMessage.success("新增成功"); |
|||
emit("addRow", formData); |
|||
} else { |
|||
// 处理新增失败的情况 |
|||
ElMessage.error("新增成功"); |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
|
|||
.avatar-uploader .avatar { |
|||
display: block; |
|||
width: 178px; |
|||
height: 178px; |
|||
} |
|||
</style> |
|||
|
|||
<style lang="scss"> |
|||
.avatar-uploader .el-upload { |
|||
position: relative; |
|||
overflow: hidden; |
|||
cursor: pointer; |
|||
border: 1px dashed var(--el-border-color); |
|||
border-radius: 6px; |
|||
transition: var(--el-transition-duration-fast); |
|||
} |
|||
|
|||
.avatar-uploader .el-upload:hover { |
|||
border-color: var(--el-color-primary); |
|||
} |
|||
|
|||
.el-icon.avatar-uploader-icon { |
|||
width: 178px; |
|||
height: 178px; |
|||
font-size: 28px; |
|||
color: #8c939d; |
|||
text-align: center; |
|||
} |
|||
.el-dialog{ |
|||
width:1200px; |
|||
} |
|||
</style> |
|||
|
|||
@ -1,209 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
|||
<el-form ref="ruleFormRef" :model="formData" label-width="120px" class="demo-ruleForm" style="width:100%"> |
|||
<el-form-item label="行政组织"> |
|||
<el-tree-select ref="orgTreeRef" v-model="formData.deaprtname" show-checkbox clearable node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :render-after-expand="false" @check="ge_adds"/> |
|||
<el-form-item label="年度"> |
|||
<el-date-picker v-model="formData.value1" type="year"/> |
|||
</el-form-item> |
|||
<el-table v-loading="isshow" :data="tablea"> |
|||
<el-table-column prop="id" label="考核维度" width="1000"> |
|||
<template #default="scope"> |
|||
<el-table :data="scope.row.child"> |
|||
<el-table-column prop="name" label="指标名称"/> |
|||
<el-table-column prop="" label="说明"> |
|||
<el-input v-model="formData.value1"/> |
|||
</el-table-column> |
|||
<el-table-column prop="referencescore" label="指标权重"> |
|||
<el-input v-model="scope.row.referencescore"/> |
|||
</el-table-column> |
|||
<el-table-column prop="" label="状态"> |
|||
<el-select v-model="scope.row.lzq"> |
|||
<el-option label="使用" :value="1" /> |
|||
<el-option label="禁用" :value="2" /> |
|||
<el-option label="观察" :value="3" /> |
|||
</el-select> |
|||
</el-table-column> |
|||
</el-table> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button type="primary" @click="submitForm()">确定</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import { create_scheme } from '@/api/opk/zxy/news/api' |
|||
import "quill/dist/quill.snow.css"; |
|||
interface FormInfo { |
|||
id: string; |
|||
age: string; |
|||
name: string; |
|||
sex: string; |
|||
ccc: string; |
|||
ade: string; |
|||
sort: number; |
|||
title: string; |
|||
type: number; |
|||
} |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
addPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
addrowInfo: { |
|||
type: Object as () => FormInfo, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const emit = defineEmits(["update:addPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
value1:"", |
|||
asd:[] as string[], |
|||
lzq:"", |
|||
}) |
|||
const tableData = 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() |
|||
const handle = (data:any)=>{ |
|||
formData.deaprtname = data.id; |
|||
ge_adds() |
|||
} |
|||
//行政组织 |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const add = formData.deaprtname.toString() |
|||
ge_add({id:add}) |
|||
.then(data => { |
|||
tablea.value = data.data; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:addPostBox", false); |
|||
} |
|||
const handleDel = (val:any) => { |
|||
const dictTypeIds = [val.outID || postIds.value].join(","); |
|||
let dictTypeIdAry = dictTypeIds.split(",") |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
handleSure(val) |
|||
console.log(val.id) |
|||
}; |
|||
const handleSure = (val:any)=> { |
|||
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
|||
if(index!=-1){ |
|||
tableData.value.splice(index, 1); |
|||
} |
|||
} |
|||
const submitForm=()=> { |
|||
handleClose() |
|||
const add = formData.deaprtname.toString() |
|||
const edd = tablea._value |
|||
const ess = formData.value1.getFullYear() |
|||
const see = ess.toString() |
|||
if (props.addrowInfo.name) { |
|||
// 修改 |
|||
const id = props.addrowInfo; // 假设你有一个唯一的ID来识别要修改的项 |
|||
emit("editRow", formData); |
|||
} else { |
|||
// 新增 |
|||
create_scheme({orgid:add,year:see,child:edd}) |
|||
.then((response:any) => { |
|||
// 处理新增成功的情况 |
|||
if (response.code === 200) { |
|||
ElMessage.success("新增成功"); |
|||
emit("addRow", formData); |
|||
} else { |
|||
// 处理新增失败的情况 |
|||
ElMessage.error("新增成功"); |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
|
|||
.avatar-uploader .avatar { |
|||
display: block; |
|||
width: 178px; |
|||
height: 178px; |
|||
} |
|||
</style> |
|||
|
|||
<style lang="scss"> |
|||
.avatar-uploader .el-upload { |
|||
position: relative; |
|||
overflow: hidden; |
|||
cursor: pointer; |
|||
border: 1px dashed var(--el-border-color); |
|||
border-radius: 6px; |
|||
transition: var(--el-transition-duration-fast); |
|||
} |
|||
|
|||
.avatar-uploader .el-upload:hover { |
|||
border-color: var(--el-color-primary); |
|||
} |
|||
|
|||
.el-icon.avatar-uploader-icon { |
|||
width: 178px; |
|||
height: 178px; |
|||
font-size: 28px; |
|||
color: #8c939d; |
|||
text-align: center; |
|||
} |
|||
.el-dialog{ |
|||
width:1200px; |
|||
} |
|||
</style> |
|||
|
|||
@ -1,187 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
|||
<el-form ref="ruleFormRef" :model="formData" label-width="120px" class="demo-ruleForm" style="width:100%"> |
|||
<el-form-item label="行政组织"> |
|||
<el-tree-select ref="orgTreeRef" v-model="formData.deaprtname" show-checkbox clearable node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :render-after-expand="false" @check="ge_adds"/> |
|||
<el-form-item label="年度"> |
|||
<el-date-picker v-model="formData.value1" type="year"/> |
|||
</el-form-item> |
|||
|
|||
<el-form-item> |
|||
<el-button type="primary" @click="submitForm()">确定</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import { create_scheme } from '@/api/opk/zxy/news/api' |
|||
import "quill/dist/quill.snow.css"; |
|||
interface FormInfo { |
|||
id: string; |
|||
age: string; |
|||
name: string; |
|||
sex: string; |
|||
ccc: string; |
|||
ade: string; |
|||
sort: number; |
|||
title: string; |
|||
type: number; |
|||
} |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
addPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
addrowInfo: { |
|||
type: Object as () => FormInfo, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const emit = defineEmits(["update:addPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
value1:"", |
|||
asd:[] as string[], |
|||
lzq:"", |
|||
}) |
|||
const tableData = 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() |
|||
const handle = (data:any)=>{ |
|||
formData.deaprtname = data.id; |
|||
ge_adds() |
|||
} |
|||
//行政组织 |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const add = formData.deaprtname.toString() |
|||
ge_add({id:add}) |
|||
.then(data => { |
|||
tablea.value = data.data; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:addPostBox", false); |
|||
} |
|||
const handleDel = (val:any) => { |
|||
const dictTypeIds = [val.outID || postIds.value].join(","); |
|||
let dictTypeIdAry = dictTypeIds.split(",") |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
handleSure(val) |
|||
console.log(val.id) |
|||
}; |
|||
const handleSure = (val:any)=> { |
|||
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
|||
if(index!=-1){ |
|||
tableData.value.splice(index, 1); |
|||
} |
|||
} |
|||
const submitForm=()=> { |
|||
handleClose() |
|||
const add = formData.deaprtname.toString() |
|||
const edd = tablea._value |
|||
const ess = formData.value1.getFullYear() |
|||
const see = ess.toString() |
|||
if (props.addrowInfo.name) { |
|||
// 修改 |
|||
const id = props.addrowInfo; // 假设你有一个唯一的ID来识别要修改的项 |
|||
emit("editRow", formData); |
|||
} else { |
|||
// 新增 |
|||
create_scheme({orgid:add,year:see,child:edd}) |
|||
.then((response:any) => { |
|||
// 处理新增成功的情况 |
|||
if (response.code === 200) { |
|||
ElMessage.success("新增成功"); |
|||
emit("addRow", formData); |
|||
} else { |
|||
// 处理新增失败的情况 |
|||
ElMessage.error("新增成功"); |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
|
|||
.avatar-uploader .avatar { |
|||
display: block; |
|||
width: 178px; |
|||
height: 178px; |
|||
} |
|||
</style> |
|||
|
|||
<style lang="scss"> |
|||
.avatar-uploader .el-upload { |
|||
position: relative; |
|||
overflow: hidden; |
|||
cursor: pointer; |
|||
border: 1px dashed var(--el-border-color); |
|||
border-radius: 6px; |
|||
transition: var(--el-transition-duration-fast); |
|||
} |
|||
|
|||
.avatar-uploader .el-upload:hover { |
|||
border-color: var(--el-color-primary); |
|||
} |
|||
|
|||
.el-icon.avatar-uploader-icon { |
|||
width: 178px; |
|||
height: 178px; |
|||
font-size: 28px; |
|||
color: #8c939d; |
|||
text-align: center; |
|||
} |
|||
.el-dialog{ |
|||
width:1200px; |
|||
} |
|||
</style> |
|||
|
|||
@ -1,187 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
|||
<el-form ref="ruleFormRef" :model="formData" label-width="120px" class="demo-ruleForm" style="width:100%"> |
|||
<el-form-item label="行政组织"> |
|||
<el-tree-select ref="orgTreeRef" v-model="formData.deaprtname" show-checkbox clearable node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :render-after-expand="false" @check="ge_adds"/> |
|||
<el-form-item label="年度"> |
|||
<el-date-picker v-model="formData.value1" type="year"/> |
|||
</el-form-item> |
|||
|
|||
<el-form-item> |
|||
<el-button type="primary" @click="submitForm()">确定</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import { create_scheme } from '@/api/opk/zxy/news/api' |
|||
import "quill/dist/quill.snow.css"; |
|||
interface FormInfo { |
|||
id: string; |
|||
age: string; |
|||
name: string; |
|||
sex: string; |
|||
ccc: string; |
|||
ade: string; |
|||
sort: number; |
|||
title: string; |
|||
type: number; |
|||
} |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
addPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
addrowInfo: { |
|||
type: Object as () => FormInfo, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const emit = defineEmits(["update:addPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
value1:"", |
|||
asd:[] as string[], |
|||
lzq:"", |
|||
}) |
|||
const tableData = 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() |
|||
const handle = (data:any)=>{ |
|||
formData.deaprtname = data.id; |
|||
ge_adds() |
|||
} |
|||
//行政组织 |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const add = formData.deaprtname.toString() |
|||
ge_add({id:add}) |
|||
.then(data => { |
|||
tablea.value = data.data; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:addPostBox", false); |
|||
} |
|||
const handleDel = (val:any) => { |
|||
const dictTypeIds = [val.outID || postIds.value].join(","); |
|||
let dictTypeIdAry = dictTypeIds.split(",") |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
handleSure(val) |
|||
console.log(val.id) |
|||
}; |
|||
const handleSure = (val:any)=> { |
|||
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
|||
if(index!=-1){ |
|||
tableData.value.splice(index, 1); |
|||
} |
|||
} |
|||
const submitForm=()=> { |
|||
handleClose() |
|||
const add = formData.deaprtname.toString() |
|||
const edd = tablea._value |
|||
const ess = formData.value1.getFullYear() |
|||
const see = ess.toString() |
|||
if (props.addrowInfo.name) { |
|||
// 修改 |
|||
const id = props.addrowInfo; // 假设你有一个唯一的ID来识别要修改的项 |
|||
emit("editRow", formData); |
|||
} else { |
|||
// 新增 |
|||
create_scheme({orgid:add,year:see,child:edd}) |
|||
.then((response:any) => { |
|||
// 处理新增成功的情况 |
|||
if (response.code === 200) { |
|||
ElMessage.success("新增成功"); |
|||
emit("addRow", formData); |
|||
} else { |
|||
// 处理新增失败的情况 |
|||
ElMessage.error("新增成功"); |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
|
|||
.avatar-uploader .avatar { |
|||
display: block; |
|||
width: 178px; |
|||
height: 178px; |
|||
} |
|||
</style> |
|||
|
|||
<style lang="scss"> |
|||
.avatar-uploader .el-upload { |
|||
position: relative; |
|||
overflow: hidden; |
|||
cursor: pointer; |
|||
border: 1px dashed var(--el-border-color); |
|||
border-radius: 6px; |
|||
transition: var(--el-transition-duration-fast); |
|||
} |
|||
|
|||
.avatar-uploader .el-upload:hover { |
|||
border-color: var(--el-color-primary); |
|||
} |
|||
|
|||
.el-icon.avatar-uploader-icon { |
|||
width: 178px; |
|||
height: 178px; |
|||
font-size: 28px; |
|||
color: #8c939d; |
|||
text-align: center; |
|||
} |
|||
.el-dialog{ |
|||
width:1200px; |
|||
} |
|||
</style> |
|||
|
|||
@ -1,187 +0,0 @@ |
|||
<!-- |
|||
@ 作者: 鲁智强 |
|||
@ 时间: 2023-08-15 11:34:38 |
|||
@ 备注: |
|||
--> |
|||
<template> |
|||
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
|||
<el-form ref="ruleFormRef" :model="formData" label-width="120px" class="demo-ruleForm" style="width:100%"> |
|||
<el-form-item label="行政组织"> |
|||
<el-tree-select ref="orgTreeRef" v-model="formData.deaprtname" show-checkbox clearable node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :render-after-expand="false" @check="ge_adds"/> |
|||
<el-form-item label="年度"> |
|||
<el-date-picker v-model="formData.value1" type="year"/> |
|||
</el-form-item> |
|||
|
|||
<el-form-item> |
|||
<el-button type="primary" @click="submitForm()">确定</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { reactive } from "vue"; |
|||
import {tarlist,addPostCont,addtarget,getgroupuser,addposttargetcont,search_orgpost} from '@/api/opk/api' |
|||
import {editPostCont} from '@/api/opk/pulic/api' |
|||
import { ge_add } from '@/api/opk/news/api' |
|||
import { create_scheme } from '@/api/opk/zxy/news/api' |
|||
import "quill/dist/quill.snow.css"; |
|||
interface FormInfo { |
|||
id: string; |
|||
age: string; |
|||
name: string; |
|||
sex: string; |
|||
ccc: string; |
|||
ade: string; |
|||
sort: number; |
|||
title: string; |
|||
type: number; |
|||
} |
|||
const isshow = ref(false) |
|||
const props= defineProps( { |
|||
title: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
addPostBox: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
addrowInfo: { |
|||
type: Object as () => FormInfo, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
arrayNum: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
const orgTreeProps ={ |
|||
label: 'name', |
|||
} |
|||
const orgTreeProp = { |
|||
label:'title', |
|||
children:'children' |
|||
} |
|||
const emit = defineEmits(["update:addPostBox","editRow","addRow"]) |
|||
const formData = reactive({ |
|||
deaprtname:"", |
|||
value1:"", |
|||
asd:[] as string[], |
|||
lzq:"", |
|||
}) |
|||
const tableData = 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() |
|||
const handle = (data:any)=>{ |
|||
formData.deaprtname = data.id; |
|||
ge_adds() |
|||
} |
|||
//行政组织 |
|||
const tablea = ref<any>([]) |
|||
function ge_adds(){ |
|||
const add = formData.deaprtname.toString() |
|||
ge_add({id:add}) |
|||
.then(data => { |
|||
tablea.value = data.data; |
|||
}) |
|||
.catch(error => { |
|||
console.error('Error fetching data:', error); |
|||
}).finally(()=>{ |
|||
isshow.value = false |
|||
}) |
|||
} |
|||
ge_adds() |
|||
// 关闭弹窗 |
|||
const handleClose = ()=> { |
|||
emit("update:addPostBox", false); |
|||
} |
|||
const handleDel = (val:any) => { |
|||
const dictTypeIds = [val.outID || postIds.value].join(","); |
|||
let dictTypeIdAry = dictTypeIds.split(",") |
|||
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
|||
confirmButtonText: "确认", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
handleSure(val) |
|||
console.log(val.id) |
|||
}; |
|||
const handleSure = (val:any)=> { |
|||
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
|||
if(index!=-1){ |
|||
tableData.value.splice(index, 1); |
|||
} |
|||
} |
|||
const submitForm=()=> { |
|||
handleClose() |
|||
const add = formData.deaprtname.toString() |
|||
const edd = tablea._value |
|||
const ess = formData.value1.getFullYear() |
|||
const see = ess.toString() |
|||
if (props.addrowInfo.name) { |
|||
// 修改 |
|||
const id = props.addrowInfo; // 假设你有一个唯一的ID来识别要修改的项 |
|||
emit("editRow", formData); |
|||
} else { |
|||
// 新增 |
|||
create_scheme({orgid:add,year:see,child:edd}) |
|||
.then((response:any) => { |
|||
// 处理新增成功的情况 |
|||
if (response.code === 200) { |
|||
ElMessage.success("新增成功"); |
|||
emit("addRow", formData); |
|||
} else { |
|||
// 处理新增失败的情况 |
|||
ElMessage.error("新增成功"); |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
|
|||
.avatar-uploader .avatar { |
|||
display: block; |
|||
width: 178px; |
|||
height: 178px; |
|||
} |
|||
</style> |
|||
|
|||
<style lang="scss"> |
|||
.avatar-uploader .el-upload { |
|||
position: relative; |
|||
overflow: hidden; |
|||
cursor: pointer; |
|||
border: 1px dashed var(--el-border-color); |
|||
border-radius: 6px; |
|||
transition: var(--el-transition-duration-fast); |
|||
} |
|||
|
|||
.avatar-uploader .el-upload:hover { |
|||
border-color: var(--el-color-primary); |
|||
} |
|||
|
|||
.el-icon.avatar-uploader-icon { |
|||
width: 178px; |
|||
height: 178px; |
|||
font-size: 28px; |
|||
color: #8c939d; |
|||
text-align: center; |
|||
} |
|||
.el-dialog{ |
|||
width:1200px; |
|||
} |
|||
</style> |
|||
|
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue