|
@@ -85,18 +85,140 @@
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
<el-tabs v-model="activePage" @tab-click="handleClick">
|
|
<el-tabs v-model="activePage" @tab-click="handleClick">
|
|
|
|
+ <!-- 模具文档 -->
|
|
<el-tab-pane label="模具文档" name="0">
|
|
<el-tab-pane label="模具文档" name="0">
|
|
<el-table
|
|
<el-table
|
|
- :data="documents"
|
|
|
|
|
|
+ :data="documents.mould"
|
|
highlight-current-row
|
|
highlight-current-row
|
|
v-loading="listLoading"
|
|
v-loading="listLoading"
|
|
style="width: 100%;height:300px;"
|
|
style="width: 100%;height:300px;"
|
|
>
|
|
>
|
|
<el-table-column type="index" width="40"></el-table-column>
|
|
<el-table-column type="index" width="40"></el-table-column>
|
|
- <el-table-column prop="name" label="名称" sortable></el-table-column>
|
|
|
|
- <el-table-column prop="size" label="大小" width="200" sortable></el-table-column>
|
|
|
|
- <el-table-column prop="uploader" label="上传者" width="200" sortable></el-table-column>
|
|
|
|
- <el-table-column prop="uploadTime" label="上传时间" width="200" sortable></el-table-column>
|
|
|
|
|
|
+ <el-table-column prop="fileName" label="名称" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="fileSize" label="大小" width="200" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="uploadtor" label="上传者" width="200" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="indate" label="上传时间" width="200" sortable></el-table-column>
|
|
|
|
+ <el-table-column label="状态" width="120" sortable>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span v-if="scope.row.state == 0">需要</span>
|
|
|
|
+ <span v-else>不需要</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="操作" width="200" sortable>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button size="small" @click="checkOpen(scope.row.id, scope.row.fileName)">审批</el-button>
|
|
|
|
+ <a :href="scope.row.fileUrl">
|
|
|
|
+ <el-button size="small" @click="download(scope.row.id)">下载</el-button>
|
|
|
|
+ </a>
|
|
|
|
+ <el-button size="small" type="danger">删除</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </el-tab-pane>
|
|
|
|
+
|
|
|
|
+ <!-- 零件文档 -->
|
|
|
|
+ <el-tab-pane label="零件文档" name="1">
|
|
|
|
+ <el-table
|
|
|
|
+ :data="documents.part"
|
|
|
|
+ highlight-current-row
|
|
|
|
+ v-loading="listLoading"
|
|
|
|
+ style="width: 100%;height:300px;"
|
|
|
|
+ >
|
|
|
|
+ <el-table-column type="index" width="40"></el-table-column>
|
|
|
|
+ <el-table-column prop="fileName" label="名称" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="fileSize" label="大小" width="200" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="uploadtor" label="上传者" width="200" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="indate" label="上传时间" width="200" sortable></el-table-column>
|
|
|
|
+ <el-table-column label="状态" width="120" sortable>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span v-if="scope.row.state == 0">需要</span>
|
|
|
|
+ <span v-else>不需要</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="操作" width="300" sortable>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button size="small" @click="checkOpen(scope.row.id, scope.row.fileName)">审批</el-button>
|
|
|
|
+ <el-button size="small">浏览</el-button>
|
|
|
|
+ <el-button size="small" @click="download(scope.row.fileUrl)">下载</el-button>
|
|
|
|
+ <el-button size="small" type="danger">删除</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </el-tab-pane>
|
|
|
|
+
|
|
|
|
+ <!-- 试模及验收 -->
|
|
|
|
+ <el-tab-pane label="试模及验收" name="2">
|
|
|
|
+ <el-table
|
|
|
|
+ :data="documents.check"
|
|
|
|
+ highlight-current-row
|
|
|
|
+ v-loading="listLoading"
|
|
|
|
+ style="width: 100%;height:300px;"
|
|
|
|
+ >
|
|
|
|
+ <el-table-column type="index" width="40"></el-table-column>
|
|
|
|
+ <el-table-column prop="fileName" label="名称" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="fileSize" label="大小" width="200" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="uploadtor" label="上传者" width="200" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="indate" label="上传时间" width="200" sortable></el-table-column>
|
|
|
|
+ <el-table-column label="状态" width="120" sortable>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span v-if="scope.row.state == 0">需要</span>
|
|
|
|
+ <span v-else>不需要</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="操作" width="300" sortable>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button size="small" @click="checkOpen(scope.row.id, scope.row.fileName)">审批</el-button>
|
|
|
|
+ <el-button size="small">浏览</el-button>
|
|
|
|
+ <el-button size="small" @click="download(scope.row.fileUrl)">下载</el-button>
|
|
|
|
+ <el-button size="small" type="danger">删除</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </el-tab-pane>
|
|
|
|
+
|
|
|
|
+ <!-- 保养方案 -->
|
|
|
|
+ <el-tab-pane label="保养方案" name="3">
|
|
|
|
+ <el-table
|
|
|
|
+ :data="documents.maintain"
|
|
|
|
+ highlight-current-row
|
|
|
|
+ v-loading="listLoading"
|
|
|
|
+ style="width: 100%;height:300px;"
|
|
|
|
+ >
|
|
|
|
+ <el-table-column type="index" width="40"></el-table-column>
|
|
|
|
+ <el-table-column prop="fileName" label="名称" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="fileSize" label="大小" width="200" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="uploadtor" label="上传者" width="200" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="indate" label="上传时间" width="200" sortable></el-table-column>
|
|
|
|
+ <el-table-column label="状态" width="120" sortable>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span v-if="scope.row.state == 0">需要</span>
|
|
|
|
+ <span v-else>不需要</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="操作" width="300" sortable>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button size="small" @click="checkOpen(scope.row.id, scope.row.fileName)">审批</el-button>
|
|
|
|
+ <el-button size="small">浏览</el-button>
|
|
|
|
+ <el-button size="small" @click="download(scope.row.fileUrl)">下载</el-button>
|
|
|
|
+ <el-button size="small" type="danger">删除</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </el-tab-pane>
|
|
|
|
+
|
|
|
|
+ <!-- 模具更新 -->
|
|
|
|
+ <el-tab-pane label="模具更新" name="4">
|
|
|
|
+ <el-table
|
|
|
|
+ :data="documents.update"
|
|
|
|
+ highlight-current-row
|
|
|
|
+ v-loading="listLoading"
|
|
|
|
+ style="width: 100%;height:300px;"
|
|
|
|
+ >
|
|
|
|
+ <el-table-column type="index" width="40"></el-table-column>
|
|
|
|
+ <el-table-column prop="fileName" label="名称" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="fileSize" label="大小" width="200" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="uploadtor" label="上传者" width="200" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="indate" label="上传时间" width="200" sortable></el-table-column>
|
|
<el-table-column label="状态" width="120" sortable>
|
|
<el-table-column label="状态" width="120" sortable>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<span v-if="scope.row.state == 0">需要</span>
|
|
<span v-if="scope.row.state == 0">需要</span>
|
|
@@ -104,21 +226,49 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="操作" width="300" sortable>
|
|
<el-table-column label="操作" width="300" sortable>
|
|
- <el-button size="small">审批</el-button>
|
|
|
|
- <el-button size="small">浏览</el-button>
|
|
|
|
- <el-button size="small">下载</el-button>
|
|
|
|
- <el-button size="small" type="danger">删除</el-button>
|
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button size="small" @click="checkOpen(scope.row.id, scope.row.fileName)">审批</el-button>
|
|
|
|
+ <el-button size="small">浏览</el-button>
|
|
|
|
+ <el-button size="small" @click="download(scope.row.fileUrl)">下载</el-button>
|
|
|
|
+ <el-button size="small" type="danger">删除</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </el-tab-pane>
|
|
|
|
+
|
|
|
|
+ <!-- 模具报废 -->
|
|
|
|
+ <el-tab-pane label="模具报废" name="5">
|
|
|
|
+ <el-table
|
|
|
|
+ :data="documents.abandon"
|
|
|
|
+ highlight-current-row
|
|
|
|
+ v-loading="listLoading"
|
|
|
|
+ style="width: 100%;height:300px;"
|
|
|
|
+ >
|
|
|
|
+ <el-table-column type="index" width="40"></el-table-column>
|
|
|
|
+ <el-table-column prop="fileName" label="名称" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="fileSize" label="大小" width="200" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="uploadtor" label="上传者" width="200" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="indate" label="上传时间" width="200" sortable></el-table-column>
|
|
|
|
+ <el-table-column label="状态" width="120" sortable>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span v-if="scope.row.state == 0">需要</span>
|
|
|
|
+ <span v-else>不需要</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="操作" width="300" sortable>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button size="small" @click="checkOpen(scope.row.id, scope.row.fileName)">审批</el-button>
|
|
|
|
+ <el-button size="small">浏览</el-button>
|
|
|
|
+ <el-button size="small" @click="download(scope.row.fileUrl)">下载</el-button>
|
|
|
|
+ <el-button size="small" type="danger">删除</el-button>
|
|
|
|
+ </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
- <el-tab-pane label="零件文档" name="1">零件文档</el-tab-pane>
|
|
|
|
- <el-tab-pane label="试模及验收" name="2">试模及验收</el-tab-pane>
|
|
|
|
- <el-tab-pane label="保养方案" name="3">保养方案</el-tab-pane>
|
|
|
|
- <el-tab-pane label="模具更新" name="4">模具更新</el-tab-pane>
|
|
|
|
- <el-tab-pane label="模具报废" name="5">模具报废</el-tab-pane>
|
|
|
|
</el-tabs>
|
|
</el-tabs>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
+ <!-- 操作记录 -->
|
|
<el-col :span="24" class="title">操作记录</el-col>
|
|
<el-col :span="24" class="title">操作记录</el-col>
|
|
<el-table
|
|
<el-table
|
|
:data="operations"
|
|
:data="operations"
|
|
@@ -139,6 +289,15 @@
|
|
<el-table-column prop="time" label="时间" width="400" sortable></el-table-column>
|
|
<el-table-column prop="time" label="时间" width="400" sortable></el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+
|
|
|
|
+ <!-- 审批弹窗 -->
|
|
|
|
+ <el-dialog title="审批" :visible.sync="centerDialogVisible" width="30%" center>
|
|
|
|
+ <span>{{this.activeFileName}}</span>
|
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="check(false)">不通过</el-button>
|
|
|
|
+ <el-button type="primary" @click="check(true)">通过</el-button>
|
|
|
|
+ </span>
|
|
|
|
+ </el-dialog>
|
|
</section>
|
|
</section>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -148,17 +307,16 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
detailId: this.$route.params.id,
|
|
detailId: this.$route.params.id,
|
|
- //临时数据
|
|
|
|
moldDetail: {},
|
|
moldDetail: {},
|
|
- documents: [
|
|
|
|
- {
|
|
|
|
- name: "墨盒产品验证文档.word",
|
|
|
|
- size: "100KB",
|
|
|
|
- uploader: "张富贵",
|
|
|
|
- uploadTime: "2019-07-24",
|
|
|
|
- state: 0
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
|
|
+ documents: {
|
|
|
|
+ mould: [],
|
|
|
|
+ part: [],
|
|
|
|
+ check: [],
|
|
|
|
+ maintain: [],
|
|
|
|
+ update: [],
|
|
|
|
+ abandon: []
|
|
|
|
+ },
|
|
|
|
+ //临时数据
|
|
operations: [
|
|
operations: [
|
|
{
|
|
{
|
|
name: "王多银",
|
|
name: "王多银",
|
|
@@ -167,14 +325,17 @@ export default {
|
|
time: "时间"
|
|
time: "时间"
|
|
}
|
|
}
|
|
],
|
|
],
|
|
-
|
|
|
|
allDetail: {
|
|
allDetail: {
|
|
overflow: "auto",
|
|
overflow: "auto",
|
|
padding: "0px 5px",
|
|
padding: "0px 5px",
|
|
height: 0
|
|
height: 0
|
|
},
|
|
},
|
|
|
|
+ centerDialogVisible: false,
|
|
listLoading: false,
|
|
listLoading: false,
|
|
- activePage: 0
|
|
|
|
|
|
+ activeTab: 0,
|
|
|
|
+ activePage: 0,
|
|
|
|
+ activeArticleId: null,
|
|
|
|
+ activeFileName: null
|
|
};
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -184,8 +345,11 @@ export default {
|
|
toDetection() {
|
|
toDetection() {
|
|
this.$router.push("/detection");
|
|
this.$router.push("/detection");
|
|
},
|
|
},
|
|
- handleClick(tab, event) {},
|
|
|
|
- // 模具详情
|
|
|
|
|
|
+ //标签页面切换时
|
|
|
|
+ handleClick(tab, event) {
|
|
|
|
+ this.activeTab = tab.name;
|
|
|
|
+ },
|
|
|
|
+ //模具详情
|
|
getDetail() {
|
|
getDetail() {
|
|
this.http.post(
|
|
this.http.post(
|
|
this.port.mold.moldDetail,
|
|
this.port.mold.moldDetail,
|
|
@@ -210,17 +374,56 @@ export default {
|
|
}
|
|
}
|
|
);
|
|
);
|
|
},
|
|
},
|
|
- // 获取文档
|
|
|
|
|
|
+ //获取文档
|
|
getDocument() {
|
|
getDocument() {
|
|
this.http.post(
|
|
this.http.post(
|
|
- this.port.mold.moldFileList,
|
|
|
|
|
|
+ this.port.mold.moldFileListAll,
|
|
{
|
|
{
|
|
mouldId: this.detailId
|
|
mouldId: this.detailId
|
|
},
|
|
},
|
|
res => {
|
|
res => {
|
|
- console.log(res.data);
|
|
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
- this.documents = res.data;
|
|
|
|
|
|
+ this.documents.mould = res.data[0].list;
|
|
|
|
+ this.documents.part = res.data[1].list;
|
|
|
|
+ this.documents.check = res.data[2].list;
|
|
|
|
+ this.documents.maintain = res.data[3].list;
|
|
|
|
+ this.documents.update = res.data[4].list;
|
|
|
|
+ this.documents.abandon = res.data[5].list;
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ error => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: error,
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+ },
|
|
|
|
+ //打开审批窗口
|
|
|
|
+ checkOpen(id, name) {
|
|
|
|
+ this.activeArticleId = id;
|
|
|
|
+ this.activeFileName = name;
|
|
|
|
+ this.centerDialogVisible = true;
|
|
|
|
+ },
|
|
|
|
+ //审批
|
|
|
|
+ check(adoption) {
|
|
|
|
+ this.http.post(
|
|
|
|
+ this.port.mold.moldFileCheck,
|
|
|
|
+ {
|
|
|
|
+ mouldFileId: this.activeArticleId,
|
|
|
|
+ isPass: adoption ? 1 : 0 //通过为1 不通过为0
|
|
|
|
+ },
|
|
|
|
+ res => {
|
|
|
|
+ if (res.code == "ok") {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: "审批成功",
|
|
|
|
+ type: "success"
|
|
|
|
+ });
|
|
} else {
|
|
} else {
|
|
this.$message({
|
|
this.$message({
|
|
message: res.msg,
|
|
message: res.msg,
|
|
@@ -235,9 +438,43 @@ export default {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
);
|
|
);
|
|
|
|
+ this.centerDialogVisible = false;
|
|
},
|
|
},
|
|
- // 文件上传
|
|
|
|
- uploadFile() {}
|
|
|
|
|
|
+ //下载文件
|
|
|
|
+ download(id) {
|
|
|
|
+ console.log(id + "被下载啦");
|
|
|
|
+ },
|
|
|
|
+ //文件上传
|
|
|
|
+ uploadFile(params) {
|
|
|
|
+ var fileObj = params.file;
|
|
|
|
+ var form = new FormData();
|
|
|
|
+ form.append("file", fileObj);
|
|
|
|
+ form.append("blongType", this.activeTab);
|
|
|
|
+ this.http.uploadFile(
|
|
|
|
+ this.port.mold.moldFileUpload,
|
|
|
|
+ form,
|
|
|
|
+ res => {
|
|
|
|
+ if (res.code == "ok") {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: "上传成功",
|
|
|
|
+ type: "success"
|
|
|
|
+ });
|
|
|
|
+ this.getDocument();
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ error => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: error,
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+ }
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
let height = window.innerHeight;
|
|
let height = window.innerHeight;
|
|
@@ -309,4 +546,10 @@ export default {
|
|
.detail {
|
|
.detail {
|
|
margin-bottom: 20px;
|
|
margin-bottom: 20px;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+/* .upload-demo {
|
|
|
|
+ position: absolute;
|
|
|
|
+ right: 0;
|
|
|
|
+ top: -5px;
|
|
|
|
+} */
|
|
</style>
|
|
</style>
|