Browse Source

2024.12.23 UI优化

java8
yuejiayang 1 year ago
parent
commit
c2b5680ea0
  1. 4
      package.json
  2. 11
      src/views/common/login.vue
  3. 100
      src/views/modules/auth/authInquiry.vue
  4. 37
      src/views/modules/eam/com_project_proof_record.vue
  5. 24
      src/views/modules/eam/eamProjectInfoForUploads.vue
  6. 47
      src/views/modules/eam/eamProjectPartInfo.vue
  7. 15
      src/views/modules/oss/ossComponents.vue

4
package.json

@ -14,6 +14,8 @@
"build": "gulp" "build": "gulp"
}, },
"dependencies": { "dependencies": {
"@babel/plugin-transform-runtime": "^7.25.9",
"@babel/runtime": "^7.26.0",
"@vue-office/docx": "^1.6.2", "@vue-office/docx": "^1.6.2",
"@vue-office/excel": "^1.7.11", "@vue-office/excel": "^1.7.11",
"@vue/composition-api": "^1.7.2", "@vue/composition-api": "^1.7.2",
@ -29,7 +31,9 @@
"gulp-load-plugins": "2.0.5", "gulp-load-plugins": "2.0.5",
"gulp-replace": "1.0.0", "gulp-replace": "1.0.0",
"gulp-shell": "0.8.0", "gulp-shell": "0.8.0",
"jspdf": "^2.5.2",
"lodash": "4.17.5", "lodash": "4.17.5",
"mammoth": "^1.8.0",
"moment": "^2.30.1", "moment": "^2.30.1",
"node-sass": "4.13.1", "node-sass": "4.13.1",
"npm": "^6.14.6", "npm": "^6.14.6",

11
src/views/common/login.vue

@ -94,7 +94,16 @@ import { getUUID } from '@/utils'
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$cookie.set('token', data.token) this.$cookie.set('token', data.token)
this.$router.replace({ name: 'home' })
const prevLink = document.referrer;
console.log('prevLink',prevLink)
// if($.trim(prevLink)==='') {
this.$router.replace({name: 'home'})
// }
// if(prevLink.indexOf('www.example.com')===-1){ //
// location.href = 'www.example.com/index.html';
// }
this.$i18n.locale=data.language this.$i18n.locale=data.language
localStorage.setItem('locale', data.language) localStorage.setItem('locale', data.language)
localStorage.setItem('refresh', "0") localStorage.setItem('refresh', "0")

100
src/views/modules/auth/authInquiry.vue

@ -242,6 +242,12 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<!-- 询价明细 相关文档 -->
<el-tab-pane label="相关文档" name="inquiryDocument">
<oss-components label="申请单号" style="margin-top: 5px" height="44vh" :columns="ossColumns" :order-ref1="inquiryCurrentRow.site" :order-ref2="inquiryCurrentRow.id"
:rfq-no="inquiryCurrentRow.rfqNo">
</oss-components>
</el-tab-pane>
</el-tabs> </el-tabs>
<el-dialog title="申请单审核" :visible.sync="reviewFlag" width="520px" :close-on-click-modal="false" <el-dialog title="申请单审核" :visible.sync="reviewFlag" width="520px" :close-on-click-modal="false"
@ -303,6 +309,7 @@ import {EventBus} from "../../../main";
import {partInformationSearch} from "../../../api/part/partInformation"; import {partInformationSearch} from "../../../api/part/partInformation";
import quotationUpload from "../quote/quotation_upload.vue"; import quotationUpload from "../quote/quotation_upload.vue";
import {updateAuthHist} from "../../../api/auth/auth"; import {updateAuthHist} from "../../../api/auth/auth";
import OssComponents from "../oss/ossComponents.vue";
export default { export default {
computed: { computed: {
@ -326,6 +333,7 @@ export default {
// }, // },
}, },
components: { components: {
OssComponents,
quotationUpload, quotationUpload,
DictDataSelect, DictDataSelect,
Chooselist Chooselist
@ -958,6 +966,98 @@ export default {
columnWidth: 80 columnWidth: 80
} }
], ],
ossColumns:[
{
userId: this.$store.state.user.name,
functionId: 103001,
serialNumber: '103001Table2FileName',
tableId: '103001Table2',
tableName: '文件信息表',
columnProp: 'fileName',
headerAlign: 'center',
align: 'center',
columnLabel: '文件名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 140
},
{
userId: this.$store.state.user.name,
functionId: 103001,
serialNumber: '103001Table2FileRemark',
tableId: '103001Table2',
tableName: '文件信息表',
columnProp: 'fileRemark',
headerAlign: 'center',
align: 'center',
columnLabel: '备注',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 240
},
// {
// userId: this.$store.state.user.name,
// functionId: 103001,
// serialNumber: '103001Table2OrderRef3',
// tableId: '103001Table2',
// tableName: '',
// columnProp: 'orderRef3',
// headerAlign: 'center',
// align: 'center',
// columnLabel: '',
// columnHidden: false,
// columnImage: false,
// columnSortable: false,
// sortLv: 0,
// status: true,
// fixed: '',
// columnWidth: 120
// },
{
userId: this.$store.state.user.name,
functionId: 103001,
serialNumber: '103001Table2CreateDate',
tableId: '103001Table2',
tableName: '文件信息表',
columnProp: 'createDate',
headerAlign: 'center',
align: 'center',
columnLabel: '上传时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 140
},
{
userId: this.$store.state.user.name,
functionId: 103001,
serialNumber: '103001Table2CreatedBy',
tableId: '103001Table2',
tableName: '文件信息表',
columnProp: 'createdBy',
headerAlign: 'center',
align: 'center',
columnLabel: '上传人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 140
}
],
// ======== ======== // ======== ========
rules: { rules: {
bu: [ bu: [

37
src/views/modules/eam/com_project_proof_record.vue

@ -14,6 +14,7 @@
ref="proofingTable" ref="proofingTable"
@row-click="proofDocumentClickRow" @row-click="proofDocumentClickRow"
@current-change="changeCurrentRow" @current-change="changeCurrentRow"
:row-class-name="tableRowClassName"
v-loading="dataListLoading"> v-loading="dataListLoading">
<el-table-column <el-table-column
header-align="center" header-align="center"
@ -39,16 +40,9 @@
:min-width="item.columnWidth" :min-width="item.columnWidth"
:label="item.columnLabel"> :label="item.columnLabel">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.allUploaded === 'Y'">
<span v-if="!item.columnHidden" style="color: #0033ff;">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</div>
<div v-else>
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span> <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span> style="width: 100px; height: 80px"/></span>
</div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -67,6 +61,7 @@
@row-click="uploadDocumentClickRow" @row-click="uploadDocumentClickRow"
@current-change="changeCurrentRow1" @current-change="changeCurrentRow1"
:row-style="rowStyle" :row-style="rowStyle"
:row-class-name="tableRowClassName"
v-loading="dataListLoading"> v-loading="dataListLoading">
<el-table-column <el-table-column
header-align="center" header-align="center"
@ -83,14 +78,14 @@
</el-table-column> </el-table-column>
<el-table-column label="序号" type="index" align="center" :index="indexMethod"> <el-table-column label="序号" type="index" align="center" :index="indexMethod">
<template slot-scope="scope"> <template slot-scope="scope">
<span :style="{ color: scope.row.uploadedFlag === 'Y' ? 'green' : '' }">
<span>
{{ scope.$index + 1 }} {{ scope.$index + 1 }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="文档类型" align="center"> <el-table-column label="文档类型" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span :style="{ color: scope.row.uploadedFlag === 'Y' ? '#029315' : '' }">
<span>
{{ getCombinedDocumentType(scope.row) }} {{ getCombinedDocumentType(scope.row) }}
</span> </span>
</template> </template>
@ -106,16 +101,9 @@
:min-width="item.columnWidth" :min-width="item.columnWidth"
:label="item.columnLabel"> :label="item.columnLabel">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.uploadedFlag === 'Y'">
<span v-if="!item.columnHidden" style="color: #029315;">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</div>
<div v-else>
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span> <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span> style="width: 100px; height: 80px"/></span>
</div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -2002,11 +1990,26 @@
document.body.removeChild(linkNode) document.body.removeChild(linkNode)
}) })
}, },
tableRowClassName ({row, rowIndex}) {
if (row.allUploaded === 'Y') {
return 'rows-productions'
}
if (row.status === '正式量产' || row.uploadedFlag === 'Y') {
return 'row-production'
}
return ''
},
} }
}; };
</script> </script>
<style scoped>
<style>
.row-production {
background-color: rgb(185, 244, 250) !important;
}
.rows-productions {
background-color: rgb(251, 254, 197) !important;
}
.red-text /deep/ .el-input__inner { .red-text /deep/ .el-input__inner {
color: red !important; /* 设置文字为红色 */ color: red !important; /* 设置文字为红色 */
} }

24
src/views/modules/eam/eamProjectInfoForUploads.vue

@ -175,6 +175,7 @@
ref="projectAllDocumentDocumentTable" ref="projectAllDocumentDocumentTable"
@row-click="projectAllDocumentClickRow" @row-click="projectAllDocumentClickRow"
:row-style="rowStyle" :row-style="rowStyle"
:row-class-name="tableRowClassName"
v-loading="dataListLoading"> v-loading="dataListLoading">
<el-table-column <el-table-column
v-for="(item,index) in columnProjectAllDocumentList" :key="index" v-for="(item,index) in columnProjectAllDocumentList" :key="index"
@ -187,21 +188,9 @@
:min-width="item.columnWidth" :min-width="item.columnWidth"
:label="item.columnLabel"> :label="item.columnLabel">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.status === '正式量产'">
<span v-if="!item.columnHidden" style="color: #7fa103;">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</div>
<div v-else-if="scope.row.uploadedFlag === 'Y'">
<span v-if="!item.columnHidden" style="color: #029315;">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</div>
<div v-else>
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span> <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span> style="width: 100px; height: 80px"/></span>
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -2465,11 +2454,20 @@ export default {
this.authUpdate = !updateFlag this.authUpdate = !updateFlag
this.authDelete = !deleteFlag this.authDelete = !deleteFlag
}, },
tableRowClassName ({row, rowIndex}) {
if (row.status === '正式量产' || row.uploadedFlag === 'Y') {
return 'row-production'
}
return ''
},
}, },
}; };
</script> </script>
<style scoped>
<style>
.row-production {
background-color: rgb(185, 244, 250) !important;
}
.card-item { .card-item {
cursor: pointer; cursor: pointer;
margin-bottom: 20px; margin-bottom: 20px;

47
src/views/modules/eam/eamProjectPartInfo.vue

@ -172,6 +172,7 @@
highlight-current-row highlight-current-row
@row-click="proofingClickRow" @row-click="proofingClickRow"
@current-change="changeCurrentRow" @current-change="changeCurrentRow"
:row-class-name="tableRowClassName"
border border
style="width: 100%;"> style="width: 100%;">
<el-table-column <el-table-column
@ -190,10 +191,10 @@
{{ scope.row[item.columnProp] }} {{ scope.row[item.columnProp] }}
</span> </span>
</div> </div>
<div v-else-if="scope.row.status === '正式量产'">
<span v-if="!item.columnHidden" style="color: #7fa103;">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
<div v-else-if="item.columnProp === 'projectCategory'">
<span :style="{ color: scope.row.projectCategory === 'High Risk' ? 'rgb(255, 62, 62)' : (scope.row.projectCategory === 'Sustaining' ? 'rgb(34, 254, 4)' : 'rgb(255,224,89)') , fontSize: '14px'}">
{{ scope.row[item.columnProp] }}
</span>
</div> </div>
<div v-else> <div v-else>
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span> <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
@ -306,6 +307,7 @@
ref="proofDocumentTable" ref="proofDocumentTable"
@row-click="projectOtherDocumentClickRow" @row-click="projectOtherDocumentClickRow"
@current-change="changeCurrentRow1" @current-change="changeCurrentRow1"
:row-class-name="tableRowClassName"
v-loading="dataListLoading"> v-loading="dataListLoading">
<el-table-column <el-table-column
header-align="center" header-align="center"
@ -322,14 +324,14 @@
</el-table-column> </el-table-column>
<el-table-column label="序号" type="index" align="center" :index="indexMethod"> <el-table-column label="序号" type="index" align="center" :index="indexMethod">
<template slot-scope="scope"> <template slot-scope="scope">
<span :style="{ color: scope.row.uploadedFlag === 'Y' ? 'green' : '' }">
<span>
{{ scope.$index + 1 }} {{ scope.$index + 1 }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="文档类型" align="center"> <el-table-column label="文档类型" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span :style="{ color: scope.row.uploadedFlag === 'Y' ? '#029315' : '' }">
<span>
{{ getCombinedDocumentType(scope.row) }} {{ getCombinedDocumentType(scope.row) }}
</span> </span>
</template> </template>
@ -345,16 +347,9 @@
:min-width="item.columnWidth" :min-width="item.columnWidth"
:label="item.columnLabel"> :label="item.columnLabel">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.uploadedFlag === 'Y'">
<span v-if="!item.columnHidden" style="color: #029315;">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</div>
<div v-else>
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span> <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span> style="width: 100px; height: 80px"/></span>
</div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -368,7 +363,8 @@
:height="this.height + 50" :height="this.height + 50"
ref="projectAllDocumentDocumentTable" ref="projectAllDocumentDocumentTable"
@row-click="projectAllDocumentClickRow" @row-click="projectAllDocumentClickRow"
v-loading="dataListLoading">
v-loading="dataListLoading"
:row-class-name="tableRowClassName">
<el-table-column <el-table-column
header-align="center" header-align="center"
fixed="left" fixed="left"
@ -382,14 +378,14 @@
</el-table-column> </el-table-column>
<el-table-column label="序号" type="index" align="center" :index="indexMethod"> <el-table-column label="序号" type="index" align="center" :index="indexMethod">
<template slot-scope="scope"> <template slot-scope="scope">
<span :style="{ color: scope.row.uploadedFlag === 'Y' ? 'green' : '' }">
<span>
{{ scope.$index + 1 }} {{ scope.$index + 1 }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="文档类型" align="center"> <el-table-column label="文档类型" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span :style="{ color: scope.row.uploadedFlag === 'Y' ? '#029315' : '' }">
<span>
{{ getCombinedDocumentType(scope.row) }} {{ getCombinedDocumentType(scope.row) }}
</span> </span>
</template> </template>
@ -405,16 +401,9 @@
:min-width="item.columnWidth" :min-width="item.columnWidth"
:label="item.columnLabel"> :label="item.columnLabel">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.uploadedFlag === 'Y'">
<span v-if="!item.columnHidden" style="color: #029315;">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</div>
<div v-else>
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span> <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span> style="width: 100px; height: 80px"/></span>
</div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -5283,10 +5272,20 @@ import {arrayToTreeByLevelCode} from "../../../utils/arrayToTreeByLevelCode";
} }
}) })
}, },
tableRowClassName ({row, rowIndex}) {
if (row.status === '正式量产' || row.uploadedFlag === 'Y') {
return 'row-production'
}
return ''
},
} }
} }
</script> </script>
<style scoped lang="scss">
<style>
.row-production {
background-color: rgb(185, 244, 250) !important;
}
.el-tabs__nav { .el-tabs__nav {
margin-left: 0 !important; margin-left: 0 !important;
} }

15
src/views/modules/oss/ossComponents.vue

@ -1,5 +1,8 @@
<script> <script>
import {ossUpload, previewOssFileById, queryOss, removeOss} from "../../../api/oss/oss";
import {ossUpload, previewOssFileById, previewOssFileById2, queryOss, removeOss} from "../../../api/oss/oss";
import XLSX from 'xlsx';
import jsPDF from 'jspdf';
import * as mammoth from 'mammoth'; // Ensure it's correctly imported
export default { export default {
name: "ossComponents", name: "ossComponents",
@ -162,11 +165,11 @@ export default {
let excel = ['xlsx','xls']; let excel = ['xlsx','xls'];
if (excel.includes(row.fileType.toLowerCase())){ if (excel.includes(row.fileType.toLowerCase())){
type = row.fileType.toLowerCase();
type = 'excel';
} }
let word = ['docx']; let word = ['docx'];
if (word.includes(row.fileType.toLowerCase())){ if (word.includes(row.fileType.toLowerCase())){
type = 'docx'
type = 'word'
} }
let pdf = ['pdf']; let pdf = ['pdf'];
if (pdf.includes(row.fileType.toLowerCase())){ if (pdf.includes(row.fileType.toLowerCase())){
@ -179,8 +182,12 @@ export default {
} }
let params = { let params = {
id:row.id, id:row.id,
fileType:type
} }
previewOssFileById(params).then(({data}) => { previewOssFileById(params).then(({data}) => {
if (type === 'excel' || type === 'word'){
type = 'application/pdf;charset=UTF-8'
}
const blob = new Blob([data], { type: type }); const blob = new Blob([data], { type: type });
// URL // URL
const fileURL = URL.createObjectURL(blob); const fileURL = URL.createObjectURL(blob);
@ -189,7 +196,7 @@ export default {
name: 'pre', name: 'pre',
query:{ query:{
src: fileURL, src: fileURL,
type:type
type: 'pdf' // pdf
} }
}) })
window.open(href, '_blank') window.open(href, '_blank')

Loading…
Cancel
Save