123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <template>
- <a-card :bordered="false" v-show="visible" class="card" :title="modalTitle">
- <a-row :gutter="48" slot="extra">
- <a-col :md="48" :sm="48">
- <span class="table-page-search-submitButtons" style="float: right">
- <a-button style="margin-left: 8px" type="default" @click="handleCancel()">返回</a-button>
- </span>
- </a-col>
- </a-row>
- <detail-list title="" :col="2">
- <detail-list-item term="单号">{{ model.no }}</detail-list-item>
- <detail-list-item term="设备Id"><a @click="sbIdhandleDetail">{{ model.sbId }}</a></detail-list-item>
- <detail-list-item term="设备编号">{{ model.sbNo }}</detail-list-item>
- <detail-list-item term="设备名称">{{ model.sbName }}</detail-list-item>
- <detail-list-item term="报废原因">{{ model.reason }}</detail-list-item>
- <detail-list-item term="备注">{{ model.remark }}</detail-list-item>
- <detail-list-item term="状态">{{ BaseTool.Object.getField(this.statusMap,model.status) }}</detail-list-item>
- <detail-list-item term="申请人">{{ model.applyUserId }}</detail-list-item>
- <detail-list-item term="创建日期">{{ model.createdTime }}</detail-list-item>
- <detail-list-item term="更新日期">{{ model.updateTime }}</detail-list-item>
- </detail-list>
- <history ref="history" :audit="audit" :ok="handleCancel"></history>
- <!-- <history
- :audit="audit"
- :target-id="task.targetId"
- :process-instance-id="task.processInstanceId"
- :task-id="task.taskId"
- :ok="handleCancel"></history>-->
- </a-card>
- </template>
- <script>
- import DetailList from '@/components/tools/DetailList'
- import History from '@/views/activiti/History'
- const DetailListItem = DetailList.Item
- export default {
- name: 'SbScrapFormDetail',
- components: {
- DetailList,
- DetailListItem,
- History
- },
- props: {
- audit: {
- type: Boolean,
- default: true
- }
- },
- data () {
- return {
- confirmLoading: false,
- mdl: {},
- modalTitle: null,
- visible: false,
- // 下拉框map
- statusMap: {},
- task: {},
- model: {
- 'no': null,
- 'sbId': null,
- 'sbNo': null,
- 'sbName': null,
- 'reason': null,
- 'remark': null,
- 'processInstanceId': null,
- 'status': null,
- 'applyUserId': null,
- 'applyUserName': null,
- 'createdUserId': null,
- 'updateUserId': null,
- 'updateUserName': null,
- 'updateTime': null
- }
- }
- },
- created () {
- // 下拉框map
- this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.ACTIVITI_FORM_STATUS)
- },
- methods: {
- base (record, model) {
- console.log(record)
- console.log(model)
- this.visible = true
- this.modalTitle = '详情'
- this.task = record
- this.model = model
- model.id = record.targetId // 将targetId赋给model,带入history,用作提交
- const modal = this.$refs.history
- modal.base(model, this.task.taskId)
- },
- handleCancel () {
- this.visible = false
- this.confirmLoading = false
- this.$emit('ok')
- },
- sbIdhandleDetail () {
- const text = this.$router.resolve({
- name: 'SbInfo',
- query: { id: this.model.sbId }
- })
- // 打开一个新的页面
- window.open(text.href, '_blank')
- }
- }
- }
- </script>
|