【jeecg-boot】jeecg-boot的一些功能扩展:

news2024/9/28 5:53:24

文章目录

        • 一、Template里面将数组对象里面的值遍历=>对象的key
        • 二、利用ES6的解构赋值互换数组数据:
        • 三、a-select实现可输入可下拉:
        • 四、a-table实现动态表头:
        • 五、jeecg-boot列自定义:
        • 六、jeecg-boot合计行:


一、Template里面将数组对象里面的值遍历=>对象的key

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

二、利用ES6的解构赋值互换数组数据:

在这里插入图片描述
在这里插入图片描述

一定要注意写分号,否则解构赋值代码会报错

三、a-select实现可输入可下拉:

在这里插入图片描述

#### 一、a-select实现可输入可下拉
a-select改为:  a-auto-complete并添加 <template slot="dataSource">...</template>

eg:
<a-form-model-item label="作业通知单列表" prop="workNo">
  <a-auto-complete v-model="sendCarParam.workNo" showSearch allowClear optionLabelProp="label"
    style="width: 100%;" :filter-option="filterOption" mode="combobox">
    <template slot="dataSource">
      <a-select-option v-for="item in ladingBillWorkList" :key="item.id" :value="item.workNo"
        :label="item.workNo">
        {{ item.workNo }}
      </a-select-option>
    </template>
  </a-auto-complete>
</a-form-model-item>

四、a-table实现动态表头:

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

如果存在列定义时【一般情况下,动态表头不用加列定义,这个可以忽略】,(1)将图中columns改为defColumns,(2)并将this.columns= [] this.settingColumns= []加上,(3)this.initColumns();放在 this.getSuperFieldList();一起,(4)去除created里面的this.initColumns();和 this.getSuperFieldList();
在这里插入图片描述

五、jeecg-boot列自定义:

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

<template>
  <a-card :bordered="false">
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :xl="4" :lg="7" :md="8" :sm="24">
            <a-form-item label="车牌号码">
              <j-input placeholder="请输入车牌号码" v-model="queryParam.carNumber" />
            </a-form-item>
          </a-col>
          <a-col :xl="4" :lg="7" :md="8" :sm="24">
            <a-form-item label="过磅类型">
              <!-- <j-dict-select-tag placeholder="请选择过磅类型" v-model="queryParam.poundType" dictCode="weight_poundType" /> -->
              <j-input placeholder="请输入过磅类型" v-model="queryParam.poundType" />
            </a-form-item>
          </a-col>
          <a-col :xl="4" :lg="7" :md="8" :sm="24">
            <a-form-item label="数据状态">
              <j-dict-select-tag placeholder="请选择数据状态" v-model="queryParam.dataStatus" dictCode="weight_dataStatus" />
            </a-form-item>
          </a-col>
          <a-col :xl="2" :lg="7" :md="8" :sm="24">
            <a-form-item>
              <j-dict-select-tag v-model="timeType" dictCode="weight__searchTimeType" @change="handleChange" />
            </a-form-item>
          </a-col>
          <a-col :xl="7" :lg="11" :md="12" :sm="24">
            <a-form-item v-if="timeType == 'tareWeightTime'">
              <j-date placeholder="请选择开始日期" v-model="queryParam.tareWeightTime_begin" class="query-group-cust"
                :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" />
              <span class="query-group-split-cust"></span>
              <j-date placeholder="请选择结束日期" v-model="queryParam.tareWeightTime_end" class="query-group-cust"
                :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" />
            </a-form-item>
            <a-form-item v-else>
              <j-date placeholder="请选择开始日期" v-model="queryParam.grossWeightTime_begin" class="query-group-cust"
                :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" />
              <span class="query-group-split-cust"></span>
              <j-date placeholder="请选择结束日期" v-model="queryParam.grossWeightTime_end" class="query-group-cust"
                :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" />
            </a-form-item>
          </a-col>
          <a-col :xl="3" :lg="7" :md="8" :sm="24">
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
              <a-button type="primary" @click="searchQuery" icon="search">{{ $t('common.search') }}</a-button>
              <a-button type="primary" @click="SearchReset" icon="reload" style="margin-left: 8px">
                {{ $t('common.reset') }}</a-button>
            </span>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!-- 查询区域-END -->

    <!-- 操作按钮区域 -->
    <div class="table-operator">
      <a-button type="primary" icon="download" @click="handleExportXls('过磅记录表')">{{ $t('common.export') }}</a-button>
      <!-- 高级查询区域 -->
      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery">
      </j-super-query>
    </div>

    <!-- table区域-begin -->
    <div>
      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
        <i class="anticon anticon-info-circle ant-alert-icon"></i> {{ $t('common.selected') }}
        <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>{{ $t('common.term') }}
        <a style="margin-left: 24px" @click="onClearSelected">{{ $t('common.clear') }}</a>
        <span style="float:right;">
          <a @click="loadData()"><a-icon type="sync" />{{ $t('common.refresh') }}</a>
          <a-divider type="vertical" />
          <a-popover title="自定义列" trigger="click" placement="leftBottom">
            <template slot="content">
              <a-checkbox-group @change="onColSettingsChange" v-model="settingColumns" :defaultValue="settingColumns">
                <a-row style="width: 400px">
                  <template v-for="item in defColumns">
                    <template v-if="item.key != 'rowIndex' && item.dataIndex != 'action'">
                      <a-col :span="12">
                        <a-checkbox :value="item.dataIndex">
                          <j-ellipsis :value="item.title" :length="10"></j-ellipsis>
                        </a-checkbox>
                      </a-col>
                    </template>
                  </template>
                </a-row>
              </a-checkbox-group>
            </template>
            <a> <a-icon type="setting" />{{ $t('common.setting') }}</a>
          </a-popover>
        </span>
      </div>

      <!--  :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" -->
      <a-table ref="table" size="middle" :scroll="{ x: true }" bordered rowKey="id" :columns="columns"
        :dataSource="dataSource" :pagination="ipagination" :loading="loading" class="j-table-force-nowrap"
        @change="handleTableChange" v-bind="tableProps">

        <template slot="htmlSlot" slot-scope="text">
          <div v-html="text"></div>
        </template>
        <template slot="imgSlot" slot-scope="text, record">
          <i v-if="!text || text.length == 0">无图片</i>
          <a v-else @click="handelPrevew(record, 'img')">图片</a>
        </template>
        <template slot="videoSlot" slot-scope="text, record">
          <i v-if="!text || text.length == 0">无视频</i>
          <a v-else @click="handelPrevew(record, 'video')">视频</a>
        </template>
        <template slot="fileSlot" slot-scope="text">
          <i v-if="!text || text.length == 0">无文件</i>
          <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)">
            下载
          </a-button>
        </template>

        <span slot="action" slot-scope="text, record" style="display:flex;justify-content:space-evenly">
          <a @click="handleEdit(record)">{{ $t('common.detail') }}</a>
        </span>
      </a-table>
    </div>

    <variety-type-modal ref="modalForm" @ok="modalFormOk"></variety-type-modal>
    <filePreview ref="filePreview" />
  </a-card>
</template>

<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { pageTotalDigit } from '@/utils/util';
import { JeecgListMixinNoIsorter } from '@/mixins/JeecgListMixinNoIsorter'
import VarietyTypeModal from './modules/VarietyTypeModal'
import { filterMultiDictText, filterDictTextByCache } from '@/components/dict/JDictSelectUtil'
import Vue from 'vue'
import filePreview from '@/components/filePreview'

export default {
  name: 'WeightHistoryList',
  mixins: [JeecgListMixinNoIsorter, mixinDevice],
  components: {
    VarietyTypeModal, filePreview
  },
  data() {
    return {
      description: '过磅记录',

      queryParam: {
        grossWeightTime_begin: this.$moment(new Date()).startOf("day").format('YYYY-MM-DD HH:mm:ss'),
        grossWeightTime_end: this.$moment(new Date()).endOf('day').format('YYYY-MM-DD HH:mm:ss'),
      },
      timeType: 'grossWeightTime',

      columns: [], //表头
      settingColumns: [], //列设置
      defColumns: [//列定义
        {
          title: '序号',
          width: 60,
          align: "center",
          key: 'rowIndex',
          dataIndex: 'rowIndex',
          customRender: function (text, r, index) {
            return (text !== '总计') ? (parseInt(index) + 1) : text
          }
        },
        {
          title: '流水单号',
          align: "center",
          width: 180,
          dataIndex: 'serialNumber'
        },
        {
          title: '过磅类型',
          align: "center",
          width: 100,
          dataIndex: 'poundType',
          // customRender: (text) => {
          //   return filterDictTextByCache('weight_poundType', text);
          // }
        },
        {
          title: '车牌号码',
          align: "center",
          width: 100,
          dataIndex: 'carNumber',
        },
        {
          title: '供应商/发货单位',
          align: "left",
          width: 180,
          dataIndex: 'consigner'
        },
        {
          title: '客户/收货单位',
          align: "left",
          width: 180,
          dataIndex: 'consignee'
        },
        {
          title: '货品',
          align: "center",
          width: 100,
          dataIndex: 'variety'
        },
        {
          title: '毛重',
          align: "center",
          width: 100,
          dataIndex: 'grossWeight'
        },
        {
          title: '皮重',
          align: "center",
          width: 100,
          dataIndex: 'tareWeight'
        },
        {
          title: '净重',
          align: "center",
          width: 100,
          dataIndex: 'netWeight'
        },
        {
          title: '毛重司磅员',
          align: "center",
          width: 100,
          dataIndex: 'grossWeighman'
        },
        {
          title: '毛重称重时间',
          align: "center",
          width: 180,
          dataIndex: 'grossWeightTime'
        },
        {
          title: '皮重司磅员',
          align: "center",
          width: 100,
          dataIndex: 'tareWeighman'
        },
        {
          title: '皮重称重时间',
          align: "center",
          width: 150,
          dataIndex: 'tareWeightTime'
        },
        {
          title: '数据状态',
          align: "center",
          width: 100,
          dataIndex: 'dataStatus',
          // customRender: (text) => {
          //   return filterDictTextByCache('weight_dataStatus', text);
          // }
        },
        {
          title: '一次过磅时间',
          align: "center",
          width: 150,
          dataIndex: 'firstWeighingTime'
        },
        {
          title: '二次过磅时间',
          align: "center",
          width: 150,
          dataIndex: 'secondWeighingTime'
        },
        {
          title: '图片',
          align: "center",
          width: 100,
          dataIndex: 'pictureList',
          scopedSlots: { customRender: "imgSlot" }
        },
        {
          title: '视频',
          align: "center",
          width: 100,
          dataIndex: 'videoList',
          scopedSlots: { customRender: "videoSlot" }
        },
        {
          title: '更新时间',
          align: "center",
          width: 150,
          dataIndex: 'updateTime'
        },
        {
          title: '更新人',
          align: "center",
          width: 100,
          dataIndex: 'updateUser'
        },
        {
          title: '操作',
          align: "center",
          fixed: "right",
          width: 147,
          dataIndex: 'action',
          scopedSlots: { customRender: 'action' }
        }
      ],
      dictOptions: {},
      superFieldList: [],
      dataSource: [],

      newArr: [],
      newDataSource: [],
      footerDataSource: [],
      url: {
        list: "/kd/weightInfo/findInfo",
        delete: "/kd/weightInfo/delete",
        deleteBatch: "/kd/weightInfo/deleteBatch",
        exportXlsUrl: "/weightinfo/findInfoExport",
        importExcelUrl: "/kd/weightInfo/importExcel",
      },
    }
  },
  created() {
    this.initColumns();
    this.getSuperFieldList();
  },
  computed: {
    importExcelUrl: function () {
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
    },
    // 数据表格的固定属性
    tableProps() {
      let tableProps = {
        size: 'middle',
        rowKey: 'rowIndex',
        columns: this.columns,
        scroll: { x: true },
      }
      let renderFooter = this.footerDataSource.length === 0 ? null : () => this.renderTableFooter(tableProps)
      return {
        ...tableProps,
        ref: 'table',
        class: 'chart-data-list',
        pagination: this.ipagination,
        columns: this.columns,
        dataSource: this.dataSource,
        footer: renderFooter,
      }
    },
  },
  watch: {
    dataSource: function (val) {
      this.newDataSource = val
      this.dataHandling(1, this.ipagination.pageSize)
    },
    //update-begin---author:wangshuai ---date:20220209  for:[JTC-494]常用示例->表格合计写法改成新的写法------------
    'pageSwitch': function (val) {
      if (!val) {
        this.dataHandling('-1', 0)
      } else {
        this.dataHandling(1, this.ipagination.pageSize)
      }
    },
    'ipagination.current': function (val) {
      this.dataHandling(val, this.ipagination.pageSize)
    },
    //当合计行变化时,绑定滚动条
    'footerDataSource': {
      async handler(dataSource) {
        // 当底部合计行有值,并且显示出来时,再同步滚动条
        if (dataSource && dataSource.length > 0) {
          await this.$nextTick()
          // 同步表与footer滚动
          let dom = this.$refs.table.$el.querySelectorAll('.ant-table-body')[0]
          let footerDom = this.$refs.footerTable.$el.querySelectorAll('.ant-table-body')[0]
          dom.addEventListener('scroll', () => {
            footerDom.scrollLeft = dom.scrollLeft
          }, true)
        }
      },
      //update-end---author:wangshuai ---date:20220209  for:[JTC-494]常用示例->表格合计写法改成新的写法------------
    },
  },
  methods: {
    getSuperFieldList() {
      let fieldList = [];
      fieldList.push({ type: 'string', value: 'serialNumber', text: '流水号', dictCode: '' })
      fieldList.push({ type: 'string', value: 'carNumber', text: '车号', dictCode: '' })
      // fieldList.push({ type: 'string', value: 'poundType', text: '过磅类型', dictCode: 'weight_poundType' })
      fieldList.push({ type: 'string', value: 'poundType', text: '过磅类型', dictCode: '' })
      fieldList.push({ type: 'string', value: 'consigner', text: '发货单位', dictCode: '' })
      fieldList.push({ type: 'string', value: 'consignee', text: '收货单位', dictCode: '' })
      fieldList.push({ type: 'string', value: 'variety', text: '货名', dictCode: '' })
      fieldList.push({ type: 'string', value: 'specification', text: '规格', dictCode: '' })
      fieldList.push({ type: 'BigDecimal', value: 'grossWeight', text: '毛重', dictCode: '' })
      fieldList.push({ type: 'BigDecimal', value: 'tareWeight', text: '皮重', dictCode: '' })
      fieldList.push({ type: 'BigDecimal', value: 'netWeight', text: '净重', dictCode: '' })
      fieldList.push({ type: 'string', value: 'grossWeighman', text: '毛重司磅员', dictCode: '' })
      fieldList.push({ type: 'datetime', value: 'grossWeightTime', text: '毛重时间' })
      fieldList.push({ type: 'string', value: 'tareWeighman', text: '皮重司磅员', dictCode: '' })
      fieldList.push({ type: 'datetime', value: 'tareWeightTime', text: '皮重时间' })
      fieldList.push({ type: 'string', value: 'dataStatus', text: '数据状态', dictCode: 'weight_dataStatus' })
      fieldList.push({ type: 'datetime', value: 'firstWeighingTime', text: '一次过磅时间' })
      fieldList.push({ type: 'datetime', value: 'secondWeighingTime', text: '二次过磅时间' })
      this.superFieldList = fieldList
    },
    //列设置更改事件
    onColSettingsChange(checkedValues) {
      var key = this.$route.name + ":colsettings";
      Vue.ls.set(key, checkedValues, 7 * 24 * 60 * 60 * 1000)
      this.settingColumns = checkedValues;
      const cols = this.defColumns.filter(item => {
        if (item.key == 'rowIndex' || item.dataIndex == 'action') { return true }
        if (this.settingColumns.includes(item.dataIndex)) { return true }
        return false
      })
      this.columns = cols;
    },
    initColumns() {
      var key = this.$route.name + ":colsettings";
      let colSettings = Vue.ls.get(key);
      if (colSettings == null || colSettings == undefined) {
        let allSettingColumns = [];
        this.defColumns.forEach(function (item, i, array) {
          allSettingColumns.push(item.dataIndex);
        })
        this.settingColumns = allSettingColumns;
        this.columns = this.defColumns;
      } else {
        this.settingColumns = colSettings;
        const cols = this.defColumns.filter(item => {
          if (item.key == 'rowIndex' || item.dataIndex == 'action') { return true }
          if (colSettings.includes(item.dataIndex)) { return true }
          return false;
        })
        this.columns = cols;
      }
    },
    /** 表格增加合计行 */
    tableAddTotalRow(columns, dataSource) {
      let numKey = 'rowIndex'
      let totalRow = { [numKey]: '合计' }
      columns.forEach(column => {
        let { key, dataIndex } = column
        if (![key, dataIndex].includes(numKey)) {
          let total = 0
          dataSource.forEach(data => {
            total += /^\d+\.?\d?$/.test(data[dataIndex]) ? Number.parseInt(data[dataIndex]) : Number.NaN
          })
          if (Number.isNaN(total)) { total = '-' }
          totalRow[dataIndex] = total
        }
      })
      dataSource.push(totalRow)
    },
    //update-begin---author:wangshuai ---date:20220209  for:[JTC-494]常用示例->表格合计写法改成新的写法------------
    /*如果分页走这个方法*/
    dataHandling(pageNo, pageSize) {
      //根据当前页数和每页显示条数分割数组
      let arrs = [];
      //如果pageNo不是-1(不分页),那么需要对数据进行分页计算
      if (pageNo != -1) {
        arrs = this.newDataSource.slice((pageNo - 1) * pageSize, pageNo * pageSize)
      } else {
        arrs = this.newDataSource
      }
      let newDataSource = [];
      let newArr = {};
      newArr.rowIndex = "总计"
      let grossWeight = 0;//毛重
      let tareWeight = 0;//皮重
      let netWeight = 0;//净重
      let money = 0;//金额
      //每一项的数值相加
      for (let j = 0; j < arrs.length; j++) {
        grossWeight += Number(arrs[j].grossWeight);
        tareWeight += Number(arrs[j].tareWeight);
        netWeight += Number(arrs[j].netWeight);
        money += Number(arrs[j].money);
      }
      newArr.grossWeight = pageTotalDigit(grossWeight);
      newArr.tareWeight = pageTotalDigit(tareWeight);
      newArr.netWeight = pageTotalDigit(netWeight);
      newArr.money = pageTotalDigit(money);
      newDataSource.push(newArr);
      //给foot底部数组赋值
      this.footerDataSource = newDataSource;
    },
    // 渲染表格底部合计行
    renderTableFooter(tableProps) {
      let h = this.$createElement
      return h('a-table', {
        ref: 'footerTable',
        props: {
          ...tableProps,
          pagination: false,
          dataSource: this.footerDataSource,
          showHeader: false,
        },
      })
      //update-end---author:wangshuai ---date:20220209  for:[JTC-494]常用示例->表格合计写法改成新的写法------------
    },
    // 图片或视频预览
    handelPrevew(record, type) {
      this.$nextTick(() => {
        this.$refs.filePreview.init(record, type);
      });
    },
    handleChange() {
      this.queryParam.tareWeightTime_begin = null
      this.queryParam.tareWeightTime_end = null
      this.queryParam.grossWeightTime_begin = null
      this.queryParam.grossWeightTime_end = null
      this.queryParam[this.timeType + '_begin'] = this.$moment(new Date()).startOf('day').format('YYYY-MM-DD HH:mm:ss')
      this.queryParam[this.timeType + '_end'] = this.$moment(new Date()).endOf('day').format('YYYY-MM-DD HH:mm:ss')
    },
    // 重置按钮
    SearchReset() {
      this.timeType = 'grossWeightTime'
      this.queryParam = {
        grossWeightTime_begin: this.$moment(new Date()).startOf("day").format('YYYY-MM-DD HH:mm:ss'),
        grossWeightTime_end: this.$moment(new Date()).endOf('day').format('YYYY-MM-DD HH:mm:ss'),
      }
      this.loadData(1)
    },
  }
}
</script>


<style scoped>
@import '~@assets/less/common.less';

/* // 解决合计行样式问题 */
/deep/.chart-data-list .ant-table-footer .ant-table-body {
  overflow: hidden !important;
}

/deep/.ant-table-footer {
  padding: 0 !important;
}
</style>

六、jeecg-boot合计行:

在这里插入图片描述

代码见上面

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/571049.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Android 逆向工程,反编译心得

前言 apk的反编译是我们在Android开发中绕不开的一个坎&#xff0c;对于反编译这门技术&#xff0c;我们应该抱着学习的态度&#xff0c;学的越多&#xff0c;也越能防备别人反编译我们&#xff0c;这就是所谓的知己知彼吧&#xff0c;哈哈 需要准备的工具 Apktool&#xff…

centos下Harbor的安装(超详细+避坑)

前提 这篇文章讲的是在我的本地虚拟机上安装Harbor的一些过程和中途所遇到的一些问题和排除问题的情况说明&#xff1b;安装好的harbor的访问信息如下&#xff1a;http://192.168.45.146:8033/harbor&#xff08;admin/Harbor12345&#xff09;环境 本次所使用的环境和软件的各…

国外APP外包开发及上线流程

现在很多APP都做成全球通用版&#xff0c;尤其是一些小游戏类的APP&#xff0c;玩法全球基本都类似&#xff0c;在多个国家上线多个销售渠道。今天和大家分享一下Google Play上线流程及注意事项&#xff0c;希望对大家有所帮助。北京木奇移动技术有限公司&#xff0c;专业的软件…

ChatGPT:AI时代的创造力激活

《你好&#xff0c;ChatGPT》是一本深入探索人工智能&#xff08;AI&#xff09;领域的畅销书籍&#xff0c;它以ChatGPT为切入点&#xff0c;系统地介绍了AI和AIGC的基础概念、技术原理、应用领域和未来展望。这本书通俗易懂&#xff0c;由浅入深&#xff0c;层层递进&#xf…

WMS仓储管理系统解决方案能帮助电子企业解决哪些问题

WMS仓储管理系统解决方案是一种针对仓库管理的软件系统&#xff0c;它能够有效地解决电子企业在仓储管理方面的问题。在电子行业&#xff0c;由于产品的生命周期较短&#xff0c;且需求变化快速&#xff0c;WMS仓库管理系统的应用对于电子企业的管理有着重要的意义。本文将探讨…

DATAV通过配置nginx代理实现https访问

DATAV通过配置nginx代理实现https访问 首先要确保你的 datav 和 datav_proxy 的界面能用http正常访问 在nginx中添加datav配置 server {listen 8181 ssl;server_name localhost;ssl_certificate server.crt;ssl_certificate_key server.key;ssl_session_cache …

“来此加密“:轻松在线申请多域名和泛域名SSL证书

启用SSL证书是网站安全的关键。它加密数据传输&#xff0c;防止黑客窃听和篡改。SSL证书提升网站可信度&#xff0c;增加用户信任。搜索引擎更青睐启用SSL证书的网站&#xff0c;提高可见性和流量。此外&#xff0c;SSL证书还防止钓鱼和恶意软件威胁&#xff0c;保护用户安全。…

A-21S吸金树脂在金矿尾水、镀金废水中回收金的应用

吸金树脂Tulsimer A-21S 一、技术介绍 传统上使用活性碳吸附金子&#xff0c;珍贵的金会被活性碳吸附于表面&#xff0c;再藉由洗涤或直接焚烧以回收金。使用离子交换树脂回收贵金属比活性碳还具有多方面的优势&#xff0c; 因为藉由特殊制造过程中&#xff0c; 我们可以在其结…

python---动态类型

动态类型&#xff1a;是指在程序运行过程中&#xff0c;变量的类型可能会发生改变。 a的类型随着程序运行过程中会发生改变。 后面写不写类型是无所谓的&#xff01; 相比之下静态类型的语言是更好的&#xff01; 代码注释 可以使用’‘’ ‘’‘ / #来对代码进行注释

03_堆+MAT工具

堆栈方法区的关系&#xff1a; HotSpot是使用指针的方式来访问对象&#xff1a; Java堆中会存放访问类元数据的地址 reference存储的就是对象的地址 三种JVM&#xff1a; Sun公司的HotSpotBEA公司的JRockitIBM公司的J9 VM 一、堆体系概述 Java7之前 Heap 堆&#xff1a;一个…

LabVIEWCompactRIO 开发指南36 确定“Clock Ticks”或模拟时间

LabVIEWCompactRIO 开发指南36 确定“Clock Ticks”或模拟时间 桌面执行节点可以控制模拟时间&#xff0c;因此开发人员可以使用模拟I/O在开发计算机上执行期间更改关键点的激励。要成功使用此功能&#xff0c;需要测量FPGA VI完成所需的时间&#xff0c;或者需要以直观地知道…

将矩阵各行顺序进行反排numpy.flipud()

【小白从小学Python、C、Java】 【计算机等考500强证书考研】 【Python-数据分析】 将矩阵各行顺序进行反排 numpy.flipud() [太阳]选择题 请问关于以下代码的表述错误的是&#xff1f; import numpy as np a np.array([[1,2,3],[4,5,6],[7,8,9]]) print("【显示】a: \…

PLC/DCS系统中电磁干扰的来源及解决办法

自动化系统中所使用的各种类型DCS/PLC等自动化设备&#xff0c;有的是集中安装在控制室&#xff0c;有的是安装在生产现场和各种电机设备上&#xff0c;它们大多处在强电电路和强电设备所形成的恶劣电磁环境中。要提高这类控制系统可靠性&#xff0c;必须消除各种干扰才能有效保…

lwIP更新记08:TCP 回调函数中调用 tcp_abort 终于安全了

从 lwIP-1.4.0 开始&#xff0c;tcp 回调函数中调用 tcp_abort 函数终于安全了。 在此之前&#xff0c;如果从 tcp 回调函数中调用 tcp_abort&#xff0c;则会访问未分配的内存。 应用程序关闭连接&#xff0c;正常情况下是调用 tcp_close 函数&#xff0c;经过 4 次握手安全的…

XSS - 跨站脚本攻击

一、XSS简介。 XSS跨站脚本&#xff08;Cross-Site Scripting&#xff0c;XSS&#xff09;自1996年诞生以来&#xff0c;如今已经历十多年的演化。由于和另一种网页技术-层叠样式表&#xff08;Cascading Style Sheets&#xff0c;CSS&#xff09;的缩写一样&#xff0c;为了防…

Netty和Tomcat的区别、性能对比

文章目录 一、Netty和Tomcat有什么区别&#xff1f;二、为什么Netty受欢迎&#xff1f;三、Netty为什么并发高 &#xff1f; 一、Netty和Tomcat有什么区别&#xff1f; Netty和Tomcat最大的区别就在于通信协议&#xff0c;Tomcat是基于Http协议的&#xff0c;他的实质是一个基…

【AI创作】用AI创作助手写的文章--提问Git系列

目录 解释 Git 的基本概念和使用方式。Git 的使用方式如下&#xff1a; git常用命令有哪些&#xff1f;git异常报错解决方法最后 解释 Git 的基本概念和使用方式。 Git 是一种分布式版本控制系统&#xff0c;它通过记录文件的变化来管理文件版本&#xff0c;可以保存文件的历史…

在树莓派上控制GPIO常用的编程语言有哪些

在树莓派上控制GPIO(General Purpose Input Output,通用输入输出接口),比较常用和简单的编程语言有: 1. Python 这是树莓派官方推荐语言&#xff0c;控制GPIO只需要导入RPi.GPIO库,简单易学,代码如下: import RPi.GPIO as GPIOGPIO.setmode(GPIO.BCM) GPIO.setup(18, GPIO.…

​路由器端口映射怎么设置?内网IP不能映射怎么办?​

使用路由器后&#xff0c;Internet用户无法访问到局域网内的主机&#xff0c;因此不能访问内网搭建的Web、FTP、Mail等服务器。路由器 端口映射功能可以实现将内网的服务器映射到Internet&#xff0c;从而实现服务器对外开放。 建议在设置路由器端口映射之前&#xff0c;确认以…

ServletOutputStream下载文件名中文乱码或不显示

废话不多说&#xff0c;直接上代码。。。 下载文件名中文乱码或不显示情况 下载文件名是一道下滑线 改造代码 pdfName是下载文件的名字&#xff0c;带后缀。 String s URLEncoder.encode(pdfName, "utf-8").replaceAll("\\", "%20"); Stri…