| | |
| | | <template> |
| | | <a-dropdown> |
| | | <div class="header-avatar" style="cursor: pointer"> |
| | | <a-avatar class="avatar" size="small" shape="circle" :src="user.avatar" /> |
| | | <a-avatar class="avatar" size="small" shape="circle" icon="user" /> |
| | | <span class="name">{{ user.name }}</span> |
| | | </div> |
| | | <a-menu :class="['avatar-menu']" slot="overlay"> |
New file |
| | |
| | | <template> |
| | | <div class="draw-upload"> |
| | | <a-card> |
| | | <a-row> |
| | | <a-col :span="8"> |
| | | <span class="content-label">母物料编号:</span> |
| | | <span class="content-value">0940000072</span> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <span class="content-label">母物料名称:</span> |
| | | <span class="content-value">离线式放电负载</span> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <span class="content-label">母物料型号:</span> |
| | | <span class="content-value">IDCE-6006NTpro</span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-card> |
| | | <a-table size="small" :scroll="{ x: 1800}" bordered :columns="columns" :data-source="dataSource" :pagination="false"></a-table> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "DrawUpload", |
| | | props: { |
| | | list: { |
| | | type: Array, |
| | | default() { |
| | | return [] |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | const columns = [ |
| | | { |
| | | title: '子件编码', |
| | | dataIndex: 'subCode', |
| | | width: 80, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: '子件名称', |
| | | dataIndex: 'subName', |
| | | width: 80, |
| | | align: 'center', |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: '子件型号', |
| | | dataIndex: 'subModel', |
| | | width: 100, |
| | | align: 'center', |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: '类别', |
| | | dataIndex: 'category', |
| | | width: 60, |
| | | align: 'center', |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: '基本单位', |
| | | dataIndex: 'unit', |
| | | width: 70, |
| | | align: 'center', |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: '子件数量', |
| | | dataIndex: 'quantity', |
| | | width: 70, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: '生产商', |
| | | dataIndex: 'producer', |
| | | width: 60, |
| | | align: 'center', |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: '封装类型/材质', |
| | | dataIndex: 'material', |
| | | width: 80, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: '元件编号/料厚', |
| | | dataIndex: 'thickness', |
| | | width: 80, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: '表面处理/物料详情', |
| | | dataIndex: 'surfaceDetail', |
| | | width: 90, |
| | | align: 'center', |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: '备注', |
| | | dataIndex: 'notes', |
| | | width: 100, |
| | | align: 'center', |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: '图片', |
| | | dataIndex: 'pictureUrl', |
| | | width: 100, |
| | | align: 'center' |
| | | }, |
| | | ]; |
| | | return { |
| | | columns: columns, |
| | | dataSource: [] |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .content-label, |
| | | .content-value { |
| | | font-weight: bold; |
| | | } |
| | | </style> |
New file |
| | |
| | | import DrawUpload from "./DrawUpload"; |
| | |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | drawUploadVisible: false, |
| | | cardName: "myDraw", |
| | | totals: const_total.normal, |
| | | radio: 0, |
| | |
| | | <template> |
| | | <page-toggle-transition v-if="isShow" :disabled="animate.disabled" :animate="animate.name" :direction="animate.direction"> |
| | | <advance-table |
| | | :data-source="dataSource" |
| | | :columns="columns" |
| | | :loading="loading" |
| | | title="" |
| | | row-key="name" |
| | | @search="onSearch" |
| | | @refresh="onRefresh" |
| | | @reset="onReset" |
| | | :format-conditions="true" |
| | | :pagination="{ |
| | | <div class="page-content"> |
| | | <advance-table |
| | | :data-source="dataSource" |
| | | :columns="columns" |
| | | :loading="loading" |
| | | title="" |
| | | row-key="name" |
| | | @search="onSearch" |
| | | @refresh="onRefresh" |
| | | @reset="onReset" |
| | | :format-conditions="true" |
| | | :pagination="{ |
| | | current: page, |
| | | pageSize: pageSize, |
| | | total: total, |
| | |
| | | onChange: onPageChange, |
| | | onShowSizeChange: onSizeChange, |
| | | }"> |
| | | <template slot="title"> |
| | | <a-button type="primary" size="small">新建图纸</a-button> |
| | | </template> |
| | | <template slot="approvalState" slot-scope="{text}"> |
| | | <a-tag v-if="text==1" color="blue"> |
| | | 已审批 |
| | | </a-tag> |
| | | <a-tag v-else-if="text==2" color="pink"> |
| | | 已驳回 |
| | | </a-tag> |
| | | <a-tag v-else> |
| | | 未审批 |
| | | </a-tag> |
| | | </template> |
| | | <!-- 审核建议 --> |
| | | <template slot="approvalSuggestion" slot-scope="{text, record}"> |
| | | <template v-if="record.approvalState"> |
| | | {{text}} |
| | | <template slot="title"> |
| | | <a-upload |
| | | :file-list="fileList" |
| | | :remove="handleRemove" |
| | | :before-upload="beforeUpload" |
| | | :showUploadList="false" |
| | | @change="uploadChange"> |
| | | <a-button type="primary" size="small">新建图纸</a-button> |
| | | </a-upload> |
| | | </template> |
| | | <template v-else> |
| | | -- |
| | | <template slot="approvalState" slot-scope="{text}"> |
| | | <a-tag v-if="text==1" color="blue"> |
| | | 已审批 |
| | | </a-tag> |
| | | <a-tag v-else-if="text==2" color="pink"> |
| | | 已驳回 |
| | | </a-tag> |
| | | <a-tag v-else> |
| | | 未审批 |
| | | </a-tag> |
| | | </template> |
| | | </template> |
| | | <!-- 审核日期 --> |
| | | <template slot="auditDate" slot-scope="{text, record}"> |
| | | <template v-if="record.approvalState"> |
| | | {{text}} |
| | | <!-- 审核建议 --> |
| | | <template slot="approvalSuggestion" slot-scope="{text, record}"> |
| | | <template v-if="record.approvalState"> |
| | | {{text}} |
| | | </template> |
| | | <template v-else> |
| | | -- |
| | | </template> |
| | | </template> |
| | | <template v-else> |
| | | -- |
| | | <!-- 审核日期 --> |
| | | <template slot="auditDate" slot-scope="{text, record}"> |
| | | <template v-if="record.approvalState"> |
| | | {{text}} |
| | | </template> |
| | | <template v-else> |
| | | -- |
| | | </template> |
| | | </template> |
| | | </template> |
| | | <template slot="action" slot-scope="scope"> |
| | | <a @click="scope.record">下载</a> |
| | | <a-divider type="vertical"></a-divider> |
| | | <a @click="scope.record">详情</a> |
| | | </template> |
| | | </advance-table> |
| | | <template slot="action" slot-scope="scope"> |
| | | <a @click="scope.record">下载</a> |
| | | <a-divider type="vertical"></a-divider> |
| | | <a @click="scope.record">详情</a> |
| | | </template> |
| | | </advance-table> |
| | | <a-modal |
| | | v-model="drawUploadVisible" |
| | | title="图纸上传" |
| | | centered |
| | | :width="1300"> |
| | | <draw-upload :list="subList"></draw-upload> |
| | | </a-modal> |
| | | </div> |
| | | </page-toggle-transition> |
| | | </template> |
| | | |
| | |
| | | import PageToggleTransition from "@/components/transition/PageToggleTransition"; |
| | | import AdvanceTable from "@/components/table/advance/AdvanceTable"; |
| | | import {mapState} from "vuex"; |
| | | import AStepItem from "@/components/tool/AStepItem"; |
| | | import DrawUpload from "@/pages/components/drawUpload/DrawUpload"; |
| | | import {excelParse } from "./apis"; |
| | | |
| | | export default { |
| | | name: "MyDraw", |
| | | props: { |
| | |
| | | }, |
| | | }, |
| | | components: { |
| | | DrawUpload, |
| | | AStepItem, |
| | | PageToggleTransition, |
| | | AdvanceTable, |
| | | }, |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | drawUploadVisible: false, |
| | | page: 1, |
| | | pageSize: 10, |
| | | total: 5, |
| | |
| | | scopedSlots: { customRender: 'action' } |
| | | }, |
| | | ], |
| | | dataSource: [ |
| | | { |
| | | name: "BJ2312", |
| | | type: "钣金", |
| | | uploadPeople: "霍东伟", |
| | | uploadDate: "2022-07-14 00:00:00", |
| | | auditPeople: "霍东伟", |
| | | auditDate: "2022-07-14 00:00:00", |
| | | approvalState: 1, |
| | | approvalSuggestion: '可以使用' |
| | | }, |
| | | { |
| | | name: "TP9528", |
| | | type: "铜牌", |
| | | uploadPeople: "何威", |
| | | uploadDate: "2022-07-14 00:00:00", |
| | | auditPeople: "何威", |
| | | auditDate: "2022-07-14 00:00:00", |
| | | approvalState: 0, |
| | | approvalSuggestion: '可以使用' |
| | | }, |
| | | { |
| | | name: "TP9529", |
| | | type: "铜牌", |
| | | uploadPeople: "霍东伟", |
| | | uploadDate: "2022-07-14 00:00:00", |
| | | auditPeople: "霍东伟", |
| | | auditDate: "2022-07-14 00:00:00", |
| | | approvalState: 2, |
| | | approvalSuggestion: '建议修改' |
| | | }, |
| | | { |
| | | name: "SRQ9527", |
| | | type: "散热器", |
| | | uploadPeople: "鲁星伟", |
| | | uploadDate: "2022-07-14 00:00:00", |
| | | auditPeople: "鲁星伟", |
| | | auditDate: "2022-07-14 00:00:00", |
| | | approvalState: 1, |
| | | approvalSuggestion: '可以使用' |
| | | }, |
| | | { |
| | | name: "SRQ9528", |
| | | type: "散热器", |
| | | uploadPeople: "霍东伟", |
| | | uploadDate: "2022-07-14 00:00:00", |
| | | auditPeople: "徐仲陪", |
| | | auditDate: "2022-07-14 00:00:00", |
| | | approvalState: 0, |
| | | approvalSuggestion: '可以使用' |
| | | }, |
| | | ], |
| | | dataSource: [], |
| | | fileList: [], |
| | | subList: [], |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | searchData() { |
| | | console.log("查询后台返回参数"); |
| | | }, |
| | | handleRemove(file) { |
| | | const index = this.fileList.indexOf(file); |
| | | const newFileList = this.fileList.slice(); |
| | | newFileList.splice(index, 1); |
| | | this.fileList = newFileList; |
| | | }, |
| | | beforeUpload(file) { |
| | | this.fileList = [...this.fileList, file]; |
| | | return false; |
| | | }, |
| | | uploadChange(data) { |
| | | if(data.fileList.length == 1) { |
| | | const formData = new FormData(); |
| | | formData.append('file', data.file); |
| | | excelParse(formData).then(res=>{ |
| | | console.log(res); |
| | | }).catch(error=>{ |
| | | console.log(error); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState('setting', ['animate']), |
New file |
| | |
| | | import axios from "@/assets/axios"; |
| | | |
| | | /** |
| | | * excel解析 |
| | | * @returns |
| | | */ |
| | | export const excelParse = (data) => { |
| | | return axios({ |
| | | method: "POST", |
| | | url: "bomApproving/excelParse", |
| | | headers: { |
| | | "Content-Type": "multipart/form-data" |
| | | }, |
| | | data |
| | | }) |
| | | } |
| | |
| | | resolved "https://registry.npm.taobao.org/jsbn/download/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" |
| | | integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= |
| | | |
| | | jsencrypt@^3.2.1: |
| | | version "3.2.1" |
| | | resolved "https://registry.yarnpkg.com/jsencrypt/-/jsencrypt-3.2.1.tgz#09766983cc760088ff26b12fe7e574252af97727" |
| | | integrity sha512-k1sD5QV0KPn+D8uG9AdGzTQuamt82QZ3A3l6f7TRwMU6Oi2Vg0BsL+wZIQBONcraO1pc78ExMdvmBBJ8WhNYUA== |
| | | |
| | | jsesc@^2.5.1: |
| | | version "2.5.2" |
| | | resolved "https://registry.npm.taobao.org/jsesc/download/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" |