flowPath.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. <template>
  2. <div >
  3. <!-- 无效流程 -->
  4. <div style="display: flex;justify-content: end;margin-bottom: 10px;" v-if="!taskId">
  5. <!-- <el-button type="primary" size="small" @click="addOption">添加陈述意见</el-button> -->
  6. <!-- <el-dropdown @command="handleCommand">
  7. <el-button type="primary" size="small">
  8. 上传案件子阶段文件<i class="el-icon-arrow-down el-icon--right"></i>
  9. </el-button>
  10. <el-dropdown-menu slot="dropdown" >
  11. <el-dropdown-item command="1">添加无效请求书</el-dropdown-item>
  12. <el-dropdown-item command="6">添加权要修改记录</el-dropdown-item>
  13. <el-dropdown-item command="7">补充证据及理由记录</el-dropdown-item>
  14. <el-dropdown-item command="2">添加陈述意见书</el-dropdown-item>
  15. <el-dropdown-item command="0">添加口审记录</el-dropdown-item>
  16. <el-dropdown-item command="3">添加无效决定书</el-dropdown-item>
  17. <el-dropdown-item command="4">添加行政诉讼书</el-dropdown-item>
  18. <el-dropdown-item command="5">添加行政诉讼判决书</el-dropdown-item>
  19. <el-dropdown-item command="8">添加其他文档</el-dropdown-item>
  20. </el-dropdown-menu>
  21. </el-dropdown> -->
  22. <el-dropdown trigger="click">
  23. <el-button type="primary" size="small">
  24. 上传案件子阶段文件<i class="el-icon-arrow-down el-icon--right"></i>
  25. </el-button>
  26. <el-dropdown-menu slot="dropdown" >
  27. <template v-for="(menu,index) in menuList">
  28. <el-dropdown-item :key="'menu1'+index" v-if="menu.children && menu.children.length">
  29. <el-dropdown placement="left-start" >
  30. <span>{{ menu.casePhase }}<i class="el-icon-arrow-right"></i></span>
  31. <el-dropdown-menu slot="dropdown" >
  32. <el-dropdown-item v-for="menuItem in menu.children" :key="menuItem.id" :command="menuItem.id" @click.native="handleCommand(menuItem)">添加{{menuItem.flowName}}</el-dropdown-item>
  33. </el-dropdown-menu>
  34. </el-dropdown>
  35. </el-dropdown-item>
  36. <el-dropdown-item v-else :key="'menu2'+index" :command="menu.id" @click.native="handleCommand(menu)">添加{{menu.casePhase}}</el-dropdown-item>
  37. </template>
  38. </el-dropdown-menu>
  39. </el-dropdown>
  40. </div>
  41. <div >
  42. <el-timeline class="flowPath_timeline">
  43. <el-timeline-item v-for="item in timelineList" :timestamp="item.occurredTime" :key="item.id" placement="top">
  44. <div v-if="item.showCasePhase" class="timelinePosition">{{ item.casePhase }}</div>
  45. <el-card>
  46. <div>
  47. <span>{{ timeType[item.flowType] || '发文日' }}:</span><span>{{ item.occurredTime}}</span>
  48. <div style="float: right;">
  49. <span style="margin-right: 10px;" @click="edit(item)"><el-link>编辑</el-link></span>
  50. <span @click="dele(item)"><el-link>删除</el-link></span>
  51. </div>
  52. </div>
  53. <div v-if="item.flowType==6">
  54. <p><span>地点:</span><span>{{ item.oralTrailVO.position }}</span></p>
  55. <p><span>参与人:</span><span>{{ item.oralTrailVO.participator }}</span></p>
  56. <p><span>口审笔录描述:</span><span>{{ item.oralTrailVO.recordDescription }}</span></p>
  57. </div>
  58. <div v-if="item.flowType==1">
  59. <p><span>发文日:</span><span>{{ item.invalidRequestFileVO.invalidFileSendDate }}</span></p>
  60. </div>
  61. <div v-if="item.flowType==7">
  62. <p><span>决定书号码:</span><span>{{ item.invalidDecisionFileVO.fileNo }}</span></p>
  63. <p><span>法律依据:</span><span>{{ item.invalidDecisionFileVO.legalBase }}</span></p>
  64. <p><span>决定要点:</span><span>{{ item.invalidDecisionFileVO.decisionKey }}</span></p>
  65. <p><span>无效结果:</span><span>{{ item.invalidDecisionFileVO.cronNames?item.invalidDecisionFileVO.cronNames.join('、'):'' }}</span></p>
  66. </div>
  67. <div v-if="item.flowType==16||item.flowType==26">
  68. <p><span>行诉结果:</span><span>{{ litigationResult[item.judgementVO.conclusion] }}</span></p>
  69. </div>
  70. <div v-if="item.flowType==17||item.flowType==27||item.flowType==28">
  71. <p><span>文档名称:</span><span>{{ item.otherDocumentsVO.documentName }}</span></p>
  72. </div>
  73. <div>
  74. <p>备注:{{ item.description }}</p>
  75. </div>
  76. <div style="margin-top: 10px;">
  77. <div v-if="item.systemFileList" class="upload-file">
  78. <div v-for="(file, index) in item.systemFileList" :key="index" style="margin:0;display:flex;justify-content:space-around;">
  79. <p style="margin:0;width:calc(100% - 40px);overflow: hidden;white-space: nowrap;text-overflow:ellipsis;cursor: pointer;">{{file.originalName}}</p>
  80. <myMenu :data="file" @delFile="delFile(file,item)" :deleted="false" ></myMenu>
  81. </div>
  82. </div>
  83. </div>
  84. </el-card>
  85. </el-timeline-item>
  86. </el-timeline>
  87. </div>
  88. <responseDialog ref="responseDialog" :projectId="projectId" @save="saveFlowPath"></responseDialog>
  89. </div>
  90. </template>
  91. <script>
  92. import responseDialog from '../dialog/editFlowPath.vue'
  93. export default {
  94. props:['projectId','signPatentNo','taskId'],
  95. components: {
  96. responseDialog,
  97. },
  98. data() {
  99. return {
  100. timelineList:[],
  101. isOpen: false,
  102. isOpenNum: null,
  103. form: {},
  104. queryParams: {},
  105. timeType: {
  106. '1': '提出无效时间',
  107. '5': '陈述答复时间',
  108. '6': '口审时间',
  109. '7': '无效决定时间',
  110. '8': '发起诉讼时间',
  111. '18': '发起诉讼时间',
  112. '16': '法院判决时间',
  113. '26': '法院判决时间',
  114. '2': '权要修改时间',
  115. '3': '补充证据和理由时间',
  116. '17':' 文档时间',
  117. '27':' 文档时间',
  118. '28':' 文档时间',
  119. },
  120. menuList:[],
  121. currentMenuList:[],
  122. litigationResult:this.$constants.litigationResult
  123. }
  124. },
  125. computed: {},
  126. watch: {},
  127. async created() {
  128. await this.getMenuList()
  129. },
  130. mounted() {
  131. this.getList()
  132. },
  133. methods: {
  134. saveFlowPath(form){
  135. this.getList()
  136. this.$emit('changeFlowPath',form)
  137. },
  138. async getMenuList(){
  139. await this.$api.queryAssoCasePhaseList().then(response=>{
  140. if(response.code == 200){
  141. var data = response.data.data
  142. this.currentMenuList = data
  143. let arr = []
  144. for(let i = 0;i<data.length;i++){
  145. let item = data[i]
  146. let obj = arr.find(a=>{
  147. return a.casePhase == item.casePhase
  148. })
  149. if(!obj){
  150. obj = {
  151. casePhase : item.casePhase,
  152. children:[]
  153. }
  154. arr.push(obj)
  155. }
  156. obj.children.push(item)
  157. }
  158. this.menuList = arr
  159. }
  160. })
  161. },
  162. getList() {
  163. this.queryParams.projectId = this.projectId
  164. // 1正序
  165. this.queryParams.orderBy = 1
  166. this.$api.queryReportAffair(this.queryParams).then((res) => {
  167. if (res.code==200) {
  168. let data = res.data.data
  169. let arr = this.menuList.map(item=>{
  170. return item.casePhase
  171. })
  172. for(let i = 0;i<arr.length;i++){
  173. let item = arr[i]
  174. let index = data.findIndex(l=>{
  175. return l.casePhase == item
  176. })
  177. if(index!=-1){
  178. data[index].showCasePhase = true
  179. }
  180. }
  181. this.timelineList = res.data.data
  182. }
  183. }).catch((error) => {
  184. })
  185. },
  186. // 删除文件
  187. delFile(file,item) {
  188. var index = item.systemFileList.findIndex(i=>{
  189. return item.guid == file.guid
  190. })
  191. if(index !=-1){
  192. item.systemFileList.splice(index,1)
  193. }
  194. var form = {
  195. description:item.description,
  196. systemFileList:item.systemFileList,
  197. ...item[field[item.affairType]]
  198. }
  199. },
  200. // 编辑
  201. edit(item) {
  202. var field= {
  203. 6:'oralTrailVO',
  204. 1:'invalidRequestFileVO',
  205. 5:'stateOpinionVO',
  206. 7:'invalidDecisionFileVO',
  207. 8:'adminProceedVO',
  208. 18:'adminProceedVO',
  209. 16:'judgementVO',
  210. 26:'judgementVO',
  211. 2:'claimHistoryVO',
  212. 3:'supplyEvidenceVO',
  213. 17:'otherDocumentsVO',
  214. 27:'otherDocumentsVO',
  215. 28:'otherDocumentsVO',
  216. }
  217. var form = {
  218. ...item,
  219. ...item[field[item.flowType]]
  220. }
  221. let type = {
  222. id:item.assoCasePhaseId,
  223. flowName:item.flowName,
  224. casePhase:item.casePhase,
  225. caseChildPhase:item.caseChildPhase,
  226. flowType:item.flowType
  227. }
  228. this.$refs.responseDialog.open(type,form)
  229. },
  230. // 删除
  231. dele(item) {
  232. var ids = [item.id]
  233. this.$confirm('确认删除本条数据吗?', '提示', {
  234. confirmButtonText: '确定',
  235. cancelButtonText: '取消',
  236. type: 'warning'
  237. }).then(() => {
  238. this.$api.deleteReportAffair(ids).then((res) => {
  239. if (res.code==200) {
  240. this.$message.success('删除成功')
  241. this.$emit('changeFlowPath',item)
  242. this.getList()
  243. }
  244. })
  245. }).catch(err => {
  246. this.$message.error('删除失败')
  247. })
  248. },
  249. // 添加
  250. async handleCommand(option) {
  251. if(!(await this.$permission.projectPermission(this.projectId))){
  252. this.$showPermissionDialog()
  253. return false
  254. }
  255. if(!option){
  256. return
  257. }
  258. var form = {
  259. systemFileList:[]
  260. }
  261. this.$refs.responseDialog.open(option,form)
  262. },
  263. },
  264. }
  265. </script>
  266. <style lang="scss" scoped>
  267. .edit{
  268. float: right;
  269. margin-right: 10px;
  270. }
  271. </style>
  272. <style lang="scss">
  273. .flowPath_timeline{
  274. .timelinePosition{
  275. width: 56px;
  276. text-align: center;
  277. position: absolute;
  278. left: -28px;
  279. top:-18px;
  280. color: red;
  281. font-weight: bold;
  282. }
  283. }
  284. </style>