licp
2024-04-25 f6811caf6c66d4e2a55393f3b6dc169efd28d863
修改工艺文件
已修改7个文件
137 ■■■■■ 文件已修改
src/api/technology/document.js 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/download.png 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/main.af3c5c19.png 补丁 | 查看 | 原始文档 | blame | 历史
src/views/common/ztt-table.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/technology/document/document-form.vue 补丁 | 查看 | 原始文档 | blame | 历史
src/views/technology/document/teststandard.vue 117 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/technology/document.js
@@ -298,3 +298,18 @@
    params: query
  })
}
export function deleteTestStandardParam(id) {
    return request({
      url: `/mes/document/deleteTestStandardParam/${id}`,
      method: 'post',
    })
  }
  export function saveTestStandardParam(obj) {
    return request({
      url: '/mes/document/saveTestStandardParam',
      method: 'post',
      data: obj
    })
  }
src/assets/download.png

src/assets/main.af3c5c19.png

src/views/common/ztt-table.vue
@@ -1379,6 +1379,7 @@
        this.multipleSelection = selection
        this.$emit('handleSelectionChange', selection)
      } */
      this.$emit('shoudonggouxuan',row)
    },
    handleSelectionChange(val) {
      this.multipleSelection = val
src/views/technology/document/document-form.vue
src/views/technology/document/teststandard.vue
@@ -6,6 +6,7 @@
          :table="table"
          @handleSelectionChange="handleSelectionChange"
          @currentChange="handleCurrentChange"
          @shoudonggouxuan="handleCurrentChange"
          :uploadInfo="uploadInfo"
          :prelang="prelang"
          :options="options"
@@ -18,14 +19,30 @@
        </ttable>
      </el-col>
      <el-col :span="12" style="padding-left: 10px">
        <div style="float: right;margin-bottom: 8px;" v-if="editable && currentRow&&currentRow.id">
        <el-button
            style="padding: 3px 0"
            type="text"
            size="medium"
            @click="saveAllParamChange"
            >保存
        </el-button>
        <!-- <el-button
            style="padding: 3px 0"
            type="text"
            size="medium"
            @click="openTempalteParamDialog"
            >添加
        </el-button> -->
        </div>
        <el-table
          :data="testStandardParams"
          id="testStandardParamTable"
          ref="testStandardParam"
          :default-sort="{ prop: 'index' }"
          highlight-current-row
          height="500"
          style="width: 100%"
          max-height="500"
          style="width: 100%;overflow-x: auto;"
        >
          <el-table-column
            prop="index"
@@ -39,10 +56,54 @@
            label="要求值"
            prop="referenceValue"
            align="center"
          />
          <el-table-column label="单位" prop="unit" align="center" />
          <el-table-column label="测试方法" prop="method" align="center" />
          <el-table-column label="测试目的" prop="purpose" align="center" />
            width="120px"
          >
          <template slot-scope="scope">
                <el-input
                v-model="scope.row.referenceValue"
                placeholder="值"
                :disabled="!editable"
                ></el-input>
            </template>
            </el-table-column>
          <el-table-column label="单位" prop="unit" align="center" width="120px">
            <template slot-scope="scope">
                <el-input
                v-model="scope.row.unit"
                placeholder="单位"
                :disabled="!editable"
                ></el-input>
            </template>
          </el-table-column>
          <el-table-column label="测试方法" prop="method" align="center">
            <template slot-scope="scope">
                <el-input
                v-model="scope.row.method"
                placeholder=""
                :disabled="!editable"
                ></el-input>
            </template>
          </el-table-column>
          <el-table-column label="测试目的" prop="purpose" align="center">
            <template slot-scope="scope">
                <el-input
                v-model="scope.row.purpose"
                placeholder=""
                :disabled="!editable"
                ></el-input>
            </template>
          </el-table-column>
          <el-table-column label="操作" align="center" fixed="right">
        <template slot-scope="scope">
            <el-button
            type="text"
            size="mini"
            v-if="editable && currentRow&&currentRow.id"
            @click.stop="handleParamDelete(scope.row, scope.$index)"
            >删除
            </el-button>
        </template>
        </el-table-column>
        </el-table>
      </el-col>
    </el-row>
@@ -60,7 +121,9 @@
  deleteTestStandard,
  getTestStand,
  saveTestStandard,
  getTestStandardParams
  getTestStandardParams,
  deleteTestStandardParam,
  saveTestStandardParam,
} from '@/api/technology/document'
import qualityStandardDialog from '@/views/common/teststandardradio.vue'
@@ -289,6 +352,46 @@
    handleSelectionChange(val) {
      // 多行选中
      this.multipleSelection = val
    },
    saveAllParamChange(){
        this.testStandardParams.forEach(e=>{
        if(e.referenceValue!=null){
        e.referenceValue=e.referenceValue.replace(',',',').replace('(','(').replace(')',')')
          if (!isNaN(e.referenceValue)) {
            e.referenceValue='='+e.referenceValue
          }
        }
      })
      saveTestStandardParam(this.testStandardParams).then((response) => {
        const data = response.data
        if (data.code == 0) {
          this.$message.success('保存成功')
          this.getTestStandardParamData(this.currentRow.id)
        } else {
          this.$message.error('保存失败')
        }
      })
    },
    openTempalteParamDialog(){},
    handleParamDelete(row, index){
        this.$confirm('是否确认删除参数项为' + row.parameterItem, '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      })
        .then(function() {
          return deleteTestStandardParam(row.id)
        })
        .then((response) => {
          const data = response.data
          if (data.code == 0) {
            // 删除当前行
            this.testStandardParams.splice(index, 1)
            this.$message.success('删除成功')
          } else {
            this.$message.error('删除失败')
          }
        })
    }
  }
}
vue.config.js
@@ -6,8 +6,8 @@
// const url = 'https://ztms-mes.chinaztt.cn/'
 const url = 'http://localhost:9999'
//const url = 'http://192.168.32.45:9999'
//  const url = 'http://localhost:9999'
const url = 'http://192.168.32.45:9999'
const localUrl = 'http://localhost:8089'