Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -39,6 +39,8 @@
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
@@ -67,6 +69,8 @@
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
@@ -96,6 +100,8 @@
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
@@ -115,6 +121,41 @@
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('ImplementationDate')">{{$t('ImplementationDate')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="'ImplementationDate'">
|
||||
<a-date-picker class="box-input"
|
||||
:placeholder="$t('PleaseSelect')+$t('ImplementationDate')"
|
||||
@change="dateChange({db_field_name:'xin1Che1Xing2Shi2Shi1Ri4Qi1'})"
|
||||
format="YYYY-MM-DD"
|
||||
v-model="formInline.xin1Che1Xing2Shi2Shi1Ri4Qi1"
|
||||
:disabled="false"
|
||||
style="width: 100%"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('vehicleInProductionDate')">{{$t('vehicleInProductionDate')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="'vehicleInProductionDate'">
|
||||
<a-date-picker class="box-input"
|
||||
:placeholder="$t('PleaseSelect')+$t('vehicleInProductionDate')"
|
||||
@change="dateChange({db_field_name:'implementTime'})"
|
||||
format="YYYY-MM-DD"
|
||||
v-model="formInline.implementTime"
|
||||
:disabled="false"
|
||||
style="width: 100%"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
@@ -122,6 +163,7 @@
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import moment from 'moment'
|
||||
|
||||
export default {
|
||||
name: 'batSetting',
|
||||
@@ -159,6 +201,12 @@
|
||||
},
|
||||
handleOk() {
|
||||
let ids = JSON.parse(JSON.stringify(this.ids))
|
||||
let formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||
Object.keys(formInline).forEach(res => {
|
||||
if (formInline[res] instanceof Array) {
|
||||
formInline[res] = formInline[res].join(',')
|
||||
}
|
||||
})
|
||||
let query = {
|
||||
ids: ids.join(','),
|
||||
...this.formInline
|
||||
@@ -185,6 +233,9 @@
|
||||
this.formInline = { ...this.formInline }
|
||||
this.$refs.ruleForm.validateField([value])
|
||||
})
|
||||
},
|
||||
dateChange(item) {
|
||||
this.formInline[item.db_field_name] = this.formInline[item.db_field_name] ? moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD') : ''
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -246,7 +297,7 @@
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 84px;
|
||||
width: 104px;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
@click="urlClick(queryForm[item.value])"
|
||||
v-if="item.type == 1"
|
||||
>{{queryForm[item.value]}}</span>
|
||||
<span class="text-field-right" :title="queryForm[item.value]"
|
||||
|
||||
<span class="text-field-right" v-else :title="queryForm[item.value]"
|
||||
>{{queryForm[item.value]}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -14,11 +14,48 @@
|
||||
v-if="item.type == 1"
|
||||
>{{queryForm[item.value]}}</span>
|
||||
|
||||
<span class="text-field-right text-field-right-url"
|
||||
@click="clickButtonToUpload(queryForm[item.value])"
|
||||
v-if="item.type == 2 && queryForm[item.value]"
|
||||
>{{ $t('viewFile') }}</span>
|
||||
|
||||
<span class="text-field-right"
|
||||
:title="queryForm[item.value]" v-else
|
||||
>{{queryForm[item.value]}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<a-modal
|
||||
:title="$t('deliverableTemplate')"
|
||||
:width="600"
|
||||
:visible="visibleFile"
|
||||
:maskClosable="false"
|
||||
@cancel="visibleFile = false"
|
||||
>
|
||||
<template slot="footer">
|
||||
<a-button key="back" @click="visibleFile = false">
|
||||
{{$t('cancel')}}
|
||||
</a-button>
|
||||
</template>
|
||||
<a-table
|
||||
class="table"
|
||||
:columns="columnsFile"
|
||||
:pagination="false"
|
||||
:scroll="{x:500,y: 400}"
|
||||
:data-source="dataSourceFile"
|
||||
:loading="loading"
|
||||
>
|
||||
<span slot="fileOperation" slot-scope="record">
|
||||
<a class="text" @click="pdfPreview(record)"
|
||||
:disabled="record.fileSuffix == '.pdf' || record.fileSuffix == '.docx'
|
||||
|| record.fileSuffix == '.xlsx' || record.fileSuffix == '.xls' ? false : true">
|
||||
{{$t('See')}}
|
||||
</a>
|
||||
<a class="text" @click="download(record)">
|
||||
{{ $t('download') }}
|
||||
</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
<!--
|
||||
@@ -29,6 +66,7 @@
|
||||
-->
|
||||
<script>
|
||||
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
|
||||
import { Base64 } from 'js-base64'
|
||||
|
||||
export default {
|
||||
name: 'standardContent',
|
||||
@@ -50,17 +88,76 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
queryForm: {}
|
||||
queryForm: {},
|
||||
visibleFile: false,
|
||||
dataSourceFile: [],
|
||||
loading: false,
|
||||
columnsFile: [
|
||||
{
|
||||
title: this.$t('deliverableTemplate'),
|
||||
dataIndex: 'fileName',
|
||||
align: 'center',
|
||||
width: 260,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
align: 'center',
|
||||
width: 130,
|
||||
scopedSlots: { customRender: 'fileOperation' }
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.queryForm = this.standardContentQuery
|
||||
console.log(this.queryForm)
|
||||
},
|
||||
methods: {
|
||||
urlClick(val) {
|
||||
if (val) {
|
||||
window.open(val)
|
||||
}
|
||||
},
|
||||
pdfPreview(fileQuery) {
|
||||
let fileName = fileQuery.fileName
|
||||
let index1 = fileName.lastIndexOf('.')
|
||||
let index2 = fileName.length
|
||||
let fileSuffix = fileName.substring(index1, index2)
|
||||
if (fileSuffix == '.pdf') {
|
||||
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id))
|
||||
} else if (fileSuffix == '.docx') {
|
||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
|
||||
window.open(url, '_blank')
|
||||
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|
||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
|
||||
window.open(url, '_blank')
|
||||
} else {
|
||||
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
|
||||
}
|
||||
},
|
||||
download(item) {
|
||||
downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id })
|
||||
},
|
||||
clickButtonToUpload(item) {
|
||||
this.loading = true
|
||||
this.visibleFile = true
|
||||
getAction('sys/common/getFileInfos', { id: item }).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataSourceFile = res.result
|
||||
this.dataSourceFile.forEach((val) => {
|
||||
let fileName = val.fileName
|
||||
let index1 = fileName.lastIndexOf('.')
|
||||
let index2 = fileName.length
|
||||
let fileSuffix = fileName.substring(index1, index2)
|
||||
val.fileSuffix = fileSuffix
|
||||
})
|
||||
this.loading = false
|
||||
} else {
|
||||
this.dataSourceFile = []
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@
|
||||
}
|
||||
getAction(this.url.queryProjectLawsInventoryInfoById, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.queryProject = res.result.projectLawsInventory || {}
|
||||
this.queryProject = res.result || {}
|
||||
this.loading = false
|
||||
} else {
|
||||
this.queryProject = {}
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
}
|
||||
getAction(this.url.queryProjectLawsInventoryInfoById, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.queryProject = res.result.projectLawsInventory || {}
|
||||
this.queryProject = res.result || {}
|
||||
this.loading = false
|
||||
} else {
|
||||
this.queryProject = {}
|
||||
|
||||
Reference in New Issue
Block a user