index2.js 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. // 专利挖掘-挖掘任务表格栏位
  2. export const column = {
  3. data() {
  4. return {
  5. // 审核任务类型
  6. taskType: {
  7. 1: '项目审核任务',
  8. 2: '文件分配任务',
  9. 3: '文件审核任务',
  10. },
  11. // 任务列表table栏位信息
  12. columnList: [
  13. {
  14. name: "任务名称",
  15. type: "String",
  16. value: "name",
  17. },
  18. {
  19. name: "任务类型",
  20. type: "Integer",
  21. value: "type",
  22. },
  23. {
  24. name: "发起人",
  25. type: "String",
  26. value: "createName",
  27. },
  28. {
  29. name: "处理人",
  30. type: "String",
  31. value: "handlerName",
  32. },
  33. {
  34. name: "创建时间",
  35. type: "DateTime",
  36. value: "createTime",
  37. },
  38. {
  39. name: "截止时间",
  40. type: "DateTime",
  41. value: "deadLineTime",
  42. },
  43. {
  44. name: "状态",
  45. type: "String",
  46. value: "status",
  47. },
  48. {
  49. name: "备注",
  50. type: "String",
  51. value: "description",
  52. },
  53. ],
  54. // 审核历史table栏位信息
  55. columnList2: [
  56. {
  57. name: "处理人",
  58. type: "String",
  59. value: "createName",
  60. },
  61. {
  62. name: "时间",
  63. type: "String",
  64. value: "createTime",
  65. },
  66. {
  67. name: "结果",
  68. type: "String",
  69. value: "description",
  70. },
  71. ]
  72. }
  73. },
  74. mounted() {
  75. },
  76. methods: {
  77. // 点击项目名称
  78. handleItem(row, key) { },
  79. // 遍历栏位为数组类型
  80. getArrJoin(data, type) {
  81. if (!data) {
  82. return '--'
  83. }
  84. if (Array.isArray(data)) {
  85. if (data.length == 0) {
  86. return '--'
  87. }
  88. let arr = data.map(item => {
  89. return item[type]
  90. })
  91. return arr.join('、')
  92. } else {
  93. return type[data]
  94. }
  95. },
  96. },
  97. }
  98. // 专利挖掘-人员-懒加载
  99. export const personnelLoading = {
  100. data() {
  101. return {
  102. //人员列表懒加载
  103. personnelList: {
  104. queryParams: {
  105. current: 1,
  106. size: 10
  107. },
  108. data: []
  109. },
  110. }
  111. },
  112. mounted() {
  113. },
  114. methods: {
  115. /**
  116. * 人员(输入框形式)
  117. */
  118. // 懒加载人员方法
  119. personnelLoad() {
  120. if (this.personnelList.queryParams.current * this.personnelList.queryParams.size >= this.personnelList.queryParams.total) {
  121. return false
  122. }
  123. this.personnelList.queryParams.current++
  124. this.questionPersonnel()
  125. },
  126. // 查询人员
  127. async questionPersonnel() {
  128. let params = {
  129. ...this.personnelList.queryParams,
  130. name: this.personnelList.name
  131. }
  132. await this.$api.getPermissionPersonnel(params).then(res => {
  133. if (res.code == 200) {
  134. this.personnelList.data.push(...res.data)
  135. this.personnelList.queryParams.total = res.pageColumn.total
  136. this.personnelList.cb(this.personnelList.data);
  137. }
  138. })
  139. },
  140. //获取下拉建议人员数据
  141. async querySearchPersonnel(queryString, cb) {
  142. this.personnelList.queryParams.current = 1
  143. this.personnelList.name = queryString
  144. this.personnelList.data = []
  145. this.personnelList.cb = cb
  146. await this.questionPersonnel()
  147. },
  148. // 人员输入框失焦
  149. handleBlur(val) {
  150. if (this.form.handlerName.includes('@')) {
  151. this.form.handler = val
  152. }
  153. },
  154. // 人员输入框选择
  155. handleSelectPersonnel(val) {
  156. this.form.handler = val.id
  157. },
  158. /**
  159. * 人员列表(下拉框形式)
  160. * @param {*} query
  161. */
  162. // 人员列表远程搜索
  163. remoteMethodPerson(query) {
  164. this.personnelList.data = []
  165. this.personnelList.queryParams.current = 1
  166. this.personnelList.queryParams.name = query
  167. this.getPermissionPersonnel()
  168. },
  169. // 获取所有人员列表懒加载
  170. lazyLoadingPerson() {
  171. if (this.personnelList.queryParams.current * this.personnelList.queryParams.size >= this.personnelList.queryParams.total) {
  172. return false
  173. }
  174. this.personnelList.queryParams.current += 1
  175. this.getPermissionPersonnel()
  176. },
  177. //获取所有人员列表(修改不要一次性获取,可以使用懒加载加远程搜索 )
  178. async getPermissionPersonnel(type) {
  179. this.personnelList.loading = true;
  180. await this.$api.getPermissionPersonnel(this.personnelList.queryParams).then((response) => {
  181. if (response.code == 200) {
  182. this.personnelList.loading = false;
  183. if (!type) {
  184. if (this.form.handler) {
  185. var index = response.data.findIndex(item => {
  186. return item.id == this.form.handler
  187. })
  188. if (index != -1) {
  189. response.data.splice(index, 1)
  190. }
  191. }
  192. this.personnelList.queryParams.total = response.pageColumn.total
  193. }
  194. this.personnelList.data.push(...response.data)
  195. // this.personnelList.queryParams.total = response.pageColumn.total
  196. }
  197. })
  198. },
  199. },
  200. }
  201. // 专利挖掘-基本信息-流程
  202. export const optionsData = {
  203. data() {
  204. return {
  205. pathOptions: [
  206. { label: '创新点梳理', value: 1 },
  207. { label: '查新检索', value: 2 },
  208. { label: '保护主题规划', value: 3 },
  209. { label: '独权撰写', value: 4 },
  210. { label: '从权撰写', value: 5 },
  211. { label: '申请文件定稿', value: 6 },
  212. { label: '说明书规划撰写', value: 7 },
  213. ],//流程
  214. }
  215. },
  216. mounted() {
  217. },
  218. methods: {
  219. },
  220. }
  221. // 公用js
  222. export const handleJs = {
  223. data() {
  224. return {
  225. }
  226. },
  227. mounted() {
  228. },
  229. methods: {
  230. //校验文件是否全部上传
  231. validFile() {
  232. if (this.form.systemFileList && this.form.systemFileList.length > 0) {
  233. return this.form.systemFileList.filter(item => {
  234. return !item.guid
  235. }).length > 0
  236. } else {
  237. return false
  238. }
  239. },
  240. },
  241. }