ludc
2023-11-22 e13278606d3facef443c5c65e07b42c52c7a38d5
Merge remote-tracking branch 'origin/master'
已修改9个文件
已添加3个文件
362 ■■■■ 文件已修改
Source/UBCS-WEB/package.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/BatchImport/index.vue 81 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Master/MasterEditBulk.vue 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Master/MasterTransfer.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Master/MasterTree.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/StatisticsComponent/lineChart.vue 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/main.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/MasterData/items.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/statistic/statisticPage.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/wel/Statistic.vue 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/vue.config.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/package.json
@@ -16,6 +16,7 @@
    "babel-polyfill": "^6.26.0",
    "classlist-polyfill": "^1.2.0",
    "crypto-js": "^4.1.1",
    "echarts": "4.9.0",
    "element-ui": "^2.15.6",
    "instead": "^1.0.3",
    "js-base64": "^2.5.1",
@@ -27,10 +28,12 @@
    "node-gyp": "^4.0.0",
    "nprogress": "^0.2.0",
    "portfinder": "^1.0.23",
    "save": "^2.9.0",
    "script-loader": "^0.7.2",
    "vue": "^2.6.10",
    "vue-axios": "^2.1.2",
    "vue-clipboard2": "^0.3.3",
    "vue-echarts": "5.0.0-beta.0",
    "vue-flowchart-editor": "^1.0.2",
    "vue-i18n": "^8.7.0",
    "vue-router": "^3.0.1",
@@ -40,6 +43,7 @@
    "@vue/cli-plugin-babel": "^3.1.1",
    "@vue/cli-plugin-eslint": "^3.1.5",
    "@vue/cli-service": "^3.1.4",
    "@vue/composition-api": "^1.7.2",
    "chai": "^4.1.2",
    "node-sass": "^6.0.1",
    "sass-loader": "^10.0.5",
Source/UBCS-WEB/src/components/BatchImport/index.vue
@@ -14,7 +14,7 @@
    </ul>
    <div
      class="radio_box"
      v-show="currentTypeObj[type]['upParams'] === 'classifyAttr'"
      v-show="currentTypeObj[type]['upParams'] === 'classifyAttr' && this.type !== 'bulkEdit'"
    >
      <span>分类的路径使用的属性:</span>
      <el-radio-group v-model="classifyAttr">
@@ -65,8 +65,14 @@
        size="small"
        @click="downloadTemplateFun"
        :loading="downloadLoading"
        >下载导入模板</el-button
      >
        v-if="type !== 'bulkEdit'"
        >下载导入模板</el-button>
      <el-button type="primary"
                 size="small"
                 :loading="downloadLoading"
                 @click="downloadTemplateFun"
                 v-if="type === 'bulkEdit'"
                >下载编辑模板</el-button>
      <el-button size="small" @click="dialogVisible = false">关闭</el-button>
    </template>
    <ShowImportData
@@ -93,6 +99,8 @@
  downloadBatchImportApplyTemplate,
  downloadBatchApplyCodeTemplate,
} from "../../api/batchImport/index";
import {exportCode} from '@/api/GetItem'
import func from "@/util/func";
import FormTemplate from "../FormTemplate/FormTemplate.vue";
import { getToken } from "@/util/auth";
import codeApply from "@/mixins/codeApply.js";
@@ -116,6 +124,14 @@
    type: {
      type: String,
      default: "",
    },
    tableHeadFindData:{
      type:Array,
      default:[]
    },
    selectRow:{
      type:Array,
      default:[]
    },
    resetTable: Function
  },
@@ -146,7 +162,7 @@
      return this.currentTypeObj[this.type]["action"];
    },
    upParams() {
      if (this.type === "historyImport" || this.type === "batchApplyCode") {
      if (this.type === "historyImport" || this.type === "batchApplyCode" || this.type === "bulkEdit") {
        return {
          codeClassifyOid: this.codeClassifyOid,
          classifyAttr: this.classifyAttr,
@@ -169,6 +185,7 @@
  },
  data() {
    return {
      exportArrTwo: {},
      classifyAttr: "id",
      downloadLoading: false,
      showVisible: false,
@@ -189,8 +206,19 @@
          downloadTemplateFun: downloadHistoryImportTemplate,
          upParams: "classifyAttr",
        },
        bulkEdit:{
          title: "批量编辑导入",
          tipList: [
            "1.标题带五角星的表示关键属性,带星号表示必输项",
            "2.每次仅能最多导入5000条数据(可通过nacos进行配置,推荐5000/次导入),如果出错会返回错误的数据和原因,但是正确数据可以继续保存",
            "3.请按照下载的编辑模板所使用的配置进行具体配置"
          ],
          action: "/api/ubcs-code/mdmEngineController/batchImportHistoryData",
          downloadTemplateFun: downloadHistoryImportTemplate,
          upParams: "classifyAttr",
        },
        batchImportApply: {
          title: "批量申请编码",
          title: "批量导入申请",
          tipList: [
            "1.标题带五角星的表示关键属性,带星号表示必输项",
            "2.请一定先选择/输入编码规则的码段值后再选择excel文件",
@@ -239,17 +267,38 @@
    },
    // ä¸‹è½½å¯¼å…¥æ¨¡æ¿
    downloadTemplateFun() {
      this.downloadLoading = true;
      this.downloadTemplateApi({
        codeClassifyOid: this.codeClassifyOid,
      })
        .then((res) => {
          this.$utilFunc.downloadFileByBlob(res.data, this.title + "模板.xls");
          this.downloadLoading = false;
        })
        .catch(() => {
          this.downloadLoading = false;
        });
       if(this.type !== 'bulkEdit'){
         this.downloadLoading = true;
         this.downloadTemplateApi({
           codeClassifyOid: this.codeClassifyOid,
         })
           .then((res) => {
             this.$utilFunc.downloadFileByBlob(res.data, this.title + "模板.xls");
             this.downloadLoading = false;
           })
           .catch(() => {
             this.downloadLoading = false;
           });
         return;
       }
       if(this.type === 'bulkEdit'){
         this.tableHeadFindData.map(item => item.prop)
           .forEach((prop, index) => {
             this.exportArrTwo[`attrIdIndexMap[${index}]`] = prop;
           });
         exportCode({
           codeClassifyOid: this.codeClassifyOid,
           'conditionMap[oid]': this.ids, ...this.exportArrTwo,
           limit: -1
         }).then(res => {
           // console.log('res',res)
           if (res) {
             func.downloadFileByBlobHandler(res);
             this.$message.success('下载成功,请查看!')
           }
         })
         return;
       }
    },
    onSuccess(res) {
      if (Object.keys(res.data).length === 0) {
Source/UBCS-WEB/src/components/Master/MasterEditBulk.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,40 @@
<template>
  <el-dialog
    v-if="dialogVisible"
    v-dialogDrag
    title="批量修改"
    :visible.sync="dialogVisible"
    append-to-body
  ></el-dialog>
</template>
<script>
export default {
  name: "MasterEditBulk",
  props: {
    visible: {
      type: Boolean,
      default: false,
    },
  },
  data(){
    return{
    }
  },
  computed:{
    dialogVisible: {
      get() {
        return this.visible;
      },
      set(val) {
        this.$emit("update:visible", val);
      },
    },
  }
}
</script>
<style scoped>
</style>
Source/UBCS-WEB/src/components/Master/MasterTransfer.vue
@@ -112,7 +112,7 @@
    },
    value: {
      handler(newval, oldval) {
        //console.log('value', newval)
        // console.log('value', newval)
      }
    }
  },
Source/UBCS-WEB/src/components/Master/MasterTree.vue
@@ -211,6 +211,7 @@
        this.TableRend(); // TableHeadRend() æ–¹æ³•完成后再执行 TableRend()
        this.$emit('nodeClick', this.templateOids)
        this.$emit("codeClassifyOid", this.nodeClickList.oid)
        this.$emit("nodeClickList", this.nodeClickList)
      } catch (error) {
        // å¤„理错误
        this.$message.error(error)
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -62,7 +62,7 @@
                    </el-link>
                  </template>
                </el-table-column>
                <el-table-column v-for="item in this.tableHeadFindData" v-if="!item.hidden && item.prop !== 'id' && item.prop !== 'lcstatus'"
                <el-table-column v-for="item in this.tableHeadFindData" v-if="!item.hidden && item.prop !== 'id' && item.prop !== 'lcstatus' && Object.keys(item.referConfig).length <= 0"
                                 :key="item.id"
                                 :formatter="item.formatter"
                                 :label="item.label" :prop="item.prop"
@@ -71,7 +71,14 @@
                                 :width="item.width"
                                 align="center">
                </el-table-column>
                <!--               å‚照数据-->
                <el-table-column v-for="(item,index) in referArray" key="index" v-if="Object.keys(item.referConfig).length > 0 && !item.hidden" :label="item.title" prop="jiliangdw"
                                 :show-overflow-tooltip="true" :sortable="item.sortable" :width="item.width"
                                 align="center">
                  <template slot-scope="scope">
                    <span>{{ scope.row.jiliangdwname }}</span>
                  </template>
                </el-table-column>
              </el-table>
            </div>
          </el-row>
@@ -100,7 +107,7 @@
                              :visible.sync="editvisible"
                              type="edit" @submit="EditSumbit"></FormTemplateDialog>
          <!--          æ‰¹é‡ç¼–辑-->
          <FormBulkEdit :visible.sync="bulkeditvisible"></FormBulkEdit>
<!--          <MasterEditBulk :visible.sync="bulkeditvisible" ></MasterEditBulk>-->
          <!--          æ•°æ®è¯¦æƒ…-->
          <FormTemplateDialog :codeClassifyOid="this.codeClassifyOid" :codeRuleOid="this.codeRuleOid"
                               :rowOid="this.LinkObject.oid" :templateOid="templateOid"
@@ -133,6 +140,10 @@
                          :tableData="tableData"
                          :tableHeadData="tableHeadFindData" :templateOid="templateOid"
                          :visible.sync="dialogPush"></MasterTransfer>
          <!--        å¯¼å…¥-->
          <BatchImport v-if="batchImportData.visible" v-bind="batchImportData" :resetTable="CrudRend"
                       :visible.sync="batchImportData.visible" :tableHeadData="tableHeadFindData" :selectRow="selectRow">
          </BatchImport>
          <!--          ç›¸ä¼¼é¡¹-->
          <ResembleQueryDialog :codeClassifyOid="codeClassifyOid" :codeRuleOid="this.codeRuleOid" :rowOid="rowOid"
                               :templateOid="templateOid" :visible.sync="similarVisible"></ResembleQueryDialog>
@@ -144,12 +155,6 @@
            </el-pagination>
          </div>
        </div>
      </div>
      <div>
<!--        å¯¼å…¥-->
        <BatchImport v-if="batchImportData.visible" v-bind="batchImportData" :resetTable="CrudRend"
                     :visible.sync="batchImportData.visible">
        </BatchImport>
      </div>
      <div class="bottom">
        <el-collapse v-model="visibleNames" @change="handleCollapse">
@@ -179,6 +184,7 @@
import SetPersonnel from "@/components/template/SetPersonnel";
import ResembleQueryDialog from "@/components/FormTemplate/ResembleQueryDialog.vue";
import BatchImport from '@/components/BatchImport'
import MasterEditBulk from '@/components/Master/MasterEditBulk'
import {validatenull} from "@/util/validate";
import fileInHtml from "@/components/file/inHtml.vue";
import {getUserInfo} from "@/api/system/user";
@@ -191,6 +197,7 @@
    ResembleQueryDialog,
    BatchImport,
    fileInHtml,
    MasterEditBulk
  },
  name: "Crud.vue",
  props: {
@@ -239,7 +246,10 @@
    Treedata: {
      type: Array
    },
    nodeClickList:{
      type:Array,
      default:[]
    }
  },
  data() {
    return {
@@ -250,8 +260,12 @@
      LinkList: [],
      isCodeArrayPushed: false, // ç¼–码数组添加标识变量
      CodeArray: [],
      //生命周期数组
      lcstatusArray:[],
      //参照数据数组
      referArray:[],
      islcstatusPushed:false,
      isReferPushed:false,
      // çŠ¶æ€æœç´¢
      statusSelect: "all",
      // å…³é”®å­—查询
@@ -426,7 +440,16 @@
          // console.log('lcstatusArray', this.lcstatusArray);
          this.islcstatusPushed = true;
        }
        // console.log('new',newval)
        if(!this.isReferPushed){
          if (newval.find(item => Object.keys(item.referConfig).length > 0)) {
            this.referArray.push(newval.find(item => Object.keys(item.referConfig).length > 0));
          }else {
            this.referArray.push([])
          }
        }
        this.isReferPushed=true;
        console.log('new',this.referArray)
        console.log('ss',newval.find(item => Object.keys(item.referConfig).length > 0))
        this.WupinFindValue = ''
      },
    },
@@ -521,7 +544,7 @@
        //  æ ‡å‡†ä¿®è®¢
        if (uniqueFlag === 'CODEAMEND') return this.codeAMENDHandler()
        //批量编辑
        if (uniqueFlag === 'bulkEdit') return this.bulkEditHandler()
        if (uniqueFlag === 'bulkEdit') return this.bulkEditHandler("bulkEdit")
      });
    },
    //标准申请
@@ -548,7 +571,12 @@
      }
    },
    //批量编辑
    bulkEditHandler(){
    bulkEditHandler(type){
      console.log(this.nodeClickList)
      if(this.nodeClickList.children.length >= 1){
        this.$message.warning('当前选择的分类不是叶子节点,不允许批量编辑!')
        return;
      }
      if(this.selectRow.length <= 0){
        this.$message.warning('请选择至少一条数据!')
        return;
@@ -556,7 +584,9 @@
      const Editing = this.selectRow.every(item => item.lcstatus === 'Editing');
      if (Editing) {
        this.bulkeditvisible = true;
        this.batchImportData.visible = true
        this.batchImportData.type = type
        this.batchImportData.codeClassifyOid = this.codeClassifyOid
      } else {
        this.$message.warning('选择的数据中有编码状态不是“编辑中”,不可编辑!');
      }
@@ -574,6 +604,7 @@
        // const requestData = this.selectRow.forEach(item => {
        //   return { oids: item.oid, btmName: item.btmname };
        // });
        const oids = this.selectRow.map(item => item.oid).join(',');
        applyGroupCode({oids, btmName: this.selectRow[0].btmname}).then(res => {
          if (res.data.code == 200) {
Source/UBCS-WEB/src/components/StatisticsComponent/lineChart.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,103 @@
<template>
  <div id="main">
    <basic-container>
      <v-chart :options="option" ref="chart" style="width: 100%;height:100vh"></v-chart>
    </basic-container>
  </div>
</template>
<script>
import 'echarts'
import 'echarts/lib/chart/line';
import 'echarts/lib/component/tooltip';
import 'echarts/lib/component/title';
import 'echarts/lib/component/legend';
export default {
  name: "statisticPage",
  data() {
    return {
      option: {
        color: ['red','black'],
        legend: {
          data: ['图例1', '图例2', '图例3'],
        },
        dataset: [
          {
            id: 'dataset_raw',
            source: [
              { month: 1, total: 1000, newly: 800 },
              { month: 2, total: 5000, newly: 1000 },
              { month: 3, total: 1800, newly: 1400 },
              { month: 4, total: 1500, newly: 1200 },
              { month: 5, total: 1000, newly: 1200 },
              { month: 6, total: 1500, newly: 1200 },
              { month: 7, total: 1500, newly: 1200 },
              { month: 8, total: 1500, newly: 1000 },
              { month: 9, total: 1500, newly: 1200 },
              { month: 10, total: 1500, newly: 1200 },
              { month: 11, total: 1500, newly: 1200 },
              { month: 12, total: 1500, newly: 1200 },
            ],
          },
        ],
        title: {
          text: '主题库数据统计分析',
          left:'center',
          textAlign:'center'
        },
        tooltip: {
          trigger: 'axis',
        },
        xAxis: {
          type: 'category',
          nameLocation: 'middle',
          name:'month',
          // data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] // æœˆä»½æ•°æ®
        },
        yAxis: {
          name: 'Number',
          type: 'value',
        },
        series: [
          {
            type: 'line',
            datasetId: 'dataset_raw',
            showSymbol: false,
            encode: {
              x: 'month',
              y: 'total',
              itemName: 'month',
              tooltip: ['total'],
            },
          },
          {
            type: 'line',
            datasetId: 'dataset_raw',
            showSymbol: false,
            encode: {
              x: 'month',
              y: 'newly',
              itemName: 'month',
              tooltip: ['newly'],
            },
          },
        ],
      }
    };
  },
  mounted() {
    import('echarts').then((echarts) => {
      // console.log(echarts)
      this.$nextTick(() => {
        const chartDom = this.$refs.chart.$el;
        const myChart = echarts.init(chartDom);
        myChart.setOption(this.option);
      });
    });
  },
}
</script>
<style scoped>
</style>
Source/UBCS-WEB/src/main.js
@@ -24,6 +24,8 @@
import website from '@/config/website';
import crudCommon from '@/mixins/crud';
import Divider from './components/Divider';
import ECharts from 'vue-echarts'
Vue.component('v-chart', ECharts)
// ä¸šåŠ¡ç»„ä»¶
import tenantPackage from './views/system/tenantpackage';
import enupackage from "@/views/modeling/enupackage";
Source/UBCS-WEB/src/views/MasterData/items.vue
@@ -15,6 +15,7 @@
          @tableHeadBttoms="tableHeadBttoms"
          @tableHeadDataFateher="tableHeadDatas"
          @tableHeadFindData="tableHeadFindDatas"
          @nodeClickList="nodeClickLists"
          @total="totals"
        >
        </master-tree>
@@ -35,6 +36,7 @@
        :tableHeadFindData="tableHeadFindData"
        :templateOid="templateOid"
        :total="this.total"
        :nodeClickList="this.nodeClickList"
        @currentPage="currentPages"
        @pageSize="pageSizes"
      >
@@ -67,12 +69,16 @@
      total: "",
      isLoading: false,
      tableHeadFindData: {},
      TreeValue: ''
      TreeValue: '',
      nodeClickList:[]
    }
  },
  created() {
  },
  methods: {
    nodeClickLists(val){
      this.nodeClickList=val;
    },
    TreeValueEmit(val) {
      this.TreeValue = val
    },
Source/UBCS-WEB/src/views/statistic/statisticPage.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
<template>
<lineChart></lineChart>
</template>
<script>
import lineChart from "../../components/StatisticsComponent/lineChart"
export default {
  components: {
    lineChart
  },
  name: "statisticPage",
  data(){
    return{
    }
  }
}
</script>
<style scoped>
</style>
Source/UBCS-WEB/src/views/wel/Statistic.vue
@@ -9,6 +9,7 @@
               top='-40px'>
      <el-table
        ref="TableBox"
        v-loading="TableLoading"
        :data="Crud.data"
        border
        style="width: 100%"
@@ -66,6 +67,7 @@
  name: "Statistic",
  data() {
    return {
      TableLoading: false,
      loading: true,
      Crud: {
        form: '',
@@ -120,30 +122,27 @@
      // console.log(row)
      this.SelectRow = row;
    },
    SaveHandler() {
    async SaveHandler() {
      if (this.SelectRow.length <= 0) {
        this.$message.warning('请选择一条数据!')
        return
        this.$message.warning('请选择一条数据!');
        return;
      }
      let mdmNameList = [];
      mdmNameList = this.SelectRow.map(item => {
        return item.code
      })
      console.log(mdmNameList)
      save(this.userId, mdmNameList).then(res => {
        console.log(res)
        if (res.data.code === 200) {
          this.$message.success('保存成功!')
          //清除已有数组中push数据
      this.TableLoading = true;
      try {
        const {data: {code}} = await save(this.userId, this.SelectRow.map(item => item.code));
        if (code === 200) {
          this.$message.success('保存成功!');
          this.newData = [];
          this.option.data = []
          this.MasterGetList()
          this.option.data = [];
          this.MasterGetList();
          this.dialogTableVisible = false;
          //字体和边框重新加载
          this.TableLoading = false;
          this.loading = true;
          this.FontInfo()
          this.FontInfo();
        }
      })
      } catch {
        this.TableLoading = false;
      }
    },
    MoreHandler() {
      this.dialogTableVisible = true;
Source/UBCS-WEB/vue.config.js
@@ -26,9 +26,9 @@
    proxy: {
      '/api': {
        //本地服务接口地址
        target: 'http://127.0.0.1:37000',
        // target: 'http://127.0.0.1:37000',
        // target: 'http://192.168.1.51:37000',
        // target: 'http://dev.vci-tech.com:37000',
        target: 'http://dev.vci-tech.com:37000',
        //yxc
        // target: 'http:// 192.168.0.104:37000',
        // target: 'http://192.168.0.105:37000',