zss
2023-12-08 e82c2f2e26253bd111b29eed22d555ba5b95e4b7
Merge remote-tracking branch 'origin/master'
已修改4个文件
148 ■■■■ 文件已修改
src/api/plan/productionschedul.js 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/page/index/logo.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/productionschedul/index.vue 88 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/plan/productionschedul.js
@@ -21,4 +21,19 @@
    method: 'put',
    data: data
  })
}
export function deleteSchedul(mId) {
  return request({
    url: '/mes/productionSchedul/'+mId,
    method: 'delete',
  })
}
export function updateSchedul(data) {
  return request({
    url: '/mes/productionSchedul/updateByMId',
    method: 'post',
    data: data
  })
}
src/page/index/logo.vue
@@ -71,7 +71,6 @@
  },
  created() {
    this.sysTitle = localStorage.getItem('SYSTEM_LOGO_TITLE')
    console.log('userInfouserInfo', this.userInfo)
    // this.getLogoInfo()
  },
  methods: {
src/views/plan/productionschedul/index.vue
@@ -10,6 +10,7 @@
            @selection-change="selectionRow"
            :table-loading="loading">
            <template #menu="{ row, index }">
              <el-button type="text" icon="el-icon-edit" size="small" @click="editHandle(row, index)">编辑</el-button>
              <el-button type="text" icon="el-icon-delete" size="small" @click="deleteHandle(row, index)">删除</el-button>
            </template>
          </avue-crud>
@@ -97,6 +98,31 @@
        <el-button type="primary" @click="confirmEditSchedul">确 定</el-button>
      </span>
  </el-dialog>
  <el-dialog
    title="编辑"
    :visible.sync="editDialogVisible"
    width="50%">
    <el-form :model="editForm" label-width="120px">
      <el-row>
        <el-col :span="24">
          <el-form-item label="生产情况:">
            <el-input style="width:100%" placeholder="请输入生产情况" type="textarea" :row="2" v-model="editForm.productionStatus"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <el-form-item label="生产程度:">
            <el-input style="width:100%" placeholder="请输入生产程度" type="textarea" :row="2" v-model="editForm.productionRoutine"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <span slot="footer" class="dialog-footer">
      <el-button @click="editDialogVisible = false">取 消</el-button>
      <el-button type="primary" @click="confirmEdit()">确 定</el-button>
    </span>
  </el-dialog>
  </div>
</template>
@@ -104,7 +130,9 @@
import {
  fetchScheduleList,
  fetchScheduleById,
  fillTime
  fillTime,
  deleteSchedul,
  updateSchedul
} from '@/api//plan/productionschedul'
import TableForm from './template-form'
import ttable from '@/views/common/ztt-table.vue'
@@ -112,6 +140,12 @@
export default {
    data() {
    return {
      editForm:{
        id: null,
        productionRoutine: null,
        productionStatus: null,
      },
      editDialogVisible: false,
      dialogVisible: false,
      scheduleList: [],
      scheduleEditList: [],
@@ -129,10 +163,12 @@
        selection: true,
        columnBtn: false,
        index: true,
        rowKey: 'product',
        indexFixed: false,
        selectionFixed: false,
        rowKey: 'mid',
        indexLabel: '序号',
        menuAlign: 'center',
        menuWidth: 100,
        menuWidth: 130,
        editBtn: false,
        delBtn: false,
        addBtn: false,
@@ -272,7 +308,15 @@
    this.rowCalc()
  },
  watch:{
    editDialogVisible(newVal){
      if(!newVal){
        this.editForm = {
          id: null,
          productionRoutine: null,
          productionStatus: null,
        }
      }
    }
  },
  mounted() {
@@ -280,6 +324,26 @@
  beforeDestroy() {
  },
  methods: {
    confirmEdit(){
      const _than = this
      updateSchedul(this.editForm).then(res=>{
        if(res.status===200){
          _than.$message.success("更新成功")
          _than.editDialogVisible = false
          _than.getData()
        }
      }).catch(error=>{
        console.error(error);
      })
    },
    editHandle(row,index){
      if(row){
        this.editForm.id = row.mid
        this.editForm.productionRoutine = row.productionRoutine
        this.editForm.productionStatus = row.productionStatus
        this.editDialogVisible = true
      }
    },
    openEditDialog(){
      this.scheduleEditList = JSON.parse(JSON.stringify(this.scheduleList))
      this.dialogVisible = true
@@ -287,8 +351,6 @@
    confirmEditSchedul(){
      let data = this.scheduleEditList
      let orderObj = this.multipleSelection[0]
      console.log("data---",data)
      console.log("orderObj-----",orderObj)
      let obj = {
        "documentActualTime": data[0].actualTime,
        "documentPlanTime": data[0].planTime,
@@ -310,7 +372,6 @@
        "productType": orderObj.productType,
        "projectName": orderObj.projectName
      }
      console.log("obj----->>>",obj);
      fillTime(obj).then(res=>{
        if(res.status===200){
          this.$message.success("更新成功")
@@ -375,6 +436,7 @@
      }
    },
    selectionRow(val){
      console.log(val);
      if (val.length > 1) {
        const preVal = val.shift();
        this.$refs.crud.toggleRowSelection(preVal, false);
@@ -414,12 +476,20 @@
    },
    // 删除
    deleteHandle(row,index) {
      this.$confirm('是否确认删除', '提示', {
      const _than = this
      _than.$confirm('是否确认删除', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(function() {
        deleteSchedul(row.mid).then(res=>{
          if(res.status===200){
            _than.$message.success("删除成功")
            _than.getData()
          }
        }).catch(error=>{
          console.error(error)
        })
      })
    },
    //动态合并方法
vue.config.js
@@ -2,11 +2,11 @@
 * 配置参考:
 * https://cli.vuejs.org/zh/config/
 */
//const url = 'http://192.168.2.7:9999'
const url = 'http://192.168.2.7:9999'
//const url = 'http://192.168.32.45:9999'
// const url = 'http://192.168.0.23:9999'
const url = 'http://localhost:9999'
// const url = 'http://localhost:9999'
const localUrl = 'http://localhost:8089'
@@ -29,26 +29,26 @@
  },
  // eslint-disable-next-line
  configureWebpack: (config) => {
    // if (process.env.NODE_ENV === 'production') {
    //   // 仅在生产环境下启用该配置
    //   return {
    //     plugins: [
    //       /*new MonacoWebpackPlugin({
    //         languages: ['javascript', 'css', 'html', 'json']
    //       }),*/
    //       new CompressionWebpackPlugin({
    //         filename: '[path].gz[query]',
    //         algorithm: 'gzip',
    //         test: new RegExp(
    //           '\\.(' + productionGzipExtensions.join('|') + ')$'
    //         ),
    //         threshold: 1024, // 只有大小大于该值的资源会被处理,当前配置为对于超过1k的数据进行处理,不足1k的可能会越压缩越大
    //         minRatio: 0.99, // 只有压缩率小于这个值的资源才会被处理
    //         deleteOriginalAssets: true // 删除原文件
    //       })
    //     ]
    //   }
    // }
    if (process.env.NODE_ENV === 'production') {
      // 仅在生产环境下启用该配置
      return {
        plugins: [
          /*new MonacoWebpackPlugin({
            languages: ['javascript', 'css', 'html', 'json']
          }),*/
          new CompressionWebpackPlugin({
            filename: '[path].gz[query]',
            algorithm: 'gzip',
            test: new RegExp(
              '\\.(' + productionGzipExtensions.join('|') + ')$'
            ),
            threshold: 1024, // 只有大小大于该值的资源会被处理,当前配置为对于超过1k的数据进行处理,不足1k的可能会越压缩越大
            minRatio: 0.99, // 只有压缩率小于这个值的资源才会被处理
            deleteOriginalAssets: true // 删除原文件
          })
        ]
      }
    }
  },
  // 配置转发代理
  devServer: {