综合办公系统
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

archiveForm.vue 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642
  1. <template>
  2. <div class="app-container">
  3. <el-row :gutter="20">
  4. <el-col :span="18" :xs="24">
  5. <h2 class="text-center">成果归档记录表</h2>
  6. <el-divider></el-divider>
  7. <el-form ref="form" :model="form" :rules="rules" label-width="120px">
  8. <el-form-item label="项目信息" prop="projectId">
  9. <el-button type="primary" size="mini" @click="openProject = true" v-if="taskName == '成果上传'">选择项目</el-button>
  10. <!-- <el-select v-model="form.projectId" filterable placeholder="请选择" @change="handleSelectProject"
  11. :disabled="taskName != '成果上传'" clearable>
  12. <el-option v-for="item in projectList" :key="item.value" :label="item.projectName" :value="item.projectId">
  13. </el-option>
  14. </el-select> -->
  15. <el-descriptions border v-if="isSelect" style="margin-top: 10px;" :column="2" direction="vertical">
  16. <el-descriptions-item label="项目名称" label-class-name="my-label">{{ chooseProject.projectName
  17. }}</el-descriptions-item>
  18. <el-descriptions-item label="项目编号" label-class-name="my-label">{{ chooseProject.projectNumber
  19. }}</el-descriptions-item>
  20. <el-descriptions-item label="甲方单位" label-class-name="my-label">{{ chooseProject.partyA.partyAName
  21. }}</el-descriptions-item>
  22. <el-descriptions-item label="合同编码" label-class-name="my-label">{{ contractCode
  23. }}</el-descriptions-item>
  24. <el-descriptions-item label="承担部门" label-class-name="my-label">{{
  25. chooseProject.undertakingDeptName
  26. }}</el-descriptions-item>
  27. <el-descriptions-item label="项目负责人" label-class-name="my-label">{{ chooseProject.projectLeaderUser
  28. ? chooseProject.projectLeaderUser.nickName : ''
  29. }}</el-descriptions-item>
  30. <el-descriptions-item label="技术负责人" label-class-name="my-label">{{
  31. chooseProject.technicalDirectorUser ? chooseProject.technicalDirectorUser.nickName :
  32. '' }}</el-descriptions-item>
  33. <el-descriptions-item label="质检审核员" label-class-name="my-label">{{
  34. chooseProject.qualityInspectorName
  35. }}</el-descriptions-item>
  36. <el-descriptions-item label="坐标经度" label-class-name="my-label">{{ chooseProject.kmlLng
  37. }}</el-descriptions-item>
  38. <el-descriptions-item label="坐标纬度" label-class-name="my-label">{{ chooseProject.kmlLat
  39. }}</el-descriptions-item>
  40. </el-descriptions>
  41. </el-form-item>
  42. <el-form-item label="归档状态">
  43. <el-tag :type="typeStyle(hasArchievement)">{{ typeText(hasArchievement) }}</el-tag>
  44. </el-form-item>
  45. <el-form-item label="成果提交日期" prop="submitTime">
  46. <el-date-picker clearable v-model="form.submitTime" type="date" value-format="yyyy-MM-dd"
  47. placeholder="请选择成果提交日期" :disabled="taskName != '成果上传'">
  48. </el-date-picker>
  49. </el-form-item>
  50. <el-form-item label="备注说明" prop="submitSituation">
  51. <el-input type="textarea" v-model="form.submitSituation" placeholder="请输入备注说明" :disabled="taskName != '成果上传'"
  52. :autosize="{ minRows: 4 }" />
  53. </el-form-item>
  54. <el-divider></el-divider>
  55. <el-form-item label="部门检查员检查" prop="produceComment">
  56. <el-input type="textarea" v-model="form.produceComment" placeholder="请输入部门检查员检查意见"
  57. :disabled="taskName != '部门检查'" :autosize="{ minRows: 4 }" />
  58. </el-form-item>
  59. <el-row>
  60. <el-col :span="6" :xs="24" :offset="12">
  61. <el-form-item label="签名:" label-width="120px" v-if="taskName != '成果上传'">
  62. <span class="auditor"> {{ form.produceUser ? form.produceUser.nickName : produceUser }}
  63. </span>
  64. </el-form-item>
  65. </el-col>
  66. <el-col :span="6">
  67. <el-form-item label="日期:" label-width="120px" v-if="taskName != '成果上传'">
  68. <span> {{ form.produceTime ? form.produceTime : produceTime }} </span>
  69. </el-form-item>
  70. </el-col>
  71. </el-row>
  72. <el-form-item label="资料接收时间" prop="receiveTime">
  73. <el-date-picker clearable v-model="form.receiveTime" type="date" value-format="yyyy-MM-dd"
  74. placeholder="请选择资料接收时间" :disabled="taskName != '质检审核'">
  75. </el-date-picker>
  76. </el-form-item>
  77. <el-form-item label="质量检查员审核" prop="qualityComment">
  78. <el-input type="textarea" v-model="form.qualityComment" placeholder="请输入质量检查员审核意见"
  79. :disabled="taskName != '质检审核'" :autosize="{ minRows: 4 }" />
  80. </el-form-item>
  81. <el-row>
  82. <el-col :span="6" :xs="24" :offset="12">
  83. <el-form-item label="签名:" label-width="120px" v-if="taskName != '成果上传' && taskName != '部门检查'">
  84. <span class="auditor"> {{ form.qualityUser ? form.qualityUser.nickName : qualityUser }}
  85. </span>
  86. </el-form-item>
  87. </el-col>
  88. <el-col :span="6">
  89. <el-form-item label="日期:" label-width="120px" v-if="taskName != '成果上传' && taskName != '部门检查'">
  90. <span> {{ form.qualityTime ? form.qualityTime : qualityTime }} </span>
  91. </el-form-item>
  92. </el-col>
  93. </el-row>
  94. <el-form-item label="技术质量部负责人审核" prop="deptComment">
  95. <el-input type="textarea" v-model="form.deptComment" placeholder="请输入技术质量部负责人审核意见"
  96. :disabled="taskName != '技术部审核'" :autosize="{ minRows: 4 }" />
  97. </el-form-item>
  98. <el-row>
  99. <el-col :span="6" :xs="24" :offset="12">
  100. <el-form-item label="签名:" label-width="120px" v-if="taskName == '技术部审核' || taskName == '成果归档'">
  101. <span class="auditor"> {{ form.deptUser ? form.deptUser.nickName : deptUser }}
  102. </span>
  103. </el-form-item>
  104. </el-col>
  105. <el-col :span="6">
  106. <el-form-item label="日期:" label-width="120px" v-if="taskName == '技术部审核' || taskName == '成果归档'">
  107. <span> {{ form.deptTime ? form.deptTime : deptTime }} </span>
  108. </el-form-item>
  109. </el-col>
  110. </el-row>
  111. <el-form-item label="资料管理">
  112. <el-button type="success" size="mini" @click="gotoFile" :disabled="taskName != '成果归档'">前往资料管理系统</el-button>
  113. </el-form-item>
  114. <el-form-item label="技术质量部归档" prop="archiveComment">
  115. <el-input type="textarea" v-model="form.archiveComment" placeholder="请输入技术质量部归档意见"
  116. :disabled="taskName != '成果归档'" :autosize="{ minRows: 4 }" />
  117. </el-form-item>
  118. <el-row>
  119. <el-col :span="6" :xs="24" :offset="12">
  120. <el-form-item label="签名:" label-width="120px" v-if="taskName == '成果归档'">
  121. <span class="auditor"> {{ form.archiveUser ? form.archiveUser.nickName : archiveUser }}
  122. </span>
  123. </el-form-item>
  124. </el-col>
  125. <el-col :span="6">
  126. <el-form-item label="归档日期:" label-width="120px" v-if="taskName == '成果归档'">
  127. <span> {{ form.archiveTime ? form.archiveTime : archiveTime }} </span>
  128. </el-form-item>
  129. </el-col>
  130. </el-row>
  131. </el-form>
  132. <div style="text-align: center;">
  133. <el-button type="primary" @click="submitForm" :disabled="taskName == '成果归档' && hasArchievement == false">提
  134. 交</el-button>
  135. </div>
  136. </el-col>
  137. <el-col :span="6" :xs="24" v-if="isFlow">
  138. <el-card>
  139. <h2 style="text-align: center;">流程进度</h2>
  140. <div>
  141. <flow :flowData="flowData" />
  142. </div>
  143. </el-card>
  144. </el-col>
  145. </el-row>
  146. <el-dialog :title="completeTitle" :visible.sync="completeOpen" width="60%" append-to-body>
  147. <el-form ref="taskForm" :model="taskForm">
  148. <el-form-item prop="targetKey">
  149. <flow-user v-if="checkSendUser" :checkType="checkType" @handleUserSelect="handleUserSelect"></flow-user>
  150. </el-form-item>
  151. </el-form>
  152. <span slot="footer" class="dialog-footer">
  153. <el-button @click="completeOpen = false">取 消</el-button>
  154. <el-button type="primary" @click="taskComplete">确 定</el-button>
  155. </span>
  156. </el-dialog>
  157. <el-dialog title="选择项目" :visible.sync="openProject" width="70%" append-to-body>
  158. <project-choose @chooseProject="confirmProject"></project-choose>
  159. </el-dialog>
  160. </div>
  161. </template>
  162. <script>
  163. import { parseTime } from "@/utils/ruoyi";
  164. import { listProject, getProject } from "@/api/oa/project/project";
  165. import { listArchive, getArchive, delArchive, addArchive, updateArchive } from "@/api/oa/archive/archive";
  166. import { listProjectContract } from "@/api/oa/contract/projectContract";
  167. import { getContract } from "@/api/oa/contract/contract";
  168. import { getUsersDeptLeaderByDept } from '@/api/system/post'
  169. import { complete, getNextFlowNode } from "@/api/flowable/todo";
  170. import FlowUser from '@/components/flow/User';
  171. import flow from '@/views/flowable/task/todo/detail/flow'
  172. import { flowXmlAndNode } from "@/api/flowable/definition";
  173. import { getUserByRole } from "@/api/system/role";
  174. import projectChoose from '@/views/flowable/form/components/chooseProject.vue';
  175. import { listAchievement } from "@/api/file/achievement";
  176. export default {
  177. components: {
  178. FlowUser,
  179. projectChoose,
  180. flow
  181. },
  182. props: {
  183. taskName: {
  184. type: String,
  185. required: true
  186. },
  187. taskForm: {
  188. type: Object,
  189. required: true
  190. },
  191. isFlow: {
  192. type: Boolean,
  193. default: true
  194. }
  195. },
  196. name: "Archive",
  197. data() {
  198. return {
  199. produceUser: '',
  200. qualityUser: '',
  201. deptUser: '',
  202. archiveUser: '',
  203. produceTime: undefined,
  204. qualityTime: undefined,
  205. deptTime: undefined,
  206. archiveTime: undefined,
  207. // 遮罩层
  208. loading: true,
  209. // 选中数组
  210. ids: [],
  211. // 非单个禁用
  212. single: true,
  213. // 非多个禁用
  214. multiple: true,
  215. // 显示搜索条件
  216. showSearch: true,
  217. // 总条数
  218. total: 0,
  219. // cmc成果归档表格数据
  220. archiveList: [],
  221. // 弹出层标题
  222. title: "",
  223. // 是否显示弹出层
  224. open: false,
  225. // 查询参数
  226. queryParams: {
  227. pageNum: 1,
  228. pageSize: 10,
  229. projectId: null,
  230. submitTime: null,
  231. submitSituation: null,
  232. locationLng: null,
  233. locationLat: null,
  234. produceInspector: null,
  235. qualityInspector: null,
  236. deptLeader: null,
  237. archiver: null,
  238. receiveTime: null,
  239. qualityTime: null,
  240. produceTime: null,
  241. deptTime: null,
  242. archiveTime: null,
  243. produceComment: null,
  244. qualityComment: null,
  245. deptComment: null,
  246. archiveComment: null
  247. },
  248. // 表单参数
  249. form: {
  250. submitTime: undefined,
  251. },
  252. // 表单校验
  253. rules: {
  254. },
  255. chooseProject: {},
  256. isSelect: false,
  257. openProject: false,
  258. formTotal: 0,
  259. flowData: {},
  260. projectList: [],
  261. contractCode: '',
  262. checkSendUser: false,
  263. completeOpen: false,
  264. completeTitle: '',
  265. checkType: 'single',
  266. hasArchievement: false,
  267. };
  268. },
  269. mounted() {
  270. this.initRules();
  271. this.initForm();
  272. if (this.$route.query.projectId) {
  273. getProject(this.$route.query.projectId).then(res => {
  274. if (res.data) {
  275. this.$set(this.form, 'projectId', res.data.projectId)
  276. this.handleSelectProject(res.data.projectId)
  277. }
  278. })
  279. }
  280. },
  281. created() {
  282. if (this.taskName == '部门检查') {
  283. this.produceUser = this.$store.getters.name;
  284. this.produceTime = parseTime(new Date(), '{y}-{m}-{d}')
  285. }
  286. else if (this.taskName == '质检审核') {
  287. this.qualityUser = this.$store.getters.name;
  288. this.qualityTime = parseTime(new Date(), '{y}-{m}-{d}')
  289. }
  290. else if (this.taskName == '技术部审核') {
  291. this.deptUser = this.$store.getters.name;
  292. this.deptTime = parseTime(new Date(), '{y}-{m}-{d}')
  293. }
  294. else if (this.taskName == '成果归档') {
  295. this.archiveUser = this.$store.getters.name;
  296. this.archiveTime = parseTime(new Date(), '{y}-{m}-{d}')
  297. }
  298. this.getProjectList();
  299. this.getList();
  300. if (this.isFlow) {
  301. flowXmlAndNode({ procInsId: this.taskForm.procInsId, deployId: this.taskForm.deployId }).then(res => {
  302. this.flowData = res.data;
  303. })
  304. }
  305. },
  306. methods: {
  307. // 初始化表单
  308. initForm() {
  309. getArchive(this.taskForm.formId).then(res => {
  310. if (this.isEmptyObject(res.data)) {
  311. this.formTotal = 0;
  312. this.form.applier = this.$store.getters.userId;
  313. this.form.submitTime = new Date();
  314. }
  315. else {
  316. this.formTotal = 1;
  317. this.form = res.data;
  318. if (res.data.projectId) {
  319. listAchievement({ projectId: res.data.projectId }).then(response => {
  320. if (response.total > 0)
  321. this.hasArchievement = true;
  322. else
  323. this.hasArchievement = false;
  324. });
  325. getProject(res.data.projectId).then(response => {
  326. this.chooseProject = response.data;
  327. this.isSelect = true;
  328. listProjectContract({ projectId: response.data.projectId }).then(res => {
  329. if (res.rows.length > 0) {
  330. for (let row of res.rows) {
  331. getContract(row.contractId).then(res => {
  332. if (res.data) {
  333. if (this.contractCode != '') {
  334. this.contractCode = this.contractCode + '、' + res.data.contractCode;
  335. } else {
  336. this.contractCode = res.data.contractCode;
  337. }
  338. }
  339. })
  340. }
  341. }
  342. else
  343. this.contractCode = '';
  344. })
  345. })
  346. }
  347. this.loading = false
  348. }
  349. })
  350. },
  351. initRules() {
  352. if (this.taskName == '成果上传') {
  353. this.rules = {
  354. submitTime: [
  355. { required: true, message: '请选择成果提交日期', trigger: 'change' }
  356. ]
  357. }
  358. } else if (this.taskName == '部门检查') {
  359. this.rules = {
  360. produceComment: [
  361. { required: true, message: '请填写检查意见', trigger: 'blur' }
  362. ]
  363. }
  364. } else if (this.taskName == '质检审核') {
  365. this.rules = {
  366. receiveTime: [
  367. { required: true, message: '请选择资料接收时间', trigger: 'change' }
  368. ],
  369. qualityComment: [
  370. { required: true, message: '请填写审核意见', trigger: 'blur' }
  371. ]
  372. }
  373. } else if (this.taskName == '技术部审核') {
  374. this.rules = {
  375. deptComment: [
  376. { required: true, message: '请填写审核意见', trigger: 'blur' }
  377. ]
  378. }
  379. }
  380. },
  381. /** 查询cmc成果归档列表 */
  382. getList() {
  383. this.loading = true;
  384. listArchive(this.queryParams).then(response => {
  385. this.archiveList = response.rows;
  386. this.total = response.total;
  387. this.loading = false;
  388. });
  389. },
  390. // 取消按钮
  391. cancel() {
  392. this.open = false;
  393. this.reset();
  394. },
  395. // 查询项目列表
  396. getProjectList() {
  397. this.loading = true
  398. listProject({
  399. pageNum: 1,
  400. pageSize: 99999999
  401. }).then(response => {
  402. this.projectList = response.rows;
  403. })
  404. },
  405. // 选择项目
  406. handleSelectProject(val) {
  407. if (val != "" && val != undefined && val != null) {
  408. getProject(val).then(response => {
  409. this.chooseProject = response.data;
  410. this.isSelect = true;
  411. listProjectContract({ projectId: response.data.projectId }).then(res => {
  412. if (res.rows.length > 0) {
  413. for (let row of res.rows) {
  414. getContract(row.contractId).then(res => {
  415. if (res.data) {
  416. if (this.contractCode != '') {
  417. this.contractCode = this.contractCode + '、' + res.data.contractCode;
  418. } else {
  419. this.contractCode = res.data.contractCode;
  420. }
  421. }
  422. })
  423. }
  424. }
  425. else
  426. this.contractCode = '';
  427. })
  428. })
  429. } else {
  430. this.isSelect = false
  431. }
  432. },
  433. isEmptyObject(obj) {
  434. for (var key in obj) {
  435. if (obj.hasOwnProperty(key)) {
  436. return false;
  437. }
  438. }
  439. return true;
  440. },
  441. // 用户信息选中数据
  442. handleUserSelect(selection) {
  443. if (selection) {
  444. //不多选
  445. this.$set(this.taskForm.variables, "approval", selection.userId.toString());
  446. }
  447. },
  448. /** 用户审批任务 */
  449. taskComplete() {
  450. if (!this.taskForm.variables && this.checkSendUser) {
  451. this.$modal.msgError("请选择流程接收人员!");
  452. return;
  453. }
  454. if (this.taskForm) {
  455. complete(this.taskForm).then(response => {
  456. this.$modal.msgSuccess(response.msg);
  457. this.$emit('goBack')
  458. });
  459. }
  460. },
  461. // 表单重置
  462. reset() {
  463. this.form = {
  464. archiveId: null,
  465. projectId: null,
  466. submitTime: null,
  467. submitSituation: null,
  468. locationLng: null,
  469. locationLat: null,
  470. produceInspector: null,
  471. qualityInspector: null,
  472. deptLeader: null,
  473. archiver: null,
  474. receiveTime: null,
  475. qualityTime: null,
  476. produceTime: null,
  477. deptTime: null,
  478. archiveTime: null,
  479. produceComment: null,
  480. qualityComment: null,
  481. deptComment: null,
  482. archiveComment: null
  483. };
  484. this.resetForm("form");
  485. },
  486. /** 搜索按钮操作 */
  487. handleQuery() {
  488. this.queryParams.pageNum = 1;
  489. this.getList();
  490. },
  491. /** 重置按钮操作 */
  492. resetQuery() {
  493. this.resetForm("queryForm");
  494. this.handleQuery();
  495. },
  496. // 多选框选中数据
  497. handleSelectionChange(selection) {
  498. this.ids = selection.map(item => item.archiveId)
  499. this.single = selection.length !== 1
  500. this.multiple = !selection.length
  501. },
  502. /** 新增按钮操作 */
  503. handleAdd() {
  504. this.reset();
  505. this.open = true;
  506. this.title = "添加cmc成果归档";
  507. },
  508. /** 修改按钮操作 */
  509. handleUpdate(row) {
  510. this.reset();
  511. const archiveId = row.archiveId || this.ids
  512. getArchive(archiveId).then(response => {
  513. this.form = response.data;
  514. this.open = true;
  515. this.title = "修改cmc成果归档";
  516. });
  517. },
  518. /** 提交按钮 */
  519. submitForm() {
  520. this.$refs["form"].validate(valid => {
  521. if (valid) {
  522. if (this.formTotal != 0) {
  523. updateArchive(this.form).then(response => {
  524. this.$modal.msgSuccess("修改成功");
  525. this.open = false;
  526. this.getList();
  527. });
  528. const params = { taskId: this.taskForm.taskId };
  529. getNextFlowNode(params).then(res => {
  530. if (this.taskName == '成果上传') {
  531. const params = { taskId: this.taskForm.taskId };
  532. this.checkSendUser = true;
  533. this.completeOpen = true;
  534. this.completeTitle = "流程审批";
  535. }
  536. if (this.taskName == '部门检查') {
  537. let approvalList = this.chooseProject.qualityInspector.split(',')
  538. this.$set(this.taskForm.variables, "approvalList", approvalList);
  539. complete(this.taskForm).then(response => {
  540. this.$modal.msgSuccess(response.msg);
  541. this.$emit('goBack')
  542. });
  543. }
  544. if (this.taskName == '质检审核') {
  545. getUsersDeptLeaderByDept({ deptId: 110 }).then(res => {
  546. let userId = res.data.userId;
  547. this.$set(this.taskForm.variables, "approval", userId);
  548. complete(this.taskForm).then(response => {
  549. this.$modal.msgSuccess(response.msg);
  550. this.$emit('goBack')
  551. });
  552. });
  553. }
  554. if (this.taskName == '技术部审核') {
  555. getUserByRole({ roleId: 6 }).then(result => {
  556. this.$set(this.taskForm.variables, "approval", result.data[0]);
  557. complete(this.taskForm).then(response => {
  558. this.$modal.msgSuccess(response.msg);
  559. this.$emit('goBack')
  560. });
  561. })
  562. }
  563. if (this.taskName == '成果归档') {
  564. complete(this.taskForm).then(response => {
  565. this.$modal.msgSuccess(response.msg);
  566. this.$emit('goBack')
  567. });
  568. }
  569. })
  570. } else {
  571. this.form.archiveId = this.taskForm.formId;
  572. addArchive(this.form).then(response => {
  573. this.$modal.msgSuccess("新增成功");
  574. this.open = false;
  575. this.getList();
  576. });
  577. const params = { taskId: this.taskForm.taskId };
  578. getNextFlowNode(params).then(res => {
  579. this.checkSendUser = true;
  580. this.completeOpen = true;
  581. this.completeTitle = "流程审批";
  582. })
  583. }
  584. }
  585. });
  586. },
  587. /** 删除按钮操作 */
  588. handleDelete(row) {
  589. const archiveIds = row.archiveId || this.ids;
  590. this.$modal.confirm('是否确认删除cmc成果归档编号为"' + archiveIds + '"的数据项?').then(function () {
  591. return delArchive(archiveIds);
  592. }).then(() => {
  593. this.getList();
  594. this.$modal.msgSuccess("删除成功");
  595. }).catch(() => { });
  596. },
  597. /** 导出按钮操作 */
  598. handleExport() {
  599. this.download('oa/archive/export', {
  600. ...this.queryParams
  601. }, `archive_${new Date().getTime()}.xlsx`)
  602. },
  603. confirmProject(val) {
  604. if (val.length > 1) {
  605. this.$message.error('请选择一个项目');
  606. return
  607. } else if (val.length == 1) {
  608. this.chooseProject = val[0]
  609. this.isSelect = true
  610. this.form.projectId = val[0].projectId
  611. }
  612. this.openProject = false;
  613. listAchievement({ projectId: this.form.projectId }).then(response => {
  614. if (response.total > 0)
  615. this.hasArchievement = true;
  616. else
  617. this.hasArchievement = false;
  618. });
  619. },
  620. gotoFile() {
  621. this.$router.push({ path: '/file' })
  622. },
  623. typeText(flag) {
  624. if (flag == true)
  625. return '已归档'
  626. else
  627. return '未归档'
  628. },
  629. typeStyle(flag) {
  630. if (flag == true)
  631. return 'success'
  632. else
  633. return 'warning'
  634. }
  635. }
  636. };
  637. </script>
  638. <style lang="scss" scoped>
  639. @import "@/assets/styles/element-reset.scss";
  640. </style>