研发图纸文件管理系统-前端项目
longyvfengyun
2022-07-20 f6bf7281e2ce21f6c64a7209f2323ea117c3edd8
内容提交
2个文件已修改
30 ■■■■ 已修改文件
src/assets/js/tools/getWebUrl.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/components/drawUpload/DrawUpload.vue 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/tools/getWebUrl.js
@@ -1,7 +1,7 @@
function getWebUrl() {
  let url = '';
  if (process.env.NODE_ENV == 'dev') {
    url = "http://localhost:8090/cad/"
    url = "http://localhost:8092/cad/"
  } else {
    url = location.protocol + "//" + location.host + "/cad/";
  }
src/pages/components/drawUpload/DrawUpload.vue
@@ -17,9 +17,13 @@
      </a-row>
    </a-card>
    <a-table
        size="small" :scroll="{ x: 1800, y: 500}" bordered
        size="small" :scroll="{ x: 1920, y: 500}" bordered
        :columns="columns" :data-source="dataSource"
        :pagination="false" rowKey="subCode"></a-table>
        :pagination="false" rowKey="subCode">
      <template slot="pictureUrl" slot-scope="text">
        <img v-if="text" class="picture-url" :src="webUrl+text">
      </template>
    </a-table>
  </div>
</template>
@@ -40,81 +44,73 @@
      {
        title: '子件编码',
        dataIndex: 'subCode',
        width: 80,
        width: 120,
        fixed: 'left',
        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,
        width: 120,
        align: 'center',
        scopedSlots: { customRender: 'pictureUrl' },
      },
    ];
    return {
@@ -151,4 +147,8 @@
.content-value {
  font-weight: bold;
}
.picture-url {
  width: 100%;
  height: auto;
}
</style>