moldDetail.vue 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. <template>
  2. <section>
  3. <!--工具条-->
  4. <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
  5. <el-form :inline="true">
  6. <el-form-item>
  7. <el-button type="text" @click="backToList" icon="el-icon-back" class="back">返回</el-button>
  8. </el-form-item>
  9. <el-form-item class="divLine">
  10. </el-form-item>
  11. <el-form-item>
  12. <span class="projectTitle">测试用模具001</span>
  13. </el-form-item>
  14. <el-form-item class="state">
  15. 当前状态:
  16. <a style="color: #409EFF; cursor: pointer" @click="toDetection">运行</a>
  17. <span class="tips">(点击查看运行状态)</span>
  18. </el-form-item>
  19. </el-form>
  20. </el-col>
  21. <el-col :span="24" :style="allDetail">
  22. <el-col :span="24" class="title">模具基本信息
  23. <i class="el-icon-edit editDetail" ></i>
  24. </el-col>
  25. <el-col :span="24" class="main">
  26. <el-col :span="6" class="detail">
  27. 云模盒编号:
  28. <span class="info">{{mould.typeNumber}}</span>
  29. </el-col>
  30. <el-col :span="6" class="detail">
  31. 模具编号:
  32. <span class="info">{{mould.typeNumber}}</span>
  33. </el-col>
  34. <el-col :span="12" class="detail">
  35. 模具名称:
  36. <span class="info">{{mould.name}}</span>
  37. </el-col>
  38. <el-col :span="6" class="detail">
  39. 设备电量:
  40. <span class="info">{{mould.lifetime}}</span>
  41. </el-col>
  42. <el-col :span="6" class="detail">
  43. 倒计时:
  44. <span class="info">{{mould.lifetime}}</span>
  45. </el-col>
  46. <el-col :span="6" class="detail">
  47. 初始模次:
  48. <span class="info">{{mould.initial}}</span>
  49. </el-col>
  50. <el-col :span="6" class="detail">
  51. 对应RFID码:
  52. <span class="info">{{mould.RFIDcode}}</span>
  53. </el-col>
  54. <el-col :span="6" class="detail">
  55. 穴数:
  56. <span class="info">{{mould.mouldNumber}}</span>
  57. </el-col>
  58. <el-col :span="6" class="detail">
  59. 模次寿命:
  60. <span class="info">{{mould.project}}</span>
  61. </el-col>
  62. <el-col :span="12" class="detail">
  63. 所属项目:
  64. <span class="info">{{mould.manufacturer}}</span>
  65. </el-col>
  66. <el-col :span="12" class="detail">
  67. 制造方工厂:
  68. <span class="info">{{mould.manufacturer}}</span>
  69. </el-col>
  70. </el-col>
  71. <el-col :span="24" class="title">文档资料
  72. <el-upload class="upload-demo" action="customize" :http-request="uploadFile" :show-file-list="false" multiple :limit="5" style="float:right;">
  73. <el-button size="small" type="primary">点击上传</el-button>
  74. </el-upload>
  75. </el-col>
  76. <el-col :span="24">
  77. <el-tabs v-model="activePage" @tab-click="handleClick">
  78. <el-tab-pane label="模具文档" name="0">
  79. <el-table :data="documents" highlight-current-row v-loading="listLoading" style="width: 100%;height:300px;">
  80. <el-table-column type="index" width="40"></el-table-column>
  81. <el-table-column prop="name" label="名称" sortable></el-table-column>
  82. <el-table-column prop="size" label="大小" width="200" sortable></el-table-column>
  83. <el-table-column prop="uploader" label="上传者" width="200" sortable></el-table-column>
  84. <el-table-column prop="uploadTime" label="上传时间" width="200" sortable></el-table-column>
  85. <el-table-column label="状态" width="120" sortable>
  86. <template slot-scope="scope">
  87. <span v-if="scope.row.state == 0">需要</span>
  88. <span v-else>不需要</span>
  89. </template>
  90. </el-table-column>
  91. <el-table-column label="操作" width="300" sortable>
  92. <el-button size="small">审批</el-button>
  93. <el-button size="small">浏览</el-button>
  94. <el-button size="small">下载</el-button>
  95. <el-button size="small" type="danger">删除</el-button>
  96. </el-table-column>
  97. </el-table>
  98. </el-tab-pane>
  99. <el-tab-pane label="零件文档" name="1">零件文档</el-tab-pane>
  100. <el-tab-pane label="试模及验收" name="2">试模及验收</el-tab-pane>
  101. <el-tab-pane label="保养方案" name="3">保养方案</el-tab-pane>
  102. <el-tab-pane label="模具更新" name="4">模具更新</el-tab-pane>
  103. <el-tab-pane label="模具报废" name="5">模具报废</el-tab-pane>
  104. </el-tabs>
  105. </el-col>
  106. <el-col :span="24" class="title">操作记录</el-col>
  107. <el-table :data="operations" highlight-current-row v-loading="listLoading" style="width: 100%;height:300px;">
  108. <el-table-column type="index" width="40"></el-table-column>
  109. <el-table-column prop="name" label="姓名" width="400" sortable></el-table-column>
  110. <el-table-column prop="document" label="文档名称" sortable></el-table-column>
  111. <el-table-column label="操作" width="400" sortable>
  112. <template slot-scope="scope">
  113. <span v-if="scope.row.operations == 0">浏览</span>
  114. <span v-else-if="scope.row.operations == 1">下载</span>
  115. <span v-else>删除</span>
  116. </template>
  117. </el-table-column>
  118. <el-table-column prop="time" label="时间" width="400" sortable></el-table-column>
  119. </el-table>
  120. </el-col>
  121. </section>
  122. </template>
  123. <script>
  124. import util from "../../common/js/util";
  125. export default {
  126. data() {
  127. return {
  128. //临时数据
  129. mould: {
  130. typeNumber: "MUJU002",
  131. name: "墨模具测试",
  132. project: "墨盒项目",
  133. client: "南京海市蜃楼有限公司",
  134. manufacturer: "南京江宁制造局",
  135. mouldNumber: "MOHE0023",
  136. lifetime: "1年",
  137. initial: "36",
  138. RFIDcode: "RFID1234",
  139. blueprint: true,
  140. BOMtable: true,
  141. partList: false,
  142. standard: false
  143. },
  144. documents: [
  145. {
  146. name: "墨盒产品验证文档.word",
  147. size: "100KB",
  148. uploader: "张富贵",
  149. uploadTime: "2019-07-24",
  150. state: 0
  151. }
  152. ],
  153. operations: [
  154. {
  155. name: "王多银",
  156. document: "墨盒产品验证文档.word",
  157. operation: 0,
  158. time: "时间"
  159. }
  160. ],
  161. allDetail: {
  162. overflow: 'auto',
  163. padding: '0px 5px',
  164. height: 0
  165. },
  166. listLoading: false,
  167. activePage: 0
  168. };
  169. },
  170. methods: {
  171. backToList() {
  172. this.$router.push("/moldList");
  173. },
  174. toDetection(){
  175. this.$router.push("/detection");
  176. },
  177. handleClick(tab, event) {
  178. console.log(tab, event);
  179. }
  180. },
  181. created() {
  182. let height = window.innerHeight;
  183. this.allDetail.height = height - 170 + "px";
  184. },
  185. mounted() {
  186. var mouldId = this.$route.params.id; //传到当前页面的模具编号
  187. }
  188. };
  189. </script>
  190. <style scoped>
  191. .toolbar .el-form-item {
  192. font-size: 14px;
  193. vertical-align: middle;
  194. }
  195. .back {
  196. font-size:16px;
  197. }
  198. .divLine {
  199. width: 2px;
  200. background: #c3c3c3;
  201. height: 100%;
  202. }
  203. .projectTitle {
  204. font-size: 18px;
  205. color: #333;
  206. }
  207. .state {
  208. float: right;
  209. }
  210. .tips {
  211. color:#bbb;
  212. }
  213. .title {
  214. padding-left: 10px;
  215. padding-bottom: 0px;
  216. margin: 20px 0;
  217. font-size: 16px;
  218. line-height: 24px;
  219. border-left: 1px blue solid;
  220. }
  221. .editDetail {
  222. margin-left: 10px;
  223. color:#20a0ff;
  224. cursor: pointer;
  225. }
  226. .info {
  227. color: grey;
  228. }
  229. .main {
  230. padding-left: 10px;
  231. }
  232. .detail {
  233. margin-bottom: 20px;
  234. }
  235. </style>