internetAssessment.vue 77 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857
  1. <template>
  2. <div class="flex-box">
  3. <div :span="24" class="flex-header">
  4. <Tabs :tabList="tabListMain" @status="clickTabMains">
  5. </Tabs>
  6. <el-button v-if="clickTagName == 'first'" type="primary" @click="clickNewTag()">+新建</el-button>
  7. </div>
  8. <div class="flex-count">
  9. <Table v-loading="loading" @clickDemand="clickDemand" :list="lableTable" ref="TableList" @changeNum="changeNum">
  10. </Table>
  11. </div>
  12. <el-dialog :title="dialogTitle" :visible.sync="dialogStatus" width="100%" :before-close="handleClose" :modal="false"
  13. v-if="dialogStatus" :destroy-on-close="true">
  14. <!-- 后期维护 -->
  15. <div style="position: fixed; z-index: 10000;top: 55px;">
  16. <el-button type="primary" v-if="startStatus" @click="clickHandles">处理</el-button>
  17. <el-button type="primary" v-if="closeStatus" @click="handleClose">关闭</el-button>
  18. <el-button type="primary" v-if="saveStatus" @click="clickSave">保存</el-button>
  19. </div>
  20. <el-form ref="form" :model="fromList" :rules="rule" label-width="105px" style="margin-top: 30px">
  21. <div style="text-align: center; font-size: 24px;">互联网电视考核</div>
  22. <div class="flex-header">
  23. <el-form-item label="考核主题:" prop="needName">
  24. <el-input v-model="fromList.needName" :disabled="disabled"></el-input>
  25. </el-form-item>
  26. </div>
  27. <div class="flex-header">
  28. <el-form-item label="发起人:">
  29. <el-input v-model="fromList.proposer" disabled></el-input>
  30. </el-form-item>
  31. <el-form-item label="发起时间:">
  32. <el-input v-model="fromList.proposerTime" disabled></el-input>
  33. </el-form-item>
  34. </div>
  35. <div class="" style="margin: 1%; border-bottom: 1px solid #e1e1e1;">
  36. <el-form-item label="考核说明:">
  37. <el-input type="textarea" v-model="fromList.assessmentDescription" maxlength="500" show-word-limit
  38. :disabled="disabled"></el-input>
  39. </el-form-item>
  40. </div>
  41. <div class="flex-header">
  42. <el-form-item label="考核模板:" prop="assessmentTemplate">
  43. <el-select v-model="fromList.assessmentTemplate" placeholder="请选择考核模板" size="medium"
  44. :disabled="disabled" @change="selectChanged">
  45. <el-option v-for="item in assessmentTemplateoption" :key="item.code" :label="item.name"
  46. :value="item.code" />
  47. </el-select>
  48. </el-form-item>
  49. <el-form-item label="当前得分:">
  50. <el-input v-model="fromList.currentScore" disabled></el-input>
  51. </el-form-item>
  52. </div>
  53. <div class="" v-if="fromList.assessmentTemplate">
  54. <el-form-item v-if="fromList.assessmentTemplate != '1'" label="合作运营考核(100分,权重100%)">
  55. <el-button type="primary" style="float:left"
  56. v-if="dialogTitle == '新建工单' || fromList.taskName == '起草'"
  57. @click="addNewHost1()">新增考核项</el-button>
  58. <el-table class="com-table" :key="Date.now()" ref="multipleTable"
  59. :data="fromList.content1.tableData1" tooltip-effect="dark" size="mini" border
  60. style="width: 100%">
  61. <el-table-column prop="item" label="考核项目">
  62. <template slot-scope="scope">
  63. <span v-if="scope.row.show">
  64. <el-input type="textarea" size="mini" v-model="scope.row.item"></el-input>
  65. </span>
  66. <span v-else>{{ scope.row.item }}</span>
  67. </template>
  68. </el-table-column>
  69. <el-table-column prop="detailed" label="考核细则">
  70. <template slot-scope="scope">
  71. <span v-if="scope.row.show">
  72. <el-input type="textarea" size="mini" v-model="scope.row.detailed"></el-input>
  73. </span>
  74. <span v-else>{{ scope.row.detailed }}</span>
  75. </template>
  76. </el-table-column>
  77. <el-table-column prop="content" label="考核内容">
  78. <template slot-scope="scope">
  79. <span v-if="scope.row.show">
  80. <el-input type="textarea" size="mini" v-model="scope.row.content"></el-input>
  81. </span>
  82. <span v-else>{{ scope.row.content }}</span>
  83. </template>
  84. </el-table-column>
  85. <el-table-column prop="principle" label="考核原则">
  86. <template slot-scope="scope">
  87. <span v-if="scope.row.show">
  88. <el-input type="textarea" size="mini" v-model="scope.row.principle"></el-input>
  89. </span>
  90. <span v-else>{{ scope.row.principle }}</span>
  91. </template>
  92. </el-table-column>
  93. <el-table-column prop="deductMarks" label="扣分标准">
  94. <template slot-scope="scope">
  95. <span v-if="scope.row.show">
  96. <el-input type="textarea" size="mini" v-model="scope.row.deductMarks"></el-input>
  97. </span>
  98. <span v-else>{{ scope.row.deductMarks }}</span>
  99. </template>
  100. </el-table-column>
  101. <el-table-column prop="require" label="佐证要求">
  102. <template slot-scope="scope">
  103. <span v-if="scope.row.show">
  104. <el-input type="textarea" size="mini" v-model="scope.row.require"></el-input>
  105. </span>
  106. <span v-else>{{ scope.row.require }}</span>
  107. </template>
  108. </el-table-column>
  109. <el-table-column prop="score" label="考核得分">
  110. <template slot-scope="scope">
  111. <span
  112. v-if="dialogTitle == '新建工单' || fromList.taskName == '起草' || fromList.taskName == '发起考核'">
  113. <el-input size="mini" type="text" :precision="0" v-model="scope.row.score"
  114. oninput="value=value.replace(/[^\d.]/g,'')"
  115. @blur="onInputFocus1(scope.$index, scope.row.score)"></el-input>
  116. </span>
  117. <span v-else>{{ scope.row.score }}</span>
  118. </template>
  119. </el-table-column>
  120. <el-table-column label="操作" v-if="dialogTitle == '新建工单' || fromList.taskName == '起草'">
  121. <template slot-scope="scope">
  122. <div style="display:flex">
  123. <el-button icon="el-icon-edit" type="text"
  124. @click="editX(scope.row, scope.$index)">{{
  125. scope.row.show ? '保存' : "修改" }}
  126. </el-button>
  127. <el-button type="text" @click="delectv(scope.$index, scope.row)">删除</el-button>
  128. </div>
  129. </template>
  130. </el-table-column>
  131. </el-table>
  132. </el-form-item>
  133. </div>
  134. <div class="" v-if="fromList.assessmentTemplate">
  135. <el-form-item v-if="fromList.assessmentTemplate == '1'" label="合作运营考核(100分,权重50%)">
  136. <el-button type="primary" style="float:left"
  137. v-if="dialogTitle == '新建工单' || fromList.taskName == '起草'"
  138. @click="addNewHost1()">新增考核项</el-button>
  139. <el-table class="com-table" :key="Date.now()" ref="multipleTable"
  140. :data="fromList.content1.tableData1" tooltip-effect="dark" size="mini" border
  141. style="width: 100%">
  142. <el-table-column prop="item" label="考核项目">
  143. <template slot-scope="scope">
  144. <span v-if="scope.row.show">
  145. <el-input type="textarea" size="mini" v-model="scope.row.item"></el-input>
  146. </span>
  147. <span v-else>{{ scope.row.item }}</span>
  148. </template>
  149. </el-table-column>
  150. <el-table-column prop="detailed" label="考核细则">
  151. <template slot-scope="scope">
  152. <span v-if="scope.row.show">
  153. <el-input type="textarea" size="mini" v-model="scope.row.detailed"></el-input>
  154. </span>
  155. <span v-else>{{ scope.row.detailed }}</span>
  156. </template>
  157. </el-table-column>
  158. <el-table-column prop="content" label="考核内容">
  159. <template slot-scope="scope">
  160. <span v-if="scope.row.show">
  161. <el-input type="textarea" size="mini" v-model="scope.row.content"></el-input>
  162. </span>
  163. <span v-else>{{ scope.row.content }}</span>
  164. </template>
  165. </el-table-column>
  166. <el-table-column prop="principle" label="考核原则">
  167. <template slot-scope="scope">
  168. <span v-if="scope.row.show">
  169. <el-input type="textarea" size="mini" v-model="scope.row.principle"></el-input>
  170. </span>
  171. <span v-else>{{ scope.row.principle }}</span>
  172. </template>
  173. </el-table-column>
  174. <el-table-column prop="deductMarks" label="扣分标准">
  175. <template slot-scope="scope">
  176. <span v-if="scope.row.show">
  177. <el-input type="textarea" size="mini" v-model="scope.row.deductMarks"></el-input>
  178. </span>
  179. <span v-else>{{ scope.row.deductMarks }}</span>
  180. </template>
  181. </el-table-column>
  182. <el-table-column prop="require" label="佐证要求">
  183. <template slot-scope="scope">
  184. <span v-if="scope.row.show">
  185. <el-input type="textarea" size="mini" v-model="scope.row.require"></el-input>
  186. </span>
  187. <span v-else>{{ scope.row.require }}</span>
  188. </template>
  189. </el-table-column>
  190. <el-table-column prop="score" label="考核得分">
  191. <template slot-scope="scope">
  192. <span
  193. v-if="dialogTitle == '新建工单' || fromList.taskName == '起草' || fromList.taskName == '发起考核'">
  194. <el-input size="mini" type="text" :precision="0" v-model="scope.row.score"
  195. @input="numDxsCheck(fromList.content1.tableData1[scope.$index], 1, 'score')"
  196. @blur="onInputFocus1(scope.$index, scope.row.score)"></el-input>
  197. </span>
  198. <span v-else>{{ scope.row.score }}</span>
  199. </template>
  200. </el-table-column>
  201. <el-table-column label="操作" v-if="dialogTitle == '新建工单' || fromList.taskName == '起草'">
  202. <template slot-scope="scope">
  203. <div style="display:flex">
  204. <el-button icon="el-icon-edit" type="text"
  205. @click="editv(scope.row, scope.$index)">{{
  206. scope.row.show ? '保存' : "修改" }}
  207. </el-button>
  208. <el-button type="text" @click="delectv(scope.$index, scope.row)">删除</el-button>
  209. </div>
  210. </template>
  211. </el-table-column>
  212. </el-table>
  213. </el-form-item>
  214. </div>
  215. <div class="" v-if="fromList.assessmentTemplate == '1'">
  216. <el-form-item label="业务质量考核(100分,权重50%):">
  217. <el-button type="primary" style="float:left"
  218. v-if="dialogTitle == '新建工单' || fromList.taskName == '起草'"
  219. @click="addNewHost2()">新增考核项</el-button>
  220. <el-table class="com-table" :key="Date.now()" ref="multipleTable"
  221. :data="fromList.content1.tableData2" tooltip-effect="dark" size="mini" border
  222. style="width: 100%">
  223. <el-table-column prop="item" label="考核项目">
  224. <template slot-scope="scope">
  225. <span v-if="scope.row.show">
  226. <el-input type="textarea" size="mini" v-model="scope.row.item"></el-input>
  227. </span>
  228. <span v-else>{{ scope.row.item }}</span>
  229. </template>
  230. </el-table-column>
  231. <el-table-column prop="detailed" label="考核细则">
  232. <template slot-scope="scope">
  233. <span v-if="scope.row.show">
  234. <el-input type="textarea" size="mini" v-model="scope.row.detailed"></el-input>
  235. </span>
  236. <span v-else>{{ scope.row.detailed }}</span>
  237. </template>
  238. </el-table-column>
  239. <el-table-column prop="content" label="考核内容">
  240. <template slot-scope="scope">
  241. <span v-if="scope.row.show">
  242. <el-input type="textarea" size="mini" v-model="scope.row.content"></el-input>
  243. </span>
  244. <span v-else>{{ scope.row.content }}</span>
  245. </template>
  246. </el-table-column>
  247. <el-table-column prop="principle" label="考核原则">
  248. <template slot-scope="scope">
  249. <span v-if="scope.row.show">
  250. <el-input type="textarea" size="mini" v-model="scope.row.principle"></el-input>
  251. </span>
  252. <span v-else>{{ scope.row.principle }}</span>
  253. </template>
  254. </el-table-column>
  255. <el-table-column prop="deductMarks" label="扣分标准">
  256. <template slot-scope="scope">
  257. <span v-if="scope.row.show">
  258. <el-input type="textarea" size="mini" v-model="scope.row.deductMarks"></el-input>
  259. </span>
  260. <span v-else>{{ scope.row.deductMarks }}</span>
  261. </template>
  262. </el-table-column>
  263. <el-table-column prop="require" label="佐证要求">
  264. <template slot-scope="scope">
  265. <span v-if="scope.row.show">
  266. <el-input type="textarea" size="mini" v-model="scope.row.require"></el-input>
  267. </span>
  268. <span v-else>{{ scope.row.require }}</span>
  269. </template>
  270. </el-table-column>
  271. <el-table-column prop="score" label="考核得分">
  272. <template slot-scope="scope">
  273. <span
  274. v-if="dialogTitle == '新建工单' || fromList.taskName == '起草' || fromList.taskName == '发起考核'">
  275. <el-input size="mini" type="text" :precision="0" v-model="scope.row.score"
  276. @input="numDxsCheck(fromList.content1.tableData2[scope.$index], 1, 'score')"
  277. @blur="onInputFocus2(scope.$index, scope.row.score)"></el-input>
  278. </span>
  279. <span v-else>{{ scope.row.score }}</span>
  280. </template>
  281. </el-table-column>
  282. <el-table-column label="操作" v-if="dialogTitle == '新建工单' || fromList.taskName == '起草'">
  283. <template slot-scope="scope">
  284. <div style="display:flex">
  285. <el-button icon="el-icon-edit" type="text"
  286. @click="editw(scope.row, scope.$index)">{{
  287. scope.row.show ? '保存' : "修改" }}
  288. </el-button>
  289. <el-button type="text" @click="delectw(scope.$index, scope.row)">删除</el-button>
  290. </div>
  291. </template>
  292. </el-table-column>
  293. </el-table>
  294. </el-form-item>
  295. </div>
  296. <div class="" v-if="fromList.assessmentTemplate">
  297. <el-form-item label="合作运营加分(上限5分,当月有效):">
  298. <el-table class="com-table" :key="Date.now()" ref="multipleTable"
  299. :data="fromList.content1.tableData3" tooltip-effect="dark" size="mini" border
  300. style="width: 100%">
  301. <el-table-column v-for="(value, index) in fromList.content1.tableCol3" :key="index"
  302. :prop="value.prop" :label="value.label" align="center">
  303. </el-table-column>
  304. <el-table-column label="考核得分">
  305. <template slot-scope="scope">
  306. <span
  307. v-if="dialogTitle == '新建工单' || fromList.taskName == '起草' || fromList.taskName == '发起考核'">
  308. <el-input size="mini" type="text" :precision="0" v-model="scope.row.score"
  309. @input="numDxsCheck(fromList.content1.tableData3[scope.$index], 1, 'score')"
  310. @blur="onInputFocus3(scope.$index, scope.row.score)"></el-input>
  311. </span>
  312. <span v-else>{{ scope.row.score }}</span>
  313. </template>
  314. </el-table-column>
  315. </el-table>
  316. </el-form-item>
  317. </div>
  318. <div class="" v-if="fromList.assessmentTemplate == '1'">
  319. <el-form-item label="网络协同加分(上限5分,当月有效):">
  320. <el-table class="com-table" :key="Date.now()" ref="multipleTable"
  321. :data="fromList.content1.tableData4" tooltip-effect="dark" size="mini" border
  322. style="width: 100%">
  323. <el-table-column v-for="(value, index) in fromList.content1.tableCol4" :key="index"
  324. :prop="value.prop" :label="value.label" align="center">
  325. </el-table-column>
  326. <el-table-column label="考核得分">
  327. <template slot-scope="scope">
  328. <span
  329. v-if="dialogTitle == '新建工单' || fromList.taskName == '起草' || fromList.taskName == '发起考核'">
  330. <el-input size="mini" type="text" :precision="0" v-model="scope.row.score"
  331. @input="numDxsCheck(fromList.content1.tableData4[scope.$index], 1, 'score')"
  332. @blur="onInputFocus4(scope.$index, scope.row.score)"></el-input>
  333. </span>
  334. <span v-else>{{ scope.row.score }}</span>
  335. </template>
  336. </el-table-column>
  337. </el-table>
  338. </el-form-item>
  339. </div>
  340. <div class="" v-if="fromList.assessmentTemplate">
  341. <el-form-item label="《违约行为》对标考核(-100分):">
  342. <el-table class="com-table" :key="Date.now()" ref="multipleTable"
  343. :data="fromList.content1.tableData5" tooltip-effect="dark" size="mini" border
  344. style="width: 100%">
  345. <el-table-column v-for="(value, index) in fromList.content1.tableCol5" :key="index"
  346. :prop="value.prop" :label="value.label" align="center">
  347. </el-table-column>
  348. <el-table-column label="考核得分">
  349. <template slot-scope="scope">
  350. <span
  351. v-if="dialogTitle == '新建工单' || fromList.taskName == '起草' || fromList.taskName == '发起考核'">
  352. <el-input size="mini" type="text" :precision="0" v-model="scope.row.score"
  353. @input="numDxsCheck(fromList.content1.tableData5[scope.$index], 1, 'score')"
  354. @blur="onInputFocus5(scope.$index, scope.row.score)"></el-input>
  355. </span>
  356. <span v-else>{{ scope.row.score }}</span>
  357. </template>
  358. </el-table-column>
  359. </el-table>
  360. </el-form-item>
  361. </div>
  362. <div class="flex-load" style="display: flex; flex-direction: column">
  363. <el-form-item label="附件:" prop="accessoryList">
  364. <my-upload @uploadBack="uploadBack" @delloadBack="delloadBack"
  365. @clickDownload="download" :fileInfo="fileInfo" :fileList="fromList.accessoryList"
  366. style="width: 30% !important"></my-upload>
  367. <!-- <div v-if="fromList.taskName != '初评'">
  368. <div v-for="(item, index) in fromList.accessoryList" :key="index">
  369. <span style="color: blue;cursor: pointer;" @click="downloadOne(item)">{{
  370. item.fileName
  371. }}</span>
  372. </div>
  373. </div> -->
  374. </el-form-item>
  375. </div>
  376. </el-form>
  377. <div>
  378. <div class="table-title">流程追踪</div>
  379. <TableId :list="lables"></TableId>
  380. </div>
  381. </el-dialog>
  382. <div v-if="destroy">
  383. <el-dialog title="处理操作" width="100%" :visible.sync="handleStatus" :before-close="handleCloses" :modal="false"
  384. v-if="handleStatus" :destroy-on-close="true">
  385. <Workflow :list="fromList" v-if="isWorkflowStatus == true" @updateForm="updateForm"
  386. :requestForm="requestForm" :adminResourceId="adminResourceId" :request_formTitle="request_form.title"/>
  387. <WorkflowEntrance :list="fromList" v-else :lastManList="lastManList" @beforeClose="updateForm"
  388. :requestForm="requestForm" :request_formTitle="request_form.title"/>
  389. <!-- 后期维护 -->
  390. </el-dialog>
  391. </div>
  392. </div>
  393. </template>
  394. <script>
  395. import Tabs from "../../../components/el-tabs";
  396. import Table from "../../../components/el-form";
  397. import TableId from "../../../components/el-formid";
  398. import Seach from "../../../components/el-search";
  399. import myUpload from "../../../components/workflowUpload";
  400. import Workflow from "../../../components/workflowBase";
  401. import WorkflowEntrance from "../../../components/workflowEntrance";
  402. import getConfig from '../../../config/dev.js'
  403. import {
  404. getTodoBase,
  405. getDoneBase,
  406. getInitiateBase,
  407. getNowdata,
  408. } from "../../../http/api.js";//../../../http/api.js
  409. import { log } from "console";
  410. export default {
  411. components: {
  412. Table,
  413. TableId,
  414. Tabs,
  415. myUpload,
  416. Workflow,
  417. Seach,
  418. WorkflowEntrance
  419. },
  420. data() {
  421. let _self = this
  422. return {
  423. loading: false,
  424. isWorkflowStatus: true, //默认展示模式组件,为true时展示多人处理组件
  425. lastManList: [],
  426. rule: {
  427. needName: [
  428. { required: true, message: "请添加考核主题", trigger: "blur" },
  429. ],
  430. assessmentTemplate: [
  431. { required: true, message: "请选择考核模板", trigger: "change" },
  432. ],
  433. },
  434. form: {
  435. }, //表单数据
  436. fromList: {
  437. }, //表单数据
  438. fileInfo: {
  439. type: "bt1n",
  440. typename: "上传文件",
  441. // limit: 5,
  442. url: "/market/waf/uploadByMinio",
  443. fileList: [],
  444. },
  445. list: {},
  446. assessmentTemplateoption: [],
  447. disabled: false,
  448. pageNo: 1,//页码
  449. destroy: false,//处理
  450. handleStatus: false,//处理
  451. tableName: "hlw_dskh_process",
  452. request_form: {
  453. userId: "",
  454. userName: "",
  455. path: this.$router.currentRoute.name,
  456. userCode: JSON.parse(window.sessionStorage.userInfo).loginNo,
  457. // path:this.$roter.options.routers,
  458. // nextDealMan:'',
  459. title: "title",
  460. businessKey: "1",
  461. processDefinitionKey: "hlw_dskh_process",//流程key
  462. },
  463. requestForm: {
  464. // fresourceId: "87753452-c2f3-11ed-9c8b-d6cd97160e00", // 本地环境
  465. // fresourceId: "canvas", // 生产环境
  466. // fresourceId: "d4092f5e-c49b-11ed-a8d3-00505687dcd3", //测试91环境
  467. fresourceId: getConfig().internetAssessment,
  468. processDefinitionKey: "hlw_dskh_process",
  469. },
  470. dialogStatus: false, //dialog显示
  471. dialoglablesStatus: true, //dialogL流程追踪显示
  472. clickTagNameTop: 'First',//头部tab
  473. clickTagName: 'first',
  474. dialogTitle: '',//dialogtit
  475. startStatus: false,//处理状态按钮
  476. closeStatus: false, //关闭按钮状态
  477. saveStatus: false, //保存按钮状态
  478. lables: {
  479. height: "400",
  480. titledata: [
  481. {
  482. label: "环节名称",
  483. prop: "taskName",
  484. width: 300,
  485. },
  486. {
  487. label: "处理人",
  488. prop: "assignee",
  489. width: 300,
  490. },
  491. {
  492. label: "到达时间",
  493. prop: "startTime",
  494. width: 300,
  495. },
  496. {
  497. label: "处理时间",
  498. prop: "endTime",
  499. width: 300,
  500. },
  501. {
  502. label: "回复意见",
  503. prop: "content",
  504. width: 300,
  505. },
  506. ], //表格头
  507. data: [], //内容数据
  508. loading: true,
  509. pageData: {
  510. total: 0, // 总条数
  511. pageSizes: 10, // 每页数量
  512. pageNum: 1, // 页码
  513. },
  514. isSelection: false, // 表格有多选时设置
  515. isOperation: false, // 表格有操作列时设置
  516. isIndex: true, // 列表序号
  517. operation: {
  518. // 表格有操作列时设置
  519. label: "操作", // 列名
  520. width: "50", // 根据实际情况给宽度
  521. data: [
  522. {
  523. label: "操作", // 操作名称
  524. type: "", //按钮类型
  525. handleRow: function () { }, // 自定义事件
  526. },
  527. ],
  528. },
  529. },
  530. tabListMain: [
  531. {
  532. index: "first",
  533. label: "我的待办",
  534. number: 1,
  535. name: "prosss_key",
  536. },
  537. {
  538. index: "two",
  539. label: "我的已办",
  540. number: 2,
  541. },
  542. {
  543. index: "three",
  544. label: "我发起的",
  545. number: 3,
  546. },
  547. ],
  548. lableTable: {},//传给子组件table
  549. firstlabel: {
  550. height: "400",
  551. titledata: [
  552. {
  553. label: "考核主题",
  554. prop: "need_name",
  555. width: 400,
  556. },
  557. {
  558. label: "发起人",
  559. prop: "proposer",
  560. width: 400,
  561. },
  562. {
  563. label: "发起部门",
  564. prop: "apply_dept",
  565. width: 300,
  566. },
  567. {
  568. label: "发起科室",
  569. prop: "apply_department",
  570. width: 300,
  571. },
  572. {
  573. label: "发起时间",
  574. prop: "proposer_time",
  575. width: 400,
  576. },
  577. {
  578. label: "当前环节",
  579. prop: "taskName",
  580. width: 400,
  581. },
  582. ], //表格头
  583. data: [], //内容数据
  584. loading: true,
  585. pageData: {
  586. total: 10, // 总条数
  587. pageSizes: 10, // 每页数量
  588. pageNum: 1, // 页码
  589. },
  590. isSelection: false, // 表格有多选时设置
  591. isOperation: false, // 表格有操作列时设置
  592. isIndex: false, // 列表序号
  593. operation: {
  594. // 表格有操作列时设置
  595. label: "操作", // 列名
  596. width: "50", // 根据实际情况给宽度
  597. data: [
  598. {
  599. label: "操作", // 操作名称
  600. type: "", //按钮类型
  601. handleRow: function () { }, // 自定义事件
  602. },
  603. ],
  604. },
  605. },
  606. twolabel: {
  607. height: "400",
  608. titledata: [
  609. {
  610. label: "考核主题",
  611. prop: "need_name",
  612. width: 400,
  613. },
  614. {
  615. label: "发起人",
  616. prop: "proposer",
  617. width: 400,
  618. },
  619. {
  620. label: "发起部门",
  621. prop: "apply_dept",
  622. width: 300,
  623. },
  624. {
  625. label: "发起科室",
  626. prop: "apply_department",
  627. width: 300,
  628. },
  629. {
  630. label: "发起时间",
  631. prop: "proposer_time",
  632. width: 400,
  633. },
  634. ], //表格头
  635. data: [], //内容数据
  636. loading: true,
  637. pageData: {
  638. total: 10, // 总条数
  639. pageSizes: 10, // 每页数量
  640. pageNum: 1, // 页码
  641. },
  642. isSelection: false, // 表格有多选时设置
  643. isOperation: false, // 表格有操作列时设置
  644. isIndex: false, // 列表序号
  645. operation: {
  646. // 表格有操作列时设置
  647. label: "操作", // 列名
  648. width: "50", // 根据实际情况给宽度
  649. data: [
  650. {
  651. label: "操作", // 操作名称
  652. type: "", //按钮类型
  653. handleRow: function () { }, // 自定义事件
  654. },
  655. ],
  656. },
  657. },
  658. threelabel: {
  659. height: "400",
  660. titledata: [
  661. {
  662. label: "考核主题",
  663. prop: "need_name",
  664. width: 400,
  665. },
  666. {
  667. label: "发起人",
  668. prop: "proposer",
  669. width: 400,
  670. },
  671. {
  672. label: "发起部门",
  673. prop: "apply_dept",
  674. width: 300,
  675. },
  676. {
  677. label: "发起科室",
  678. prop: "apply_department",
  679. width: 300,
  680. },
  681. {
  682. label: "发起时间",
  683. prop: "proposer_time",
  684. width: 400,
  685. },
  686. {
  687. label: "当前环节",
  688. prop: "taskName",
  689. width: 400,
  690. },
  691. ], //表格头
  692. data: [], //内容数据
  693. loading: true,
  694. pageData: {
  695. total: 10, // 总条数
  696. pageSizes: 10, // 每页数量
  697. pageNum: 1, // 页码
  698. },
  699. isSelection: false, // 表格有多选时设置
  700. isOperation: false, // 表格有操作列时设置
  701. isIndex: false, // 列表序号
  702. operation: {
  703. // 表格有操作列时设置
  704. label: "操作", // 列名
  705. width: "50", // 根据实际情况给宽度
  706. data: [
  707. {
  708. label: "操作", // 操作名称
  709. type: "", //按钮类型
  710. handleRow: function () { }, // 自定义事件
  711. },
  712. ],
  713. },
  714. },
  715. savestatusBtn: false,
  716. adminResourceId: "", //转派多人id
  717. }
  718. },
  719. created() {
  720. let status = JSON.stringify(this.$route.query) == "{}";
  721. if (status) {
  722. this.lableTable = this.firstlabel
  723. this.getQueryList()
  724. this.usernumber()
  725. } else {
  726. let { id, type } = this.$route.query;
  727. let list = {
  728. taskId: id,
  729. tableName: this.tableName
  730. };
  731. this.usernumber()
  732. this.lableTable = this.firstlabel
  733. this.getQueryList(list, 0);//代办
  734. }
  735. },
  736. mounted() {
  737. ///HlwDskhProcess/queryAssessmentTemplateList
  738. this.$http({
  739. url: "/market/HlwDskhProcess/queryAssessmentTemplateList",
  740. method: "post",
  741. headers: {
  742. "Content-Type": "application/json",
  743. },
  744. data: {},
  745. }).then((res) => {
  746. console.log(res);
  747. this.assessmentTemplateoption = res.data
  748. })
  749. },
  750. methods: {
  751. selectChanged(val) {
  752. console.log(val);
  753. this.fromList.assessmentTemplate = '1'
  754. this.assessmentTemplateoption.map((item) => {
  755. if (val == item.code) {
  756. console.log(JSON.parse(item.value));
  757. if (val == '1') {
  758. this.fromList.content1 = JSON.parse(item.value)
  759. this.fromList.content1.tableData1.map((item) => {
  760. item.show = false;
  761. })
  762. this.fromList.content1.tableData2.map((item) => {
  763. item.show = false;
  764. })
  765. } else {
  766. let a = JSON.parse(item.value)
  767. this.$set(this.fromList.content1, 'tableData1', a.tableData1)
  768. this.$set(this.fromList.content1, 'tableData3', a.tableData2)
  769. this.$set(this.fromList.content1, 'tableData5', a.tableData3)
  770. this.$set(this.fromList.content1, 'tableCol3', a.tableCol2)
  771. this.$set(this.fromList.content1, 'tableCol5', a.tableCol3)
  772. this.fromList.content1.tableData1.map((item) => {
  773. item.show = false;
  774. })
  775. }
  776. }
  777. })
  778. this.fromList.assessmentTemplate = val
  779. this.fromList.currentScore = 0.0
  780. // if (val == '1') { a
  781. // this.fromList.content1.tableData1 = [
  782. // { time: '2020-08-10', grade: 'niuniu', name: '小明', subjects: '语文', score: 0, },
  783. // ]
  784. // this.fromList.content1.tableData2 = [
  785. // { time: '2020-08-11', grade: '三年三班', name: '小花', subjects: '数学', score: 0 },
  786. // ]
  787. // this.fromList.content1.tableData3 = [
  788. // { time: '2020-08-11', grade: '三年三班', name: '小花', subjects: '数学', score: 0 },
  789. // ]
  790. // this.fromList.content1.tableData4 = [
  791. // { time: '2020-08-11', grade: '三年三班', name: '小花', subjects: '数学', score: 0 },
  792. // { time: '2020-08-11', grade: '三年三班', name: '小花', subjects: '数学', score: 0 },
  793. // ]
  794. // this.fromList.content1.tableData5 = [
  795. // { time: '2020-08-11', grade: '三年三班', name: '小花', subjects: '数学', score: 0 },
  796. // { time: '2020-08-11', grade: '三年三班', name: '小花', subjects: '数学', score: 0 },
  797. // ]
  798. // this.fromList.content1.tableCol3 = [
  799. // { prop: 'time', label: '时间' },
  800. // { prop: 'grade', label: '工号' },
  801. // { prop: 'name', label: '姓名' },
  802. // { prop: 'subjects', label: '科目' },
  803. // { prop: 'score', label: '分数' },
  804. // ]
  805. // this.fromList.content1.tableCol4 = [
  806. // { prop: 'time', label: 'jianfen' },
  807. // { prop: 'grade', label: '工号' },
  808. // ]
  809. // this.fromList.content1.tableCol5 = [
  810. // { prop: 'time', label: 'jianfen' },
  811. // { prop: 'grade', label: '工号' },
  812. // { prop: 'name', label: '部门' },
  813. // ]
  814. // }
  815. },
  816. clickNewTag(v) {
  817. this.$http({
  818. url: "/sysmgr/csysdept/queryGroupListByLoginNo",
  819. method: "post",
  820. headers: {
  821. "Content-Type": "application/json",
  822. },
  823. data: {},
  824. }).then((res) => {
  825. this.fromList = {
  826. proposer: JSON.parse(window.sessionStorage.getItem('userInfo')).loginName,
  827. proposerNo: JSON.parse(window.sessionStorage.getItem('userInfo')).loginNoStr,
  828. proposerTime: getNowdata({ a: '-', b: ' ', c: ':' }),
  829. currentScore: 0,
  830. content1: {},
  831. assessmentTemplate: '',
  832. }
  833. let accessoryList = [];
  834. accessoryList = v;
  835. this.$set(this.fromList, "accessoryList", accessoryList);
  836. this.lables.data = []
  837. this.startStatus = true;
  838. this.saveStatus = true;
  839. this.closeStatus = true;
  840. this.dialogStatus = true;
  841. this.isWorkflowStatus = true;
  842. this.dialogTitle = "新建工单";
  843. this.disabled = false;
  844. let a = res.data[0].description.split('/')
  845. if (a.length == 3) {
  846. this.fromList.applyDept = a[1]
  847. this.fromList.applyDepartment = a[2]
  848. } else {
  849. this.fromList.applyDept = a[1]
  850. this.fromList.applyDepartment = a[1]
  851. }
  852. });
  853. },
  854. //是否最后一个人
  855. async getLastName() {
  856. console.log(this.fromList);
  857. let list = {
  858. procinstid: this.fromList.processId,
  859. taskid: this.fromList.taskId,
  860. // taskId:e.taskId
  861. };
  862. let _this = this;
  863. let obj = {
  864. url: this.$url.formList.getLastName, //流程追踪接口
  865. data: list,
  866. // status: "form",
  867. headers: {
  868. "Content-Type": "application/json",
  869. },
  870. };
  871. let res = await this.common.httpPost(obj, success);
  872. function success(data) {
  873. console.log('panduan');
  874. if (data.lastMan == true) {
  875. _this.adminResourceId = data.adminResourceId;
  876. }
  877. _this.isWorkflowStatus = data.lastMan == false ? false : true;
  878. _this.lastManList = data;
  879. console.log(_this.isWorkflowStatus);
  880. }
  881. },
  882. downloadOne(e) {
  883. let list = {
  884. id: e.fileCode,
  885. fileName: e.fileName,
  886. };
  887. this.$http({
  888. url: "/market/waf/downFileByMinio",
  889. method: "post",
  890. headers: {
  891. "Content-Type": "application/json",
  892. },
  893. responseType: "blob",
  894. data: list,
  895. }).then((response) => {
  896. console.log(response);
  897. if (window.navigator && window.navigator.msSaveOrOpenBlob) {
  898. let blob = new Blob([response.data], {
  899. type: "application/vnd.ms-excel",
  900. });
  901. //window.navigator.msSaveOrOpenBlob(blob, this.form.needName);
  902. window.navigator.msSaveOrOpenBlob(
  903. blob,
  904. list.fileName
  905. );
  906. } else {
  907. /* 火狐谷歌的文件下载方式 */
  908. var blob = new Blob([response.data]);
  909. var downloadElement = document.createElement("a");
  910. var href = window.URL.createObjectURL(blob);
  911. downloadElement.href = href;
  912. downloadElement.download =
  913. list.fileName;
  914. document.body.appendChild(downloadElement);
  915. downloadElement.click();
  916. document.body.removeChild(downloadElement);
  917. window.URL.revokeObjectURL(href);
  918. }
  919. });
  920. },
  921. download(e) {
  922. let list = {
  923. id: e.fileCode,
  924. fileName: e.name,
  925. };
  926. this.$http({
  927. url: "/market/waf/downFileByMinio",
  928. method: "post",
  929. headers: {
  930. "Content-Type": "application/json",
  931. },
  932. responseType: "blob",
  933. data: list,
  934. }).then((response) => {
  935. console.log(response);
  936. if (window.navigator && window.navigator.msSaveOrOpenBlob) {
  937. let blob = new Blob([response.data], {
  938. type: "application/vnd.ms-excel",
  939. });
  940. //window.navigator.msSaveOrOpenBlob(blob, this.form.needName);
  941. window.navigator.msSaveOrOpenBlob(
  942. blob,
  943. list.fileName
  944. );
  945. } else {
  946. /* 火狐谷歌的文件下载方式 */
  947. var blob = new Blob([response.data]);
  948. var downloadElement = document.createElement("a");
  949. var href = window.URL.createObjectURL(blob);
  950. downloadElement.href = href;
  951. downloadElement.download =
  952. list.fileName;
  953. document.body.appendChild(downloadElement);
  954. downloadElement.click();
  955. document.body.removeChild(downloadElement);
  956. window.URL.revokeObjectURL(href);
  957. }
  958. });
  959. },
  960. //上传文件钩子函数
  961. clickUpload(file) { },
  962. uploadBack(v) {
  963. if (this.fromList.accessoryList) {
  964. this.fromList.accessoryList = [];
  965. this.fromList.accessoryList = v;
  966. } else {
  967. let accessoryList = [];
  968. accessoryList = v;
  969. this.$set(this.fromList, "accessoryList", accessoryList);
  970. }
  971. },
  972. delloadBack(v) {
  973. this.fromList.accessoryList = v;
  974. },
  975. //获取页码
  976. changeNum(e) {
  977. console.log(e)
  978. this.pageNo = e;
  979. if (this.clickTagName == 'first') {
  980. this.firstlabel.pageData.pageNum = e;
  981. this.getQueryList();
  982. }
  983. if (this.clickTagName == 'two') {
  984. this.twolabel.pageData.pageNum = e;
  985. this.getQueryDone();
  986. }
  987. if (this.clickTagName == 'three') {
  988. this.threelabel.pageData.pageNum = e;
  989. this.getMeLaunch()
  990. }
  991. },
  992. //点击工单状态跳转需求流程显示页面
  993. clickDemand(e, res) {
  994. console.log(e);
  995. this.isWorkflowStatus = true
  996. console.log(res);
  997. if (e === "考核主题") {
  998. if (this.clickTagName === "three") {//发起
  999. console.log(res.taskName)
  1000. this.dialogTitle = "查看";
  1001. this.closeStatus = true;
  1002. if (res.taskName == "起草") {
  1003. this.disabled = false;
  1004. this.startStatus = true;
  1005. this.saveStatus = true;
  1006. } else {
  1007. this.disabled = true;
  1008. this.startStatus = false;
  1009. this.saveStatus = false;
  1010. }
  1011. }
  1012. if (this.clickTagName === "first") {//代办
  1013. this.dialogTitle = "处理";
  1014. if (res.taskName == "起草") {
  1015. this.savestatusBtn = false
  1016. this.disabled = false;
  1017. this.startStatus = true;
  1018. this.saveStatus = true;
  1019. this.closeStatus = true;
  1020. } else {
  1021. this.savestatusBtn = true
  1022. this.disabled = true;
  1023. this.closeStatus = true;
  1024. this.startStatus = true;
  1025. this.saveStatus = false;
  1026. }
  1027. }
  1028. if (this.clickTagName === "two") {//已办
  1029. this.dialogTitle = "查看";
  1030. this.closeStatus = true;
  1031. this.startStatus = false;
  1032. this.saveStatus = false;
  1033. this.disabled = true;
  1034. }
  1035. this.dialogStatus = true
  1036. this.fromList = res;
  1037. this.clickForm(res);
  1038. this.getFromQuery(res);
  1039. }
  1040. },
  1041. //查询form表单数据
  1042. getFromQuery(e) {
  1043. this.$http({
  1044. url: "/market/HlwDskhProcess/query",
  1045. method: "post",
  1046. headers: {
  1047. "Content-Type": "application/json",
  1048. },
  1049. data: { id: e.id },
  1050. }).then((res) => {
  1051. this.fromList = res.data;
  1052. this.dialogStatus = true;
  1053. this.fromList.taskId = e.taskId
  1054. this.fromList.taskName = e.taskName
  1055. this.fromList.createId = e.createId
  1056. if (this.fromList.accessoryList) {
  1057. this.fromList.accessoryList.map((item) => {
  1058. item.name = item.fileName;
  1059. })
  1060. }
  1061. this.fromList.content1 = JSON.parse(this.fromList.content);
  1062. this.fromList.content1.tableData1.map((item) => {
  1063. item.show = false;
  1064. })
  1065. if (this.fromList.content1.tableData2) {
  1066. this.fromList.content1.tableData2.map((item) => {
  1067. item.show = false;
  1068. })
  1069. }
  1070. this.fromList.resourceId = e.resourceId
  1071. console.log(this.fromList);
  1072. });
  1073. },
  1074. async clickForm(e) {
  1075. let list = {
  1076. processInstanceId: e.process_id,
  1077. // taskId:e.taskId
  1078. };
  1079. let _this = this;
  1080. let obj = {
  1081. url: this.$url.formList.getCommentsByProcessId, //流程追踪接口
  1082. data: list,
  1083. headers: {
  1084. "Content-Type": "application/json",
  1085. },
  1086. };
  1087. let res = await this.common.httpPost(obj, success);
  1088. function success(data) {
  1089. console.log('[ 接口返回值第一曾 ] >', data)
  1090. let list = [];
  1091. list = data.data.data;
  1092. if (data.data.lastmandata.length != 0) {
  1093. data.data.lastmandata.map((item, index) => {
  1094. item.id = index + 22;
  1095. });
  1096. }
  1097. list.map((item, index) => {
  1098. item.startTime = _this.$util.datetimeFormat(item.startTime);
  1099. item.endTime = _this.$util.datetimeFormat(item.endTime);
  1100. item.id = index + 1;
  1101. item.children = [];
  1102. if (data.data.lastmandata.length != 0) {
  1103. let indexs = data.data.lastmandata.findIndex((items) => {
  1104. if (items.taskId == item.taskId) {
  1105. item.children.push(items);
  1106. }
  1107. });
  1108. }
  1109. });
  1110. console.log(list);
  1111. _this.lables.data = list;
  1112. console.log("[ _this.lables.data ] >", _this.lables.data);
  1113. _this.abc = true;
  1114. }
  1115. },
  1116. handleClose() {//关闭弹窗
  1117. this.dialogStatus = false;
  1118. this.fromList = {};
  1119. },
  1120. async clickSave() {
  1121. this.$refs.form.validate((valid) => {
  1122. if (valid) {
  1123. console.log(this.$refs.form.model)
  1124. this.savestatusBtn = true
  1125. if (this.fromList.id) {
  1126. if (this.fromList.accessoryList) {
  1127. this.fromList.accessoryIdList = []
  1128. this.fromList.accessoryList.map((item) => {
  1129. this.fromList.accessoryIdList.push(item.id);
  1130. })
  1131. }
  1132. this.fromList.content = JSON.stringify(this.$refs.form.model.content1);
  1133. this.request_form.title = '[市场工作台]-互联网电视考核-' + this.fromList.needName;
  1134. this.$http({
  1135. url: "/market/HlwDskhProcess/update",
  1136. method: "post",
  1137. headers: {
  1138. "Content-Type": "application/json",
  1139. },
  1140. data: this.fromList,
  1141. }).then((res) => {
  1142. if (res.data.result === 0) {
  1143. this.$message.success("表单更新成功");
  1144. }
  1145. });
  1146. } else {
  1147. this.getUserIds();
  1148. }
  1149. } else {
  1150. this.$message.error("请完善表单信息");
  1151. return false;
  1152. }
  1153. });
  1154. },
  1155. //获取自己idname
  1156. getUserIds() {
  1157. this.$http({
  1158. url: "/market/api/user/info/queryNodePers?params=" + JSON.parse(window.sessionStorage.userInfo).loginNo,
  1159. method: "post",
  1160. headers: {
  1161. "Content-Type": "application/json",
  1162. },
  1163. }).then((res) => {
  1164. this.request_form.userName = res.data[0].children[0].loginNameStr;
  1165. this.request_form.userId = res.data[0].children[0].loginNoStr;
  1166. this.setForm();
  1167. // console.log(this.request_form)
  1168. });
  1169. },
  1170. setForm(e) {
  1171. this.request_form.title = '[市场工作台]-互联网电视考核-' + this.fromList.needName;
  1172. this.fromList.accessoryIdList = []
  1173. // console.log(this.fromList.accessoryList);
  1174. if (this.fromList.accessoryList) {
  1175. this.fromList.accessoryList.map((item) => {
  1176. this.fromList.accessoryIdList.push(item.id);
  1177. })
  1178. }
  1179. // console.log(this.$refs.form.model);
  1180. // console.log(JSON.stringify(this.$refs.form.model.content1));
  1181. this.fromList.content = JSON.stringify(this.$refs.form.model.content1);
  1182. this.$http({
  1183. url: "/market/HlwDskhProcess/add",
  1184. method: "post",
  1185. headers: {
  1186. "Content-Type": "application/json",
  1187. },
  1188. data: this.fromList,
  1189. }).then((res) => {
  1190. this.request_form.businessKey = res.data.body;
  1191. this.fromList.id = res.data.body;
  1192. this.formWorkId = res.data.body;
  1193. this.clickHandle(res.data.body);
  1194. });
  1195. },
  1196. async clickHandle(e) {
  1197. let _this = this;
  1198. let obj = {
  1199. url: this.$url.formList.startWork, //开始工作流接口
  1200. data: _this.request_form,
  1201. status: "form",
  1202. headers: {
  1203. "Content-Type": "application/x-www-form-urlencoded",
  1204. },
  1205. };
  1206. let res = await this.common.httpPost(obj, success);
  1207. function success(data) {
  1208. // console.log(data);
  1209. _this.fromList.taskId = data.data;
  1210. _this.fromList.processId = data.data;
  1211. // _this.fromList.resourceId = data.data;
  1212. _this.taskId = data.data;
  1213. // _this.fromList.taskId = data;
  1214. // _this.taskId = data;
  1215. let list = {
  1216. id: e,
  1217. // taskId:_this.formId,
  1218. processId: _this.fromList.taskId,
  1219. tableName: _this.request_form.processDefinitionKey,
  1220. };
  1221. _this.setUpdate(list);
  1222. }
  1223. },
  1224. //更新工作流接口
  1225. setUpdate(e) {
  1226. this.$http({
  1227. url: "/market/waf/updateBase",
  1228. method: "post",
  1229. headers: {
  1230. "Content-Type": "application/json",
  1231. },
  1232. data: e,
  1233. }).then((res) => {
  1234. this.fromList.taskId = res.data.body[0].taskId;
  1235. this.fromList.taskName = res.data.body[0].taskName;
  1236. // if (res.data.body.taskName === "起草") {
  1237. // this.isSync = res.data.body.isSync;
  1238. // } else {
  1239. // this.isSync = "1";
  1240. // }
  1241. if (res.data.result === 0) {
  1242. this.$message.success("工作流更新成功");
  1243. }
  1244. });
  1245. },
  1246. //处理按钮,开始工作流接口
  1247. clickHandles() {
  1248. this.getNextPath(this.fromList.resourceId || "");
  1249. console.log(this.fromList);
  1250. if (this.fromList.taskName == '发起考核' || this.fromList.taskName == '初评') {
  1251. if (this.fromList.accessoryList) {
  1252. this.fromList.accessoryIdList = []
  1253. this.fromList.accessoryList.map((item) => {
  1254. this.fromList.accessoryIdList.push(item.id);
  1255. })
  1256. }
  1257. this.fromList.content = JSON.stringify(this.$refs.form.model.content1);
  1258. this.$http({
  1259. url: "/market/HlwDskhProcess/update",
  1260. method: "post",
  1261. headers: {
  1262. "Content-Type": "application/json",
  1263. },
  1264. data: this.fromList,
  1265. }).then((res) => {
  1266. if (res.data.result === 0) {
  1267. this.$message.success("表单更新成功");
  1268. }
  1269. });
  1270. }
  1271. },
  1272. getNextPath(e) {
  1273. let list = {
  1274. fresourceId: this.requestForm.fresourceId, // 本地环境
  1275. processId: this.requestForm.processDefinitionKey,
  1276. // processId: "request_form_process",
  1277. // resourceId: e,
  1278. };
  1279. if (e) {
  1280. // this.propsList = [];
  1281. list.resourceId = e;
  1282. }
  1283. console.log(11111);
  1284. console.log(list);
  1285. console.log(11111);
  1286. this.$http({
  1287. url: "/market/waf/queryPath",
  1288. method: "post",
  1289. headers: {
  1290. "Content-Type": "application/json",
  1291. },
  1292. data: list,
  1293. }).then((res) => {
  1294. console.log(res);
  1295. console.log(this.fromList);
  1296. console.log(res.data.body);
  1297. console.log(res.data.body.nextShapes[0].multi);
  1298. if (res.data.body.nextShapes[0].multi) {
  1299. if (res.data.body.nextShapes[0].multi.multi === "true") {
  1300. console.log('这是mulit节点');
  1301. this.getLastName();
  1302. } else {
  1303. this.adminResourceId = ''
  1304. console.log('这不是mulit节点');
  1305. this.destroy = true;
  1306. this.handleStatus = true;
  1307. this.getMetirialType();
  1308. }
  1309. }
  1310. if (this.fromList.taskId || this.fromList.processId) {
  1311. this.adminResourceId = ''
  1312. console.log('这不是mulit节点');
  1313. this.destroy = true;
  1314. this.handleStatus = true;
  1315. this.getMetirialType();
  1316. } else {
  1317. this.$message.error("请先点击保存按钮");
  1318. }
  1319. });
  1320. },
  1321. //获取字典表常用意见
  1322. getMetirialType(e) {
  1323. this.$http({
  1324. url: "/market/cfgDataDict/queryList",
  1325. method: "post",
  1326. headers: {
  1327. "Content-Type": "application/json",
  1328. },
  1329. data: {
  1330. dictCodePks: "approval",
  1331. },
  1332. }).then((res) => {
  1333. this.commonlyList = res.data;
  1334. });
  1335. },
  1336. //处理关闭
  1337. handleCloses() {
  1338. // this.treeList = [];
  1339. // this.textarea = "";
  1340. this.handleStatus = false;
  1341. this.usernumber()
  1342. },
  1343. updateForm() {
  1344. this.dialogStatus = false;
  1345. this.handleCloses();
  1346. this.usernumber()
  1347. if (this.clickTagName == 'first') {
  1348. this.lableTable = this.firstlabel
  1349. this.getQueryList();
  1350. }
  1351. if (this.clickTagName == 'two') {
  1352. this.lableTable = this.twolabel
  1353. this.getQueryDone();
  1354. }
  1355. if (this.clickTagName == 'three') {
  1356. this.lableTable = this.threelabel
  1357. this.getMeLaunch()
  1358. }
  1359. },
  1360. clickTabMains(e) {
  1361. console.log(e);
  1362. this.clickTagName = e
  1363. this.pageNo = 1
  1364. this.$refs.TableList.page = 1;
  1365. if (this.clickTagName == 'first') {
  1366. this.lableTable = this.firstlabel
  1367. this.getQueryList();
  1368. }
  1369. if (this.clickTagName == 'two') {
  1370. this.lableTable = this.twolabel
  1371. this.getQueryDone();
  1372. }
  1373. if (this.clickTagName == 'three') {
  1374. this.lableTable = this.threelabel
  1375. this.getMeLaunch()
  1376. }
  1377. },
  1378. adminhandleSizeChange(val) {
  1379. console.log(`每页 ${val} 条`);
  1380. },
  1381. adminhandleCurrentChange(val) {
  1382. console.log(`当前页: ${val}`);
  1383. },
  1384. //我的待办
  1385. getQueryList(e, status) {
  1386. this.loading = true;
  1387. getTodoBase(this.pageNo, "", e || { tableName: this.tableName }).then((res) => {
  1388. if (status === 0) {
  1389. this.clickDemand("考核主题", res.data.data[0]);
  1390. }
  1391. this.lableTable.data = res.data.data;
  1392. this.lableTable.pageData.total = res.data.totalRecord;
  1393. this.tabListMain[0].number = res.data.totalRecord
  1394. this.loading = false;
  1395. });
  1396. },
  1397. //我的已办
  1398. getQueryDone() {
  1399. this.loading = true;
  1400. getDoneBase(this.pageNo, "", { tableName: this.tableName, }).then((res) => {
  1401. this.lableTable.data = res.data.data;
  1402. this.lableTable.pageData.total = res.data.totalRecord;
  1403. this.tabListMain[1].number = res.data.totalRecord
  1404. this.loading = false;
  1405. });
  1406. },
  1407. //我发起的
  1408. getMeLaunch() {
  1409. this.loading = true;
  1410. getInitiateBase(this.pageNo, "", { tableName: this.tableName, }).then((res) => {
  1411. this.lableTable.data = res.data.data;
  1412. this.lableTable.pageData.total = res.data.totalRecord;
  1413. this.tabListMain[2].number = res.data.totalRecord
  1414. this.loading = false;
  1415. });
  1416. },
  1417. usernumber() {
  1418. getInitiateBase(this.pageNo, "", { tableName: this.tableName, }).then((res) => {
  1419. this.tabListMain[2].number = res.data.totalRecord
  1420. });
  1421. getDoneBase(this.pageNo, "", { tableName: this.tableName, }).then((res) => {
  1422. this.tabListMain[1].number = res.data.totalRecord
  1423. });
  1424. getTodoBase(this.pageNo, "", { tableName: this.tableName }).then((res) => {
  1425. this.tabListMain[0].number = res.data.totalRecord
  1426. });
  1427. },
  1428. onInputFocus(i, v) {
  1429. let a = 0.00
  1430. console.log(a);
  1431. if (this.fromList.assessmentTemplate == '1') {
  1432. this.fromList.content1.tableData1.map((item, index) => {
  1433. a += parseFloat(item.score)
  1434. })
  1435. this.fromList.content1.tableData2.map((item, index) => {
  1436. a += parseFloat(item.score)
  1437. })
  1438. a = a / 2
  1439. this.fromList.content1.tableData3.map((item, index) => {
  1440. a += parseFloat(item.score)
  1441. })
  1442. this.fromList.content1.tableData4.map((item, index) => {
  1443. a += parseFloat(item.score)
  1444. })
  1445. this.fromList.content1.tableData5.map((item, index) => {
  1446. a -= parseFloat(item.score)
  1447. })
  1448. } else {
  1449. this.fromList.content1.tableData1.map((item, index) => {
  1450. a += parseFloat(item.score)
  1451. })
  1452. this.fromList.content1.tableData3.map((item, index) => {
  1453. a += parseFloat(item.score)
  1454. })
  1455. this.fromList.content1.tableData5.map((item, index) => {
  1456. a -= parseFloat(item.score)
  1457. })
  1458. }
  1459. console.log(a.toFixed(2));
  1460. this.$set(this.fromList, 'currentScore', a.toFixed(2))
  1461. },
  1462. onInputFocus1(i, v) {
  1463. if (v == '') {
  1464. this.fromList.content1.tableData1.map((item, index) => {
  1465. if (i == index) {
  1466. item.score = 0
  1467. }
  1468. })
  1469. }
  1470. this.onInputFocus()
  1471. },
  1472. onInputFocus2(i, v) {
  1473. if (v == '') {
  1474. this.fromList.content1.tableData2.map((item, index) => {
  1475. if (i == index) {
  1476. item.score = 0
  1477. }
  1478. })
  1479. }
  1480. this.onInputFocus()
  1481. },
  1482. onInputFocus3(i, v) {
  1483. if (v == '') {
  1484. this.fromList.content1.tableData3.map((item, index) => {
  1485. if (i == index) {
  1486. item.score = 0
  1487. }
  1488. })
  1489. }
  1490. let a = 0
  1491. this.fromList.content1.tableData3.map((item, index) => {
  1492. a += parseFloat(item.score)
  1493. })
  1494. if (a > 5) {
  1495. this.$message({
  1496. message: "总数不能大于5",
  1497. type: "error",
  1498. });
  1499. this.fromList.content1.tableData3.map((item, index) => {
  1500. if (i == index) {
  1501. item.score = 0
  1502. }
  1503. })
  1504. }
  1505. this.onInputFocus()
  1506. },
  1507. onInputFocus4(i, v) {
  1508. if (v == '') {
  1509. this.fromList.content1.tableData4.map((item, index) => {
  1510. if (i == index) {
  1511. item.score = 0
  1512. }
  1513. })
  1514. }
  1515. let a = 0
  1516. this.fromList.content1.tableData4.map((item, index) => {
  1517. a += parseFloat(item.score)
  1518. })
  1519. if (a > 5) {
  1520. this.$message({
  1521. message: "总数不能大于5",
  1522. type: "error",
  1523. });
  1524. this.fromList.content1.tableData4.map((item, index) => {
  1525. if (i == index) {
  1526. item.score = 0
  1527. }
  1528. })
  1529. }
  1530. this.onInputFocus()
  1531. },
  1532. onInputFocus5(i, v) {
  1533. if (v == '') {
  1534. this.fromList.content1.tableData5.map((item, index) => {
  1535. if (i == index) {
  1536. item.score = 0
  1537. }
  1538. })
  1539. }
  1540. let a = 0
  1541. this.fromList.content1.tableData5.map((item, index) => {
  1542. a += parseFloat(item.score)
  1543. })
  1544. if (a > 100) {
  1545. this.$message({
  1546. message: "总数不能大于100",
  1547. type: "error",
  1548. });
  1549. this.fromList.content1.tableData5.map((item, index) => {
  1550. if (i == index) {
  1551. item.score = 0
  1552. }
  1553. })
  1554. }
  1555. this.onInputFocus()
  1556. },
  1557. editX(row, index) {
  1558. console.log(this.fromList.content1.tableData1);
  1559. row.show = row.show ? false : true
  1560. console.log(row);
  1561. this.$set(this.fromList.content1.tableData1, index, row)
  1562. },
  1563. editv(row, index) {
  1564. row.show = row.show ? false : true
  1565. this.$set(this.fromList.content1.tableData1, index, row)
  1566. },
  1567. editw(row, index) {
  1568. row.show = row.show ? false : true
  1569. this.$set(this.fromList.content1.tableData2, index, row)
  1570. },
  1571. delectv(index, row) {
  1572. this.$confirm("即将删除数据, 是否删除?", "提示", {
  1573. confirmButtonText: "确定",
  1574. cancelButtonText: "取消",
  1575. type: "warning",
  1576. })
  1577. .then(() => {
  1578. this.fromList.content1.tableData1.splice(index, 1);
  1579. })
  1580. .catch(() => { });
  1581. },
  1582. delectw(index, row) {
  1583. this.$confirm("即将删除数据, 是否删除?", "提示", {
  1584. confirmButtonText: "确定",
  1585. cancelButtonText: "取消",
  1586. type: "warning",
  1587. })
  1588. .then(() => {
  1589. this.fromList.content1.tableData2.splice(index, 1);
  1590. })
  1591. .catch(() => { });
  1592. },
  1593. addNewHost1() {
  1594. this.fromList.content1.tableData1.push({
  1595. item: '',
  1596. detailed: '',
  1597. content: '',
  1598. principle: '',
  1599. deductMarks: '',
  1600. require: '',
  1601. show: true,
  1602. score: 0
  1603. })
  1604. },
  1605. addNewHost2() {
  1606. this.fromList.content1.tableData2.push({
  1607. item: '',
  1608. detailed: '',
  1609. content: '',
  1610. principle: '',
  1611. deductMarks: '',
  1612. require: '',
  1613. show: true,
  1614. score: 0
  1615. })
  1616. },
  1617. numDxsCheck(form, ws, key) {
  1618. // console.log(form);
  1619. // console.log(key);
  1620. if (key === undefined) {
  1621. key = "cost";
  1622. }
  1623. form[key] = form[key] + "";
  1624. //先把非数字的都替换掉,除了数字和.
  1625. form[key] = form[key].replace(/[^\d.]/g, "");
  1626. //必须保证第一个为数字而不是.
  1627. form[key] = form[key].replace(/^\./g, "");
  1628. //保证只有出现一个.而没有多个.
  1629. form[key] = form[key].replace(/\.{2,}/g, ".");
  1630. //保证.只出现一次,而不能出现两次以上
  1631. form[key] = form[key].replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
  1632. //只能输入4个小数
  1633. // let c = null;
  1634. let c = /^(\-)*(\d+)\.(\d{1}).*$/;
  1635. // switch (ws) {
  1636. // case 1:
  1637. // c = /^(\-)*(\d+)\.(\d).*$/;
  1638. // case 2:
  1639. // c = /^(\-)*(\d+)\.(\d\d).*$/;
  1640. // break;
  1641. // case 3:
  1642. // c = /^(\-)*(\d+)\.(\d\d\d).*$/;
  1643. // break;
  1644. // case 4:
  1645. // c = /^(\-)*(\d+)\.(\d\d\d\d).*$/;
  1646. // break;
  1647. // default:
  1648. // c = /^(\-)*(\d+)\.(\d\d).*$/;
  1649. // }
  1650. //只能输入两个小数
  1651. form[key] = form[key].replace(c, '$1$2.$3');
  1652. // console.log(form[key]);
  1653. }
  1654. },
  1655. }
  1656. </script>
  1657. <style lang="scss" scoped>
  1658. .copyClass {
  1659. display: flex;
  1660. }
  1661. .flex-header-text-tree {
  1662. width: 50%;
  1663. text-align: center;
  1664. }
  1665. ::v-deep .el-form-item {
  1666. width: 100%;
  1667. }
  1668. .active {
  1669. background-color: #f3faff;
  1670. }
  1671. .flex-common {
  1672. padding: 10px 5%;
  1673. font-size: 18px;
  1674. }
  1675. .flex-buttons {
  1676. background-color: #cde4f6;
  1677. border-color: #cde4f6;
  1678. color: #606266;
  1679. }
  1680. .flex-button {
  1681. margin-top: 10px;
  1682. margin-bottom: 10px;
  1683. ::v-deep .el-button--primary {
  1684. width: 222px;
  1685. }
  1686. }
  1687. .flex-left-header-text {
  1688. height: 40px;
  1689. line-height: 40px;
  1690. color: black;
  1691. padding-left: 10px;
  1692. background-color: #cde4f6;
  1693. font-size: 18px;
  1694. font-weight: bold;
  1695. }
  1696. .flex-right-text {
  1697. margin-right: 20px;
  1698. width: 50%;
  1699. }
  1700. .flex-handle {
  1701. width: 100%;
  1702. padding: 30px;
  1703. display: flex;
  1704. .flex-right {
  1705. width: 50%;
  1706. border: 1px solid #e1e1e1;
  1707. margin-left: 20px;
  1708. }
  1709. .flex-left {
  1710. width: 50%;
  1711. display: flex;
  1712. flex-direction: column;
  1713. .flex-left-header {
  1714. display: flex;
  1715. justify-content: space-around;
  1716. }
  1717. }
  1718. }
  1719. .table-title {
  1720. height: 50px;
  1721. line-height: 50px;
  1722. background-color: #f3faff;
  1723. font-size: 18px;
  1724. font-weight: bold;
  1725. }
  1726. ::v-deep .el-dialog {
  1727. margin-top: 0 !important;
  1728. }
  1729. ::v-deep .el-table__fixed-body-wrapper {
  1730. top: 50px !important;
  1731. }
  1732. .flex-box {
  1733. display: flex;
  1734. width: calc(100% - 40px);
  1735. border-radius: 20px;
  1736. background-color: #fff;
  1737. margin: 0 auto;
  1738. margin-top: 20px;
  1739. position: relative;
  1740. flex-direction: column;
  1741. .flex-load {
  1742. display: flex;
  1743. width: 100%;
  1744. position: relative;
  1745. margin: 1%;
  1746. border-bottom: 1px solid #e1e1e1;
  1747. justify-content: space-between;
  1748. }
  1749. .flex-header {
  1750. display: flex;
  1751. // width: 100%;
  1752. position: relative;
  1753. // height: 60px;
  1754. margin: 1%;
  1755. border-bottom: 1px solid #e1e1e1;
  1756. justify-content: space-between;
  1757. // ::v-deep .el-form-item {
  1758. // width: 30%;
  1759. // margin-right: 5%;
  1760. // }
  1761. .el-button {
  1762. width: 150px;
  1763. float: right;
  1764. height: 40px !important;
  1765. margin-right: 30px;
  1766. }
  1767. }
  1768. }
  1769. //设置子组件样式
  1770. ::v-deep .el-tabs__item {
  1771. padding: 0;
  1772. margin-right: 20px;
  1773. width: 166px;
  1774. text-align: center;
  1775. background-color: #d8eaf6;
  1776. color: black;
  1777. }
  1778. ::v-deep .is-active {
  1779. color: #fff;
  1780. background-color: #0583cd;
  1781. }
  1782. ::v-deep .el-select {
  1783. width: 100%
  1784. }
  1785. ::v-deep .el-tabs__active-bar {
  1786. display: none;
  1787. }
  1788. ::v-deep .el-tabs__nav-wrap::after {
  1789. display: none !important;
  1790. }
  1791. ::v-deep .el-form-item__label {
  1792. text-align: center;
  1793. }
  1794. .flex-form {
  1795. margin-top: 50px;
  1796. }
  1797. .flex-footer-botton {
  1798. display: flex;
  1799. justify-content: space-evenly;
  1800. }
  1801. </style>