Browse Source

合并鲁智强代码

v5
超级管理员 2 years ago
parent
commit
ae5edc9e24
  1. 119
      .history/package_20231113165156.json
  2. 119
      .history/package_20231113165157.json
  3. 158
      .history/src/api/opk/type_20231108110600.ts
  4. 158
      .history/src/api/opk/type_20231108110652.ts
  5. 159
      .history/src/api/opk/type_20231109114748.ts
  6. 160
      .history/src/api/opk/type_20231109114753.ts
  7. 160
      .history/src/api/opk/type_20231109114757.ts
  8. 160
      .history/src/api/opk/type_20231109114758.ts
  9. 160
      .history/src/api/opk/type_20231109114802.ts
  10. 31
      .history/src/main_20231116082902.ts
  11. 39
      .history/src/main_20231116082906.ts
  12. 265
      .history/src/views/opk/asd/news/bb_20231108094856.vue
  13. 265
      .history/src/views/opk/asd/news/bb_20231108094858.vue
  14. 265
      .history/src/views/opk/asd/news/bb_20231108094902.vue
  15. 265
      .history/src/views/opk/asd/news/bb_20231108094907.vue
  16. 265
      .history/src/views/opk/asd/news/bb_20231108094912.vue
  17. 265
      .history/src/views/opk/asd/news/bb_20231108094923.vue
  18. 265
      .history/src/views/opk/asd/news/bb_20231108094924.vue
  19. 265
      .history/src/views/opk/asd/news/bb_20231108094929.vue
  20. 265
      .history/src/views/opk/asd/news/bb_20231108095106.vue
  21. 265
      .history/src/views/opk/asd/news/bb_20231108095136.vue
  22. 265
      .history/src/views/opk/asd/news/bb_20231108095141.vue
  23. 265
      .history/src/views/opk/asd/news/bb_20231108095201.vue
  24. 265
      .history/src/views/opk/asd/news/bb_20231108095206.vue
  25. 265
      .history/src/views/opk/asd/news/bb_20231108095209.vue
  26. 265
      .history/src/views/opk/asd/news/bb_20231108095326.vue
  27. 265
      .history/src/views/opk/asd/news/bb_20231108095329.vue
  28. 265
      .history/src/views/opk/asd/news/bb_20231108095330.vue
  29. 265
      .history/src/views/opk/asd/news/bb_20231108095331.vue
  30. 265
      .history/src/views/opk/asd/news/bb_20231108095333.vue
  31. 265
      .history/src/views/opk/asd/news/bb_20231108095351.vue
  32. 265
      .history/src/views/opk/asd/news/bb_20231108095353.vue
  33. 265
      .history/src/views/opk/asd/news/bb_20231108095358.vue
  34. 265
      .history/src/views/opk/asd/news/bb_20231108095415.vue
  35. 265
      .history/src/views/opk/asd/news/bb_20231108095416.vue
  36. 265
      .history/src/views/opk/asd/news/bb_20231108095423.vue
  37. 265
      .history/src/views/opk/asd/news/bb_20231108095440.vue
  38. 265
      .history/src/views/opk/asd/news/bb_20231108095441.vue
  39. 265
      .history/src/views/opk/asd/news/bb_20231108095447.vue
  40. 265
      .history/src/views/opk/asd/news/bb_20231108160410.vue
  41. 265
      .history/src/views/opk/asd/news/bb_20231108160411.vue
  42. 265
      .history/src/views/opk/asd/news/bb_20231108160414.vue
  43. 265
      .history/src/views/opk/asd/news/bb_20231108160503.vue
  44. 265
      .history/src/views/opk/asd/news/bb_20231108160511.vue
  45. 265
      .history/src/views/opk/asd/news/bb_20231108160520.vue
  46. 265
      .history/src/views/opk/asd/news/bb_20231108160609.vue
  47. 265
      .history/src/views/opk/asd/news/bb_20231108160611.vue
  48. 265
      .history/src/views/opk/asd/news/bb_20231108160616.vue
  49. 265
      .history/src/views/opk/asd/news/bb_20231108160634.vue
  50. 265
      .history/src/views/opk/asd/news/bb_20231108160649.vue
  51. 265
      .history/src/views/opk/asd/news/bb_20231108160654.vue
  52. 265
      .history/src/views/opk/asd/news/bb_20231108160705.vue
  53. 265
      .history/src/views/opk/asd/news/bb_20231108160711.vue
  54. 265
      .history/src/views/opk/asd/news/bb_20231108160735.vue
  55. 265
      .history/src/views/opk/asd/news/bb_20231108160812.vue
  56. 265
      .history/src/views/opk/asd/news/bb_20231108160820.vue
  57. 265
      .history/src/views/opk/asd/news/bb_20231108160831.vue
  58. 265
      .history/src/views/opk/asd/news/bb_20231108160837.vue
  59. 265
      .history/src/views/opk/asd/news/bb_20231108160839.vue
  60. 265
      .history/src/views/opk/asd/news/bb_20231108160856.vue
  61. 265
      .history/src/views/opk/asd/news/bb_20231108160905.vue
  62. 265
      .history/src/views/opk/asd/news/bb_20231108160917.vue
  63. 265
      .history/src/views/opk/asd/news/bb_20231108160925.vue
  64. 265
      .history/src/views/opk/asd/news/bb_20231108160933.vue
  65. 265
      .history/src/views/opk/asd/news/bb_20231109110154.vue
  66. 265
      .history/src/views/opk/asd/news/bb_20231109110200.vue
  67. 265
      .history/src/views/opk/asd/news/bb_20231109110208.vue
  68. 265
      .history/src/views/opk/asd/news/bb_20231109110229.vue
  69. 265
      .history/src/views/opk/asd/news/bb_20231109110233.vue
  70. 268
      .history/src/views/opk/asd/news/bb_20231109110241.vue
  71. 268
      .history/src/views/opk/asd/news/bb_20231109110252.vue
  72. 268
      .history/src/views/opk/asd/news/bb_20231109110257.vue
  73. 268
      .history/src/views/opk/asd/news/bb_20231109110302.vue
  74. 268
      .history/src/views/opk/asd/news/bb_20231109110310.vue
  75. 268
      .history/src/views/opk/asd/news/bb_20231109110324.vue
  76. 268
      .history/src/views/opk/asd/news/bb_20231110135213.vue
  77. 268
      .history/src/views/opk/asd/news/bb_20231110135241.vue
  78. 268
      .history/src/views/opk/asd/news/bb_20231110135352.vue
  79. 268
      .history/src/views/opk/asd/news/bb_20231110135358.vue
  80. 269
      .history/src/views/opk/asd/news/bb_20231110135412.vue
  81. 270
      .history/src/views/opk/asd/news/bb_20231110135421.vue
  82. 270
      .history/src/views/opk/asd/news/bb_20231110135425.vue
  83. 270
      .history/src/views/opk/asd/news/bb_20231110135426.vue
  84. 271
      .history/src/views/opk/asd/news/bb_20231110135446.vue
  85. 271
      .history/src/views/opk/asd/news/bb_20231110135449.vue
  86. 272
      .history/src/views/opk/asd/news/bb_20231110135500.vue
  87. 273
      .history/src/views/opk/asd/news/bb_20231110135518.vue
  88. 273
      .history/src/views/opk/asd/news/bb_20231110135522.vue
  89. 273
      .history/src/views/opk/asd/news/bb_20231115141944.vue
  90. 273
      .history/src/views/opk/asd/news/bb_20231115141947.vue
  91. 129
      .history/src/views/opk/asd/news/cc_20231108095543.vue
  92. 129
      .history/src/views/opk/asd/news/cc_20231108095550.vue
  93. 129
      .history/src/views/opk/asd/news/cc_20231108095551.vue
  94. 129
      .history/src/views/opk/asd/news/cc_20231108095553.vue
  95. 218
      .history/src/views/opk/asd/news/cc_20231108095602.vue
  96. 218
      .history/src/views/opk/asd/news/cc_20231108095607.vue
  97. 218
      .history/src/views/opk/asd/news/cc_20231108095610.vue
  98. 218
      .history/src/views/opk/asd/news/cc_20231108095620.vue
  99. 218
      .history/src/views/opk/asd/news/cc_20231108095621.vue
  100. 218
      .history/src/views/opk/asd/news/cc_20231108095626.vue

119
.history/package_20231113165156.json

@ -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"
}

119
.history/package_20231113165157.json

@ -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"
}

158
.history/src/api/opk/type_20231108110600.ts

@ -0,0 +1,158 @@
export interface postinfp{
id?:number,
number?: string,
name?:string,
superior?:number,
organizationtype?: number,
abbreviation?: string,
time?: number,
state?: number,
wechatorganizationid?: number,
superiorsun?: string,
schoole?: number,
kingdeeid?: string,
ispower?: number,
sort?: number,
classname?: string,
level?: number,
isman?: number,
status?: boolean,
child?: null,
type?:number;
}
export interface tarData{
page?:number;
pageSize?:number;
name?:string;
dimension?:string;
attribute?:string;
orgidlist?:Array<any>;
}
export interface addlist{
name?:string;
share?:number;
acceptdepartmentid?:Array<any>;
userlist?:Array<any>;
dimension?:string;
nature?:number;
unit?:string;
cycle?:number;
cycleattr?:Number;
scoringmethod?:number;
visiblerangegroup?:Array<any>;
visiblerangedepart?:Array<any>;
}
export interface deltarget{
id?:String;
state?:number;
istrue?:number;
}
export interface getgroupData{
id?:number;
all:number;
}
export interface edittarget{
acceptdepartmentid?:Array<any>
cycle?:Number;
cycleattr:number;
dimension:string;
id:string;
name:string;
nature:number;
scoringmethod:Number;
unit:string;
userlist:Array<any>
}
export interface position{
page?:number;
pagesize?:number;
organization?:string;
}
export interface getgroup{
id?:number;
level?:number;
}
export interface organd{
all?:number;
id?:string;
levelL:number;
}
export interface postsss{
attribute?:string;
dimension?:string;
page?:number;
pageSize?:number;
title?:string;
postidlist?:Array<any>;
}
export interface addposttar{
title?:string;
dimension?: String;
unit?:String;
type?: number;
scoringmethod?: number;
cycle?:number;
cycleattr?: number;
departmentPostOther?:Array<any>
otherposttarget?:Array<any>;
}
export interface searchorgpos{
name?:string;
id?:string;
}
export interface setposttarget{
id?:string;
state?:number;
istrue?:number;
}
export interface table_base_post_target{
id?:string;
}
export interface getdetails{
targetid: string;
inspect: Array<any>;
postlist: Array<any>;
cycle:Number;
}
export interface neweditposttarget{
title?:string;
dimension?: String;
unit?:String;
type?: number;
scoringmethod?: Number;
cycle?:Number;
cycleattr?: Number;
otherposttarget?:Array<any>;
id:string;
}
export interface get_organdpost_ary{
id: string;
}
export interface look_work_flowcont{
id:string;
}
export interface quantechart{
AccMethod?:Array<any>;
targetid?:Array<any>;
year?:Array<any>;
analysisangle?:number;
org?:Array<any>;
timeattribute?:Array<any>
}
export interface gettarget{
page:number;
pagesize:number;
}
export interface getquantechartorgandyear{
targetid:Array<any>;
}
export interface summaryplanrecord{
department:string;
month:Number;
targetid:string;
year:Number;
}
export interface get_post_target{
id:string;
}

158
.history/src/api/opk/type_20231108110652.ts

@ -0,0 +1,158 @@
export interface postinfp{
id?:number,
number?: string,
name?:string,
superior?:number,
organizationtype?: number,
abbreviation?: string,
time?: number,
state?: number,
wechatorganizationid?: number,
superiorsun?: string,
schoole?: number,
kingdeeid?: string,
ispower?: number,
sort?: number,
classname?: string,
level?: number,
isman?: number,
status?: boolean,
child?: null,
type?:number;
}
export interface tarData{
page?:number;
pageSize?:number;
name?:string;
dimension?:string;
attribute?:string;
orgidlist?:Array<any>;
}
export interface addlist{
name?:string;
share?:number;
acceptdepartmentid?:Array<any>;
userlist?:Array<any>;
dimension?:string;
nature?:number;
unit?:string;
cycle?:number;
cycleattr?:Number;
scoringmethod?:number;
visiblerangegroup?:Array<any>;
visiblerangedepart?:Array<any>;
}
export interface deltarget{
id?:String;
state?:number;
istrue?:number;
}
export interface getgroupData{
id?:number;
all:number;
}
export interface edittarget{
acceptdepartmentid?:Array<any>
cycle?:Number;
cycleattr:number;
dimension:string;
id:string;
name:string;
nature:number;
scoringmethod:Number;
unit:string;
userlist:Array<any>
}
export interface position{
page?:number;
pagesize?:number;
organization?:string;
}
export interface getgroup{
id?:number;
level?:number;
}
export interface organd{
all?:number;
id?:string;
levelL:number;
}
export interface postsss{
attribute?:string;
dimension?:string;
page?:number;
pageSize?:number;
title?:string;
postidlist?:Array<any>;
}
export interface addposttar{
title?:string;
dimension?: String;
unit?:String;
type?: number;
scoringmethod?: number;
cycle?:number;
cycleattr?: number;
departmentPostOther?:Array<any>
otherposttarget?:Array<any>;
}
export interface searchorgpos{
name?:string;
orgid?:string;
}
export interface setposttarget{
id?:string;
state?:number;
istrue?:number;
}
export interface table_base_post_target{
id?:string;
}
export interface getdetails{
targetid: string;
inspect: Array<any>;
postlist: Array<any>;
cycle:Number;
}
export interface neweditposttarget{
title?:string;
dimension?: String;
unit?:String;
type?: number;
scoringmethod?: Number;
cycle?:Number;
cycleattr?: Number;
otherposttarget?:Array<any>;
id:string;
}
export interface get_organdpost_ary{
id: string;
}
export interface look_work_flowcont{
id:string;
}
export interface quantechart{
AccMethod?:Array<any>;
targetid?:Array<any>;
year?:Array<any>;
analysisangle?:number;
org?:Array<any>;
timeattribute?:Array<any>
}
export interface gettarget{
page:number;
pagesize:number;
}
export interface getquantechartorgandyear{
targetid:Array<any>;
}
export interface summaryplanrecord{
department:string;
month:Number;
targetid:string;
year:Number;
}
export interface get_post_target{
id:string;
}

159
.history/src/api/opk/type_20231109114748.ts

@ -0,0 +1,159 @@
export interface postinfp{
id?:number,
number?: string,
name?:string,
superior?:number,
organizationtype?: number,
abbreviation?: string,
time?: number,
state?: number,
wechatorganizationid?: number,
superiorsun?: string,
schoole?: number,
kingdeeid?: string,
ispower?: number,
sort?: number,
classname?: string,
level?: number,
isman?: number,
status?: boolean,
child?: null,
type?:number;
}
export interface tarData{
page?:number;
pageSize?:number;
name?:string;
dimension?:string;
attribute?:string;
orgidlist?:Array<any>;
}
export interface addlist{
name?:string;
share?:number;
acceptdepartmentid?:Array<any>;
userlist?:Array<any>;
dimension?:string;
nature?:number;
unit?:string;
cycle?:number;
cycleattr?:Number;
scoringmethod?:number;
visiblerangegroup?:Array<any>;
visiblerangedepart?:Array<any>;
}
export interface deltarget{
id?:String;
state?:number;
istrue?:number;
}
export interface getgroupData{
id?:number;
all:number;
}
export interface edittarget{
acceptdepartmentid?:Array<any>
cycle?:Number;
cycleattr:number;
dimension:string;
id:string;
name:string;
nature:number;
scoringmethod:Number;
unit:string;
userlist:Array<any>
}
export interface position{
page?:number;
pagesize?:number;
organization?:string;
}
export interface getgroup{
id?:number;
level?:number;
}
export interface organd{
all?:number;
id?:string;
levelL:number;
}
export interface postsss{
attribute?:string;
dimension?:string;
page?:number;
pageSize?:number;
title?:string;
postidlist?:Array<any>;
}
export interface addposttar{
title?:string;
dimension?: String;
unit?:String;
type?: number;
scoringmethod?: number;
cycle?:number;
cycleattr?: number;
departmentPostOther?:Array<any>
otherposttarget?:Array<any>;
}
export interface searchorgpos{
name?:string;
orgid?:string;
}
export interface setposttarget{
id?:string;
state?:number;
istrue?:number;
}
export interface table_base_post_target{
id?:string;
}
export interface getdetails{
targetid: string;
inspect: Array<any>;
postlist: Array<any>;
cycle:Number;
}
export interface neweditposttarget{
title?:string;
dimension?: String;
unit?:String;
type?: number;
scoringmethod?: Number;
cycle?:Number;
cycleattr?: Number;
otherposttarget?:Array<any>;
id:string;
visiblegroup:"",visiblerange:""
}
export interface get_organdpost_ary{
id: string;
}
export interface look_work_flowcont{
id:string;
}
export interface quantechart{
AccMethod?:Array<any>;
targetid?:Array<any>;
year?:Array<any>;
analysisangle?:number;
org?:Array<any>;
timeattribute?:Array<any>
}
export interface gettarget{
page:number;
pagesize:number;
}
export interface getquantechartorgandyear{
targetid:Array<any>;
}
export interface summaryplanrecord{
department:string;
month:Number;
targetid:string;
year:Number;
}
export interface get_post_target{
id:string;
}

160
.history/src/api/opk/type_20231109114753.ts

@ -0,0 +1,160 @@
export interface postinfp{
id?:number,
number?: string,
name?:string,
superior?:number,
organizationtype?: number,
abbreviation?: string,
time?: number,
state?: number,
wechatorganizationid?: number,
superiorsun?: string,
schoole?: number,
kingdeeid?: string,
ispower?: number,
sort?: number,
classname?: string,
level?: number,
isman?: number,
status?: boolean,
child?: null,
type?:number;
}
export interface tarData{
page?:number;
pageSize?:number;
name?:string;
dimension?:string;
attribute?:string;
orgidlist?:Array<any>;
}
export interface addlist{
name?:string;
share?:number;
acceptdepartmentid?:Array<any>;
userlist?:Array<any>;
dimension?:string;
nature?:number;
unit?:string;
cycle?:number;
cycleattr?:Number;
scoringmethod?:number;
visiblerangegroup?:Array<any>;
visiblerangedepart?:Array<any>;
}
export interface deltarget{
id?:String;
state?:number;
istrue?:number;
}
export interface getgroupData{
id?:number;
all:number;
}
export interface edittarget{
acceptdepartmentid?:Array<any>
cycle?:Number;
cycleattr:number;
dimension:string;
id:string;
name:string;
nature:number;
scoringmethod:Number;
unit:string;
userlist:Array<any>
}
export interface position{
page?:number;
pagesize?:number;
organization?:string;
}
export interface getgroup{
id?:number;
level?:number;
}
export interface organd{
all?:number;
id?:string;
levelL:number;
}
export interface postsss{
attribute?:string;
dimension?:string;
page?:number;
pageSize?:number;
title?:string;
postidlist?:Array<any>;
}
export interface addposttar{
title?:string;
dimension?: String;
unit?:String;
type?: number;
scoringmethod?: number;
cycle?:number;
cycleattr?: number;
departmentPostOther?:Array<any>
otherposttarget?:Array<any>;
}
export interface searchorgpos{
name?:string;
orgid?:string;
}
export interface setposttarget{
id?:string;
state?:number;
istrue?:number;
}
export interface table_base_post_target{
id?:string;
}
export interface getdetails{
targetid: string;
inspect: Array<any>;
postlist: Array<any>;
cycle:Number;
}
export interface neweditposttarget{
title?:string;
dimension?: String;
unit?:String;
type?: number;
scoringmethod?: Number;
cycle?:Number;
cycleattr?: Number;
otherposttarget?:Array<any>;
id:string;
visiblegroup:"";
visiblerange:""
}
export interface get_organdpost_ary{
id: string;
}
export interface look_work_flowcont{
id:string;
}
export interface quantechart{
AccMethod?:Array<any>;
targetid?:Array<any>;
year?:Array<any>;
analysisangle?:number;
org?:Array<any>;
timeattribute?:Array<any>
}
export interface gettarget{
page:number;
pagesize:number;
}
export interface getquantechartorgandyear{
targetid:Array<any>;
}
export interface summaryplanrecord{
department:string;
month:Number;
targetid:string;
year:Number;
}
export interface get_post_target{
id:string;
}

160
.history/src/api/opk/type_20231109114757.ts

@ -0,0 +1,160 @@
export interface postinfp{
id?:number,
number?: string,
name?:string,
superior?:number,
organizationtype?: number,
abbreviation?: string,
time?: number,
state?: number,
wechatorganizationid?: number,
superiorsun?: string,
schoole?: number,
kingdeeid?: string,
ispower?: number,
sort?: number,
classname?: string,
level?: number,
isman?: number,
status?: boolean,
child?: null,
type?:number;
}
export interface tarData{
page?:number;
pageSize?:number;
name?:string;
dimension?:string;
attribute?:string;
orgidlist?:Array<any>;
}
export interface addlist{
name?:string;
share?:number;
acceptdepartmentid?:Array<any>;
userlist?:Array<any>;
dimension?:string;
nature?:number;
unit?:string;
cycle?:number;
cycleattr?:Number;
scoringmethod?:number;
visiblerangegroup?:Array<any>;
visiblerangedepart?:Array<any>;
}
export interface deltarget{
id?:String;
state?:number;
istrue?:number;
}
export interface getgroupData{
id?:number;
all:number;
}
export interface edittarget{
acceptdepartmentid?:Array<any>
cycle?:Number;
cycleattr:number;
dimension:string;
id:string;
name:string;
nature:number;
scoringmethod:Number;
unit:string;
userlist:Array<any>
}
export interface position{
page?:number;
pagesize?:number;
organization?:string;
}
export interface getgroup{
id?:number;
level?:number;
}
export interface organd{
all?:number;
id?:string;
levelL:number;
}
export interface postsss{
attribute?:string;
dimension?:string;
page?:number;
pageSize?:number;
title?:string;
postidlist?:Array<any>;
}
export interface addposttar{
title?:string;
dimension?: String;
unit?:String;
type?: number;
scoringmethod?: number;
cycle?:number;
cycleattr?: number;
departmentPostOther?:Array<any>
otherposttarget?:Array<any>;
}
export interface searchorgpos{
name?:string;
orgid?:string;
}
export interface setposttarget{
id?:string;
state?:number;
istrue?:number;
}
export interface table_base_post_target{
id?:string;
}
export interface getdetails{
targetid: string;
inspect: Array<any>;
postlist: Array<any>;
cycle:Number;
}
export interface neweditposttarget{
title?:string;
dimension?: String;
unit?:String;
type?: number;
scoringmethod?: Number;
cycle?:Number;
cycleattr?: Number;
otherposttarget?:Array<any>;
id:string;
visiblegroup:"";
visiblerange:st
}
export interface get_organdpost_ary{
id: string;
}
export interface look_work_flowcont{
id:string;
}
export interface quantechart{
AccMethod?:Array<any>;
targetid?:Array<any>;
year?:Array<any>;
analysisangle?:number;
org?:Array<any>;
timeattribute?:Array<any>
}
export interface gettarget{
page:number;
pagesize:number;
}
export interface getquantechartorgandyear{
targetid:Array<any>;
}
export interface summaryplanrecord{
department:string;
month:Number;
targetid:string;
year:Number;
}
export interface get_post_target{
id:string;
}

160
.history/src/api/opk/type_20231109114758.ts

@ -0,0 +1,160 @@
export interface postinfp{
id?:number,
number?: string,
name?:string,
superior?:number,
organizationtype?: number,
abbreviation?: string,
time?: number,
state?: number,
wechatorganizationid?: number,
superiorsun?: string,
schoole?: number,
kingdeeid?: string,
ispower?: number,
sort?: number,
classname?: string,
level?: number,
isman?: number,
status?: boolean,
child?: null,
type?:number;
}
export interface tarData{
page?:number;
pageSize?:number;
name?:string;
dimension?:string;
attribute?:string;
orgidlist?:Array<any>;
}
export interface addlist{
name?:string;
share?:number;
acceptdepartmentid?:Array<any>;
userlist?:Array<any>;
dimension?:string;
nature?:number;
unit?:string;
cycle?:number;
cycleattr?:Number;
scoringmethod?:number;
visiblerangegroup?:Array<any>;
visiblerangedepart?:Array<any>;
}
export interface deltarget{
id?:String;
state?:number;
istrue?:number;
}
export interface getgroupData{
id?:number;
all:number;
}
export interface edittarget{
acceptdepartmentid?:Array<any>
cycle?:Number;
cycleattr:number;
dimension:string;
id:string;
name:string;
nature:number;
scoringmethod:Number;
unit:string;
userlist:Array<any>
}
export interface position{
page?:number;
pagesize?:number;
organization?:string;
}
export interface getgroup{
id?:number;
level?:number;
}
export interface organd{
all?:number;
id?:string;
levelL:number;
}
export interface postsss{
attribute?:string;
dimension?:string;
page?:number;
pageSize?:number;
title?:string;
postidlist?:Array<any>;
}
export interface addposttar{
title?:string;
dimension?: String;
unit?:String;
type?: number;
scoringmethod?: number;
cycle?:number;
cycleattr?: number;
departmentPostOther?:Array<any>
otherposttarget?:Array<any>;
}
export interface searchorgpos{
name?:string;
orgid?:string;
}
export interface setposttarget{
id?:string;
state?:number;
istrue?:number;
}
export interface table_base_post_target{
id?:string;
}
export interface getdetails{
targetid: string;
inspect: Array<any>;
postlist: Array<any>;
cycle:Number;
}
export interface neweditposttarget{
title?:string;
dimension?: String;
unit?:String;
type?: number;
scoringmethod?: Number;
cycle?:Number;
cycleattr?: Number;
otherposttarget?:Array<any>;
id:string;
visiblegroup:"";
visiblerange:string
}
export interface get_organdpost_ary{
id: string;
}
export interface look_work_flowcont{
id:string;
}
export interface quantechart{
AccMethod?:Array<any>;
targetid?:Array<any>;
year?:Array<any>;
analysisangle?:number;
org?:Array<any>;
timeattribute?:Array<any>
}
export interface gettarget{
page:number;
pagesize:number;
}
export interface getquantechartorgandyear{
targetid:Array<any>;
}
export interface summaryplanrecord{
department:string;
month:Number;
targetid:string;
year:Number;
}
export interface get_post_target{
id:string;
}

160
.history/src/api/opk/type_20231109114802.ts

@ -0,0 +1,160 @@
export interface postinfp{
id?:number,
number?: string,
name?:string,
superior?:number,
organizationtype?: number,
abbreviation?: string,
time?: number,
state?: number,
wechatorganizationid?: number,
superiorsun?: string,
schoole?: number,
kingdeeid?: string,
ispower?: number,
sort?: number,
classname?: string,
level?: number,
isman?: number,
status?: boolean,
child?: null,
type?:number;
}
export interface tarData{
page?:number;
pageSize?:number;
name?:string;
dimension?:string;
attribute?:string;
orgidlist?:Array<any>;
}
export interface addlist{
name?:string;
share?:number;
acceptdepartmentid?:Array<any>;
userlist?:Array<any>;
dimension?:string;
nature?:number;
unit?:string;
cycle?:number;
cycleattr?:Number;
scoringmethod?:number;
visiblerangegroup?:Array<any>;
visiblerangedepart?:Array<any>;
}
export interface deltarget{
id?:String;
state?:number;
istrue?:number;
}
export interface getgroupData{
id?:number;
all:number;
}
export interface edittarget{
acceptdepartmentid?:Array<any>
cycle?:Number;
cycleattr:number;
dimension:string;
id:string;
name:string;
nature:number;
scoringmethod:Number;
unit:string;
userlist:Array<any>
}
export interface position{
page?:number;
pagesize?:number;
organization?:string;
}
export interface getgroup{
id?:number;
level?:number;
}
export interface organd{
all?:number;
id?:string;
levelL:number;
}
export interface postsss{
attribute?:string;
dimension?:string;
page?:number;
pageSize?:number;
title?:string;
postidlist?:Array<any>;
}
export interface addposttar{
title?:string;
dimension?: String;
unit?:String;
type?: number;
scoringmethod?: number;
cycle?:number;
cycleattr?: number;
departmentPostOther?:Array<any>
otherposttarget?:Array<any>;
}
export interface searchorgpos{
name?:string;
orgid?:string;
}
export interface setposttarget{
id?:string;
state?:number;
istrue?:number;
}
export interface table_base_post_target{
id?:string;
}
export interface getdetails{
targetid: string;
inspect: Array<any>;
postlist: Array<any>;
cycle:Number;
}
export interface neweditposttarget{
title?:string;
dimension?: String;
unit?:String;
type?: number;
scoringmethod?: Number;
cycle?:Number;
cycleattr?: Number;
otherposttarget?:Array<any>;
id:string;
visiblegroup:string;
visiblerange:string
}
export interface get_organdpost_ary{
id: string;
}
export interface look_work_flowcont{
id:string;
}
export interface quantechart{
AccMethod?:Array<any>;
targetid?:Array<any>;
year?:Array<any>;
analysisangle?:number;
org?:Array<any>;
timeattribute?:Array<any>
}
export interface gettarget{
page:number;
pagesize:number;
}
export interface getquantechartorgandyear{
targetid:Array<any>;
}
export interface summaryplanrecord{
department:string;
month:Number;
targetid:string;
year:Number;
}
export interface get_post_target{
id:string;
}

31
.history/src/main_20231116082902.ts

@ -0,0 +1,31 @@
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';
const app = createApp(App);
// 全局注册 自定义指令(directive)
setupDirective(app);
// 全局注册 状态管理(store)
setupStore(app);
app.use(router).use(i18n).use(ElementPlus, {
locale: zhCn
}).use(AKDesign).mount('#app');

39
.history/src/main_20231116082906.ts

@ -0,0 +1,39 @@
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';
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');

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

268
.history/src/views/opk/asd/news/bb_20231109110241.vue

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

268
.history/src/views/opk/asd/news/bb_20231109110252.vue

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

268
.history/src/views/opk/asd/news/bb_20231109110257.vue

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

268
.history/src/views/opk/asd/news/bb_20231109110302.vue

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

268
.history/src/views/opk/asd/news/bb_20231109110310.vue

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

268
.history/src/views/opk/asd/news/bb_20231109110324.vue

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

268
.history/src/views/opk/asd/news/bb_20231110135213.vue

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

268
.history/src/views/opk/asd/news/bb_20231110135241.vue

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

268
.history/src/views/opk/asd/news/bb_20231110135352.vue

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

268
.history/src/views/opk/asd/news/bb_20231110135358.vue

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

269
.history/src/views/opk/asd/news/bb_20231110135412.vue

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

270
.history/src/views/opk/asd/news/bb_20231110135421.vue

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

270
.history/src/views/opk/asd/news/bb_20231110135425.vue

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

270
.history/src/views/opk/asd/news/bb_20231110135426.vue

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

271
.history/src/views/opk/asd/news/bb_20231110135446.vue

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

271
.history/src/views/opk/asd/news/bb_20231110135449.vue

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

272
.history/src/views/opk/asd/news/bb_20231110135500.vue

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

273
.history/src/views/opk/asd/news/bb_20231110135518.vue

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

273
.history/src/views/opk/asd/news/bb_20231110135522.vue

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

273
.history/src/views/opk/asd/news/bb_20231115141944.vue

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

273
.history/src/views/opk/asd/news/bb_20231115141947.vue

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

129
.history/src/views/opk/yui/new/bb_20231018105849.vue → .history/src/views/opk/asd/news/cc_20231108095543.vue

@ -5,13 +5,12 @@
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Dialog from './dialog.vue'
import ED from './eddialog.vue'
import Daid from './daialog.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,have_post,get_scheme } from '@/api/opk/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
@ -22,7 +21,6 @@ const data = reactive({
addPostBox: false,
editPostCont:false,
edPostCont:false,
addPost:false,
})
const orgTreeProps ={
label: 'name',
@ -42,7 +40,7 @@ const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
organdpost({all:0,id:"309",levelL:0})
organdpost({id:"309",levelL:0})
.then(data => {
tableData.value = data.data.list;
})
@ -52,7 +50,7 @@ function jjjs(){
}
jjjs()
function editPost(){
editPostCont({})
editPostCont()
.then(data => {
tables.value = data.data.list;
})
@ -65,16 +63,17 @@ const formdate = reactive({
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const add = formdate.type.toString()
posttarget({attribute:formdate.type,dimension:formdate.dimension,title:formdate.name,page:formdate.page,pageSize:formdate.pagesize,postidlist:formdate.orgidlist})
const zjr = new Date(formdate.value1).getFullYear()
get_scheme({page:1,pagesize:20,postid:formdate.orgidlist,versionnumber:formdate.name,year:zjr})
.then(data => {
tableq.value = data.data.list;
tableq.value = data.data;
total.value = data.data.count;
})
}
@ -97,14 +96,6 @@ const editRow = (val:any)=> {
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
set_posttarget({id:add,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
@ -115,10 +106,10 @@ const handleDel = (val:any) => {
type: "warning",
})
.then(() => {
const add = val.id.toString()
const add = val.key.toString()
handleSure(val)
console.log(val.id)
set_posttarget({id:add,state:3,istrue:2}).then(()=>
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
@ -129,12 +120,12 @@ const handleSure = (val:any)=> {
tableData.value.splice(index, 1);
}
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split()
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const resetChecked=()=> {
formdate.orgidlist = []
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleedit=(val:any)=>{
@ -145,9 +136,8 @@ const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const cancelDialog=(val:any)=>{
data.addPost=true;
rowInfo.value=val;
const chl = ()=>{
formdate.orgidlist = "";
}
onMounted(()=>{
jjjs()
@ -155,51 +145,34 @@ onMounted(()=>{
})
</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 class="m-2">
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width:140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :check-strictly="true" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<div class="horizontal-controls">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" value="1" />
<el-option label="定量指标" value="2" />
</el-select>
<el-form-item label-width="40">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
<el-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 label="考核指标">
<template #default="scope">
<a style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensionname" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质"/>
<el-table-column prop="unit" label="单位" />
<el-table-column prop="share" label="考核周期" />
<el-table-column prop="scoringmethod" label="计分方式"/>
<el-table-column prop="report" label="数据提交">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详细">
<el-option v-for="item in scope.row.reportary" :key="item.id" :value="item.name"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="share" label="辅助计数"/>
</el-container>
<el-table class="m-4" :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" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" active-text="禁用" inactive-text="启用" @change="editPostState(scope.row.id,scope.row.state)"/>
<el-switch v-model="scope.row.status" />
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="200">
@ -212,20 +185,34 @@ onMounted(()=>{
</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>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.ength"></ED>
<Daid v-if="data.addPost" v-model="data.addPost" :row-info="rowInfo" :title="title" :array-num="tableData.ength" ></Daid>
</div>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
</div>
</template>
<style lang='scss' scoped>
*{
font-weight: bolder;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-row {
margin-bottom: 20px;
}
.qwe {
margin:-16px 0 0 -22px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

129
.history/src/views/opk/yui/new/bb_20231018110054.vue → .history/src/views/opk/asd/news/cc_20231108095550.vue

@ -5,13 +5,12 @@
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Dialog from './dialog.vue'
import ED from './eddialog.vue'
import Daid from './daialog.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,have_post,get_scheme } from '@/api/opk/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
@ -22,7 +21,6 @@ const data = reactive({
addPostBox: false,
editPostCont:false,
edPostCont:false,
addPost:false,
})
const orgTreeProps ={
label: 'name',
@ -42,7 +40,7 @@ const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
organdpost({all:0,id:"309",levelL:0})
organdpost({id:"309",levelL:0})
.then(data => {
tableData.value = data.data.list;
})
@ -52,7 +50,7 @@ function jjjs(){
}
jjjs()
function editPost(){
editPostCont({})
editPostCont()
.then(data => {
tables.value = data.data.list;
})
@ -65,16 +63,17 @@ const formdate = reactive({
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const add = formdate.type.toString()
posttarget({attribute:formdate.type,dimension:formdate.dimension,title:formdate.name,page:formdate.page,pageSize:formdate.pagesize,postidlist:formdate.orgidlist})
const zjr = new Date(formdate.value1).getFullYear()
get_scheme({page:1,pagesize:20,postid:formdate.orgidlist,versionnumber:formdate.name,year:zjr})
.then(data => {
tableq.value = data.data.list;
tableq.value = data.data;
total.value = data.data.count;
})
}
@ -97,14 +96,6 @@ const editRow = (val:any)=> {
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
set_posttarget({id:add,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
@ -115,10 +106,10 @@ const handleDel = (val:any) => {
type: "warning",
})
.then(() => {
const add = val.id.toString()
const add = val.key.toString()
handleSure(val)
console.log(val.id)
set_posttarget({id:add,state:3,istrue:2}).then(()=>
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
@ -129,12 +120,12 @@ const handleSure = (val:any)=> {
tableData.value.splice(index, 1);
}
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split()
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const resetChecked=()=> {
formdate.orgidlist = []
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleedit=(val:any)=>{
@ -145,9 +136,8 @@ const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const cancelDialog=(val:any)=>{
data.addPost=true;
rowInfo.value=val;
const chl = ()=>{
formdate.orgidlist = "";
}
onMounted(()=>{
jjjs()
@ -155,51 +145,34 @@ onMounted(()=>{
})
</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 class="m-2">
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width:140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :check-strictly="true" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<div class="horizontal-controls">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" value="1" />
<el-option label="定量指标" value="2" />
</el-select>
<el-form-item label-width="40">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
<el-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 label="考核指标">
<template #default="scope">
<a v-if="" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensionname" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质"/>
<el-table-column prop="unit" label="单位" />
<el-table-column prop="share" label="考核周期" />
<el-table-column prop="scoringmethod" label="计分方式"/>
<el-table-column prop="report" label="数据提交">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详细">
<el-option v-for="item in scope.row.reportary" :key="item.id" :value="item.name"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="share" label="辅助计数"/>
</el-container>
<el-table class="m-4" :data="tableq" border style="width: 100%">
<el-table-column prop="deaprtname" label="部门"/>
<el-table-column prop="year" label="年度" width="/>
<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" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" active-text="禁用" inactive-text="启用" @change="editPostState(scope.row.id,scope.row.state)"/>
<el-switch v-model="scope.row.status" />
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="200">
@ -212,20 +185,34 @@ onMounted(()=>{
</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>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.ength"></ED>
<Daid v-if="data.addPost" v-model="data.addPost" :row-info="rowInfo" :title="title" :array-num="tableData.ength" ></Daid>
</div>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
</div>
</template>
<style lang='scss' scoped>
*{
font-weight: bolder;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-row {
margin-bottom: 20px;
}
.qwe {
margin:-16px 0 0 -22px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

129
.history/src/views/opk/yui/new/bb_20231018110058.vue → .history/src/views/opk/asd/news/cc_20231108095551.vue

@ -5,13 +5,12 @@
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Dialog from './dialog.vue'
import ED from './eddialog.vue'
import Daid from './daialog.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,have_post,get_scheme } from '@/api/opk/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
@ -22,7 +21,6 @@ const data = reactive({
addPostBox: false,
editPostCont:false,
edPostCont:false,
addPost:false,
})
const orgTreeProps ={
label: 'name',
@ -42,7 +40,7 @@ const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
organdpost({all:0,id:"309",levelL:0})
organdpost({id:"309",levelL:0})
.then(data => {
tableData.value = data.data.list;
})
@ -52,7 +50,7 @@ function jjjs(){
}
jjjs()
function editPost(){
editPostCont({})
editPostCont()
.then(data => {
tables.value = data.data.list;
})
@ -65,16 +63,17 @@ const formdate = reactive({
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const add = formdate.type.toString()
posttarget({attribute:formdate.type,dimension:formdate.dimension,title:formdate.name,page:formdate.page,pageSize:formdate.pagesize,postidlist:formdate.orgidlist})
const zjr = new Date(formdate.value1).getFullYear()
get_scheme({page:1,pagesize:20,postid:formdate.orgidlist,versionnumber:formdate.name,year:zjr})
.then(data => {
tableq.value = data.data.list;
tableq.value = data.data;
total.value = data.data.count;
})
}
@ -97,14 +96,6 @@ const editRow = (val:any)=> {
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
set_posttarget({id:add,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
@ -115,10 +106,10 @@ const handleDel = (val:any) => {
type: "warning",
})
.then(() => {
const add = val.id.toString()
const add = val.key.toString()
handleSure(val)
console.log(val.id)
set_posttarget({id:add,state:3,istrue:2}).then(()=>
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
@ -129,12 +120,12 @@ const handleSure = (val:any)=> {
tableData.value.splice(index, 1);
}
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split()
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const resetChecked=()=> {
formdate.orgidlist = []
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleedit=(val:any)=>{
@ -145,9 +136,8 @@ const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const cancelDialog=(val:any)=>{
data.addPost=true;
rowInfo.value=val;
const chl = ()=>{
formdate.orgidlist = "";
}
onMounted(()=>{
jjjs()
@ -155,51 +145,34 @@ onMounted(()=>{
})
</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 class="m-2">
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width:140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :check-strictly="true" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<div class="horizontal-controls">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" value="1" />
<el-option label="定量指标" value="2" />
</el-select>
<el-form-item label-width="40">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
<el-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 label="考核指标">
<template #default="scope">
<a v-if="scope.row" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensionname" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质"/>
<el-table-column prop="unit" label="单位" />
<el-table-column prop="share" label="考核周期" />
<el-table-column prop="scoringmethod" label="计分方式"/>
<el-table-column prop="report" label="数据提交">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详细">
<el-option v-for="item in scope.row.reportary" :key="item.id" :value="item.name"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="share" label="辅助计数"/>
</el-container>
<el-table class="m-4" :data="tableq" border style="width: 100%">
<el-table-column prop="deaprtname" label="部门"/>
<el-table-column prop="year" label="年度" width=""/>
<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" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" active-text="禁用" inactive-text="启用" @change="editPostState(scope.row.id,scope.row.state)"/>
<el-switch v-model="scope.row.status" />
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="200">
@ -212,20 +185,34 @@ onMounted(()=>{
</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>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.ength"></ED>
<Daid v-if="data.addPost" v-model="data.addPost" :row-info="rowInfo" :title="title" :array-num="tableData.ength" ></Daid>
</div>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
</div>
</template>
<style lang='scss' scoped>
*{
font-weight: bolder;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-row {
margin-bottom: 20px;
}
.qwe {
margin:-16px 0 0 -22px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

129
.history/src/views/opk/yui/new/bb_20231018110100.vue → .history/src/views/opk/asd/news/cc_20231108095553.vue

@ -5,13 +5,12 @@
-->
<script lang='ts' setup>
import {ref,reactive,onMounted} from 'vue'
import Dialog from './dialog.vue'
import ED from './eddialog.vue'
import Daid from './daialog.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,have_post,get_scheme } from '@/api/opk/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import { getDictFormData } from '@/api/dict'
import Dialog from './dialog.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
@ -22,7 +21,6 @@ const data = reactive({
addPostBox: false,
editPostCont:false,
edPostCont:false,
addPost:false,
})
const orgTreeProps ={
label: 'name',
@ -42,7 +40,7 @@ const tableData = ref<any>([]);
const tables = ref<any>([]);
//
function jjjs(){
organdpost({all:0,id:"309",levelL:0})
organdpost({id:"309",levelL:0})
.then(data => {
tableData.value = data.data.list;
})
@ -52,7 +50,7 @@ function jjjs(){
}
jjjs()
function editPost(){
editPostCont({})
editPostCont()
.then(data => {
tables.value = data.data.list;
})
@ -65,16 +63,17 @@ const formdate = reactive({
name:"",
dimension:"",
attribute:"",
orgidlist:[]as String[],
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const add = formdate.type.toString()
posttarget({attribute:formdate.type,dimension:formdate.dimension,title:formdate.name,page:formdate.page,pageSize:formdate.pagesize,postidlist:formdate.orgidlist})
const zjr = new Date(formdate.value1).getFullYear()
get_scheme({page:1,pagesize:20,postid:formdate.orgidlist,versionnumber:formdate.name,year:zjr})
.then(data => {
tableq.value = data.data.list;
tableq.value = data.data;
total.value = data.data.count;
})
}
@ -97,14 +96,6 @@ const editRow = (val:any)=> {
const closeDetail = ()=>{
data.addPostBox = false;
}
function editPostState(classId:number,state:number){
console.log("改变状态--------->",classId,state)
const add =classId.toString()
let statusVal = 1
if( state == 1) statusVal = 2;
set_posttarget({id:add,state:statusVal,istrue:2})
postt()
}
//
const handleDel = (val:any) => {
const dictTypeIds = [val.outID || postIds.value].join(",");
@ -115,10 +106,10 @@ const handleDel = (val:any) => {
type: "warning",
})
.then(() => {
const add = val.id.toString()
const add = val.key.toString()
handleSure(val)
console.log(val.id)
set_posttarget({id:add,state:3,istrue:2}).then(()=>
edit_depart({id:add,state:3,istrue:2}).then(()=>
ElMessage.success("删除成功"))
postt()
})
@ -129,12 +120,12 @@ const handleSure = (val:any)=> {
tableData.value.splice(index, 1);
}
}
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString().split()
const resetChecked=()=> {
formdate.orgidlist = ""
postt()
}
const resetChecked=()=> {
formdate.orgidlist = []
const handle=(data:any)=>{
formdate.orgidlist = data.id.toString()
postt()
}
const handleedit=(val:any)=>{
@ -145,9 +136,8 @@ const handleErd=(val:any)=>{
data.edPostCont=true,
rowInfo.value=val;
}
const cancelDialog=(val:any)=>{
data.addPost=true;
rowInfo.value=val;
const chl = ()=>{
formdate.orgidlist = "";
}
onMounted(()=>{
jjjs()
@ -155,51 +145,34 @@ onMounted(()=>{
})
</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 class="m-2">
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width:140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :check-strictly="true" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<div class="horizontal-controls">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="指标名称">
<el-tree-select ref="orgTreeRef" v-model="formdate.dimension" clearable node-key="outId" class="orgTree" :data="tables" :props="orgTreeProp" :default-expand-all="false"/>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item v-model="formdate" label="指标名称">
<el-select v-model="formdate.type" placeholder="请输入名称" clearable>
<el-option label="定性指标" value="1" />
<el-option label="定量指标" value="2" />
</el-select>
<el-form-item label-width="40">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
<el-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 label="考核指标">
<template #default="scope">
<a v-if="scope.row.scoringmethod" style="color:#409eff" @click="cancelDialog(scope.row)">{{scope.row.title}}</a>
</template>
</el-table-column>
<el-table-column prop="dimensionname" label="考核维度"/>
<el-table-column prop="scoringmethod" label="指标性质"/>
<el-table-column prop="unit" label="单位" />
<el-table-column prop="share" label="考核周期" />
<el-table-column prop="scoringmethod" label="计分方式"/>
<el-table-column prop="report" label="数据提交">
<template #default="scope">
<el-select v-model="formdat.someProp" placeholder="查看详细">
<el-option v-for="item in scope.row.reportary" :key="item.id" :value="item.name"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="share" label="辅助计数"/>
</el-container>
<el-table class="m-4" :data="tableq" border style="width: 100%">
<el-table-column prop="deaprtname" label="部门"/>
<el-table-column prop="year" label="年度" width="68"/>
<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" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" active-text="禁用" inactive-text="启用" @change="editPostState(scope.row.id,scope.row.state)"/>
<el-switch v-model="scope.row.status" />
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="200">
@ -212,20 +185,34 @@ onMounted(()=>{
</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>
<ED v-if="data.edPostCont" v-model="data.edPostCont" :row-info="rowInfo" :title="title" :array-num="tableData.ength"></ED>
<Daid v-if="data.addPost" v-model="data.addPost" :row-info="rowInfo" :title="title" :array-num="tableData.ength" ></Daid>
</div>
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog>
</div>
</template>
<style lang='scss' scoped>
*{
font-weight: bolder;
}
.horizontal-controls {
display: flex;
float: left;
}
.el-row {
margin-bottom: 20px;
}
.qwe {
margin:-16px 0 0 -22px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

218
.history/src/views/opk/asd/news/cc_20231108095602.vue

@ -0,0 +1,218 @@
<!--
@ 作者: 鲁智强
@ 时间: 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,have_post,get_scheme } from '@/api/opk/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import Dialog from './dialog.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
editPostCont:false,
edPostCont: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(){
organdpost({id:"309",levelL:0})
.then(data => {
tableData.value = data.data.list;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const zjr = new Date(formdate.value1).getFullYear()
get_scheme({page:1,pagesize:20,postid:formdate.orgidlist,versionnumber:formdate.name,year:zjr})
.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.edPostCont=true,
rowInfo.value=val;
}
const chl = ()=>{
formdate.orgidlist = "";
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width:140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :check-strictly="true" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="40">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-4" :data="tableq" border style="width: 100%">
<el-table-column prop="deaprtname" label="部门"/>
<el-table-column prop="year" label="年度" width="69"/>
<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>
</div>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.el-row {
margin-bottom: 20px;
}
.qwe {
margin:-16px 0 0 -22px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

218
.history/src/views/opk/asd/news/cc_20231108095607.vue

@ -0,0 +1,218 @@
<!--
@ 作者: 鲁智强
@ 时间: 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,have_post,get_scheme } from '@/api/opk/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import Dialog from './dialog.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
editPostCont:false,
edPostCont: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(){
organdpost({id:"309",levelL:0})
.then(data => {
tableData.value = data.data.list;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const zjr = new Date(formdate.value1).getFullYear()
get_scheme({page:1,pagesize:20,postid:formdate.orgidlist,versionnumber:formdate.name,year:zjr})
.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.edPostCont=true,
rowInfo.value=val;
}
const chl = ()=>{
formdate.orgidlist = "";
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width:140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :check-strictly="true" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="40">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-4" :data="tableq" border style="width: 100%">
<el-table-column prop="deaprtname" label="部门" width="69"/>
<el-table-column prop="year" label="年度" width="69"/>
<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>
</div>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.el-row {
margin-bottom: 20px;
}
.qwe {
margin:-16px 0 0 -22px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

218
.history/src/views/opk/asd/news/cc_20231108095610.vue

@ -0,0 +1,218 @@
<!--
@ 作者: 鲁智强
@ 时间: 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,have_post,get_scheme } from '@/api/opk/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import Dialog from './dialog.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
editPostCont:false,
edPostCont: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(){
organdpost({id:"309",levelL:0})
.then(data => {
tableData.value = data.data.list;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const zjr = new Date(formdate.value1).getFullYear()
get_scheme({page:1,pagesize:20,postid:formdate.orgidlist,versionnumber:formdate.name,year:zjr})
.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.edPostCont=true,
rowInfo.value=val;
}
const chl = ()=>{
formdate.orgidlist = "";
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width:140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :check-strictly="true" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="40">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-4" :data="tableq" border style="width: 100%">
<el-table-column prop="deaprtname" label="部门" width="299"/>
<el-table-column prop="year" label="年度" width="69"/>
<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>
</div>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.el-row {
margin-bottom: 20px;
}
.qwe {
margin:-16px 0 0 -22px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

218
.history/src/views/opk/asd/news/cc_20231108095620.vue

@ -0,0 +1,218 @@
<!--
@ 作者: 鲁智强
@ 时间: 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,have_post,get_scheme } from '@/api/opk/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import Dialog from './dialog.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
editPostCont:false,
edPostCont: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(){
organdpost({id:"309",levelL:0})
.then(data => {
tableData.value = data.data.list;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const zjr = new Date(formdate.value1).getFullYear()
get_scheme({page:1,pagesize:20,postid:formdate.orgidlist,versionnumber:formdate.name,year:zjr})
.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.edPostCont=true,
rowInfo.value=val;
}
const chl = ()=>{
formdate.orgidlist = "";
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width:140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :check-strictly="true" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="40">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-4" :data="tableq" border style="width: 100%">
<el-table-column prop="deaprtname" label="部门" width="299"/>
<el-table-column prop="year" label="年度" width="69"/>
<el-table-column prop="key" label="版本号" width="299"/>
<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>
</div>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.el-row {
margin-bottom: 20px;
}
.qwe {
margin:-16px 0 0 -22px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

218
.history/src/views/opk/asd/news/cc_20231108095621.vue

@ -0,0 +1,218 @@
<!--
@ 作者: 鲁智强
@ 时间: 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,have_post,get_scheme } from '@/api/opk/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import Dialog from './dialog.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
editPostCont:false,
edPostCont: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(){
organdpost({id:"309",levelL:0})
.then(data => {
tableData.value = data.data.list;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const zjr = new Date(formdate.value1).getFullYear()
get_scheme({page:1,pagesize:20,postid:formdate.orgidlist,versionnumber:formdate.name,year:zjr})
.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.edPostCont=true,
rowInfo.value=val;
}
const chl = ()=>{
formdate.orgidlist = "";
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width:140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :check-strictly="true" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="40">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-4" :data="tableq" border style="width: 100%">
<el-table-column prop="deaprtname" label="部门" width="299"/>
<el-table-column prop="year" label="年度" width="69"/>
<el-table-column prop="key" label="版本号" width="99"/>
<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>
</div>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.el-row {
margin-bottom: 20px;
}
.qwe {
margin:-16px 0 0 -22px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

218
.history/src/views/opk/asd/news/cc_20231108095626.vue

@ -0,0 +1,218 @@
<!--
@ 作者: 鲁智强
@ 时间: 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,have_post,get_scheme } from '@/api/opk/news/api'
import { formItemValidateStates, TableV2SortOrder } from 'element-plus';
import Dialog from './dialog.vue'
// eslint-disable-next-line vue/require-prop-types
const { addShow, title } = defineProps(['addShow', 'title'])
const data = reactive({
formInline:{
region:'',
},
title:"",
addPostBox: false,
editPostCont:false,
edPostCont: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(){
organdpost({id:"309",levelL:0})
.then(data => {
tableData.value = data.data.list;
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
jjjs()
function editPost(){
editPostCont()
.then(data => {
tables.value = data.data.list;
})
}
editPost()
const table = ref<any>([])
const formdate = reactive({
page:0,
pagesize:20,
name:"",
dimension:"",
attribute:"",
orgidlist:"",
type:"",
value1:"2023",
})
//
const tableq = ref([])
const postt = ()=>{
const zjr = new Date(formdate.value1).getFullYear()
get_scheme({page:1,pagesize:20,postid:formdate.orgidlist,versionnumber:formdate.name,year:zjr})
.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.edPostCont=true,
rowInfo.value=val;
}
const chl = ()=>{
formdate.orgidlist = "";
}
onMounted(()=>{
jjjs()
postt()
})
</script>
<template>
<div class="m-2">
<el-container class="m-4">
<div class="qwe">
<el-button type="primary" style="width:140px" size="large" @click="resetChecked">全选</el-button>
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :check-strictly="true" @node-click="handle"/>
</div>
<el-divider direction="vertical"/>
<el-col :span="22">
<el-container class="wer">
<el-form-item label="考核指标">
<el-input v-model="formdate.name" placeholder="请输入考核指标" clearable/>
</el-form-item>
<el-form-item label="年度:" label-width="90">
<el-date-picker v-model="formdate.value1" type="year"/>
</el-form-item>
<el-form-item label-width="40">
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon></el-button>
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon></el-button>
</el-form-item>
</el-container>
<el-table class="m-4" :data="tableq" border style="width: 100%">
<el-table-column prop="deaprtname" label="部门" width="299"/>
<el-table-column prop="year" label="年度" width="69"/>
<el-table-column prop="key" label="版本号" width="179"/>
<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>
</div>
</template>
<style lang='scss' scoped>
.horizontal-controls {
display: flex;
float: left;
}
.el-row {
margin-bottom: 20px;
}
.qwe {
margin:-16px 0 0 -22px;
float:right;
}
.wer{
margin:-5px 0 0 20px;
font-weight:normal;
}
.el-divider--vertical{
display:inline-block;
width:1px;
height:812px;
margin:0 8px;
vertical-align:middle;
position:relative;
}
/* 可以根据需要调整样式 */
</style>

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

Loading…
Cancel
Save