plm前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

118 lines
3.7 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. <template>
  2. <div class="mod-config">
  3. <el-form label-position="top" style="margin-top: 1px; margin-left: 0px;" >
  4. <el-form-item >
  5. <el-button type="primary" @click="refreshModal()" >更新模板</el-button>
  6. <el-button type="primary" @click="searchTable()" >刷新数据</el-button>
  7. <el-button type="primary" @click="newData()" v-if="!ifDisableFlag">新增</el-button>
  8. </el-form-item>
  9. <div class="rq ">
  10. <el-table
  11. :height="height"
  12. :data="tableData"
  13. border
  14. style="width: 100%">
  15. <el-table-column
  16. prop="itemNo"
  17. header-align="center"
  18. align="left"
  19. width="60"
  20. label="属性编码">
  21. </el-table-column>
  22. <el-table-column
  23. prop="itemDesc"
  24. header-align="center"
  25. align="left"
  26. width="100"
  27. label="属性名称">
  28. </el-table-column>
  29. <el-table-column
  30. header-align="center"
  31. align="left"
  32. min-width="400"
  33. label="值">
  34. <template slot-scope="scope">
  35. <el-input v-if="scope.row.valueTypeDb === 'T'&&scope.row.valueChooseFlag === 'N'" v-model="scope.row.textValue" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
  36. <el-input v-if="scope.row.valueTypeDb === 'N'&&scope.row.valueChooseFlag === 'N'" v-model="scope.row.numberValue" type="number" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
  37. <el-select v-if="scope.row.valueTypeDb === 'T'&&scope.row.valueChooseFlag === 'Y'" v-model="scope.row.textValue" placeholder="请选择" style="height: 11px;padding: 0px " allow-create>
  38. <el-option
  39. v-for="item in scope.row.availableList"
  40. :key="index"
  41. :label="item.availableValue"
  42. :value="item.availableValue">
  43. </el-option>
  44. </el-select>
  45. <el-select v-if="scope.row.valueTypeDb === 'N'&&scope.row.valueChooseFlag === 'Y'" v-model="scope.row.numberValue" placeholder="请选择" style="height: 11px;padding: 0px " allow-create>
  46. <el-option
  47. v-for="item in scope.row.availableList"
  48. :key="index"
  49. :label="item.availableValue"
  50. :value="item.availableValue">
  51. </el-option>
  52. </el-select>
  53. </template>
  54. </el-table-column>
  55. </el-table>
  56. </div>
  57. </el-form>
  58. </div>
  59. </template>
  60. <script>
  61. import {
  62. searchBMPropertiesValue
  63. } from "@/api/sampleManagement/technicalSpecificationList.js"
  64. export default {
  65. components: {
  66. },
  67. data() {
  68. return {
  69. height:200,
  70. searchData: {
  71. site: '',
  72. username: this.$store.state.user.name,
  73. codeNo: '',
  74. buNo:'',
  75. type:'',
  76. },
  77. type:'prepress',
  78. ifDisableFlag:false,
  79. tableData:[],
  80. }
  81. },
  82. mounted () {
  83. this.$nextTick(() => {
  84. this.height = window.innerHeight - 100
  85. })
  86. },
  87. methods: {
  88. //初始化组件的参数
  89. init(inData) {
  90. if(this.dataForm.codeNo!=null&&this.dataForm.codeNo!=''){
  91. return false;
  92. }
  93. //初始化参数
  94. this.searchData = JSON.parse(JSON.stringify(inData));
  95. this.searchData.type= JSON.parse(JSON.stringify(this.type));
  96. //刷新表格
  97. this.searchTable();
  98. },
  99. searchTable(){
  100. searchBMPropertiesValue(this.searchData).then(({data}) => {
  101. this.tableData = data.rows;
  102. });
  103. },
  104. },
  105. }
  106. </script>
  107. <style scoped>
  108. </style>