billion-generator/src/main/resources/vm/vue/index.vue.vm
@@ -61,7 +61,7 @@ #end #end #end <el-form-item> <el-form-item style="float: right"> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> </el-form-item> @@ -110,11 +110,11 @@ v-hasPermi="['${moduleName}:${businessName}:export']" >导åº</el-button> </el-col> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> ## <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> <el-table v-loading="loading" :data="${businessName}List" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> <el-table border v-loading="loading" :data="${businessName}List" @selection-change="handleSelectionChange"> <el-table-column show-overflow-tooltip="true" type="selection" width="55" align="center" /> #foreach($column in $columns) #set($javaField=$column.javaField) #set($parentheseIndex=$column.columnComment.indexOf("ï¼")) @@ -148,24 +148,24 @@ <el-table-column label="${comment}" align="center" prop="${javaField}" /> #end #end <el-table-column label="æä½" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['${moduleName}:${businessName}:edit']" >ä¿®æ¹</el-button> <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['${moduleName}:${businessName}:remove']" >å é¤</el-button> </template> </el-table-column> ## <el-table-column label="æä½" align="center" class-name="small-padding fixed-width"> ## <template slot-scope="scope"> ## <el-button ## size="mini" ## type="text" ## icon="el-icon-edit" ## @click="handleUpdate(scope.row)" ## v-hasPermi="['${moduleName}:${businessName}:edit']" ## >ä¿®æ¹</el-button> ## <el-button ## size="mini" ## type="text" ## icon="el-icon-delete" ## @click="handleDelete(scope.row)" ## v-hasPermi="['${moduleName}:${businessName}:remove']" ## >å é¤</el-button> ## </template> ## </el-table-column> </el-table> <pagination @@ -350,7 +350,7 @@ </template> <script> import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"; import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/main/${moduleName}/${businessName}"; export default { name: "${BusinessName}", billion-main/src/main/java/com/billion/main/da/controller/DaMaterialCollectionController.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,104 @@ package com.billion.main.da.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.billion.common.annotation.Log; import com.billion.common.core.controller.BaseController; import com.billion.common.core.domain.AjaxResult; import com.billion.common.enums.BusinessType; import com.billion.main.da.domain.DaMaterialCollection; import com.billion.main.da.service.IDaMaterialCollectionService; import com.billion.common.utils.poi.ExcelUtil; import com.billion.common.core.page.TableDataInfo; /** * ç©æééController * * @author Billion-Yi * @date 2024-11-22 */ @RestController @RequestMapping("/da/materialCollection") public class DaMaterialCollectionController extends BaseController { @Autowired private IDaMaterialCollectionService daMaterialCollectionService; /** * æ¥è¯¢ç©æééå表 */ @PreAuthorize("@ss.hasPermi('da:materialCollection:list')") @GetMapping("/list") public TableDataInfo list(DaMaterialCollection daMaterialCollection) { startPage(); List<DaMaterialCollection> list = daMaterialCollectionService.selectDaMaterialCollectionList(daMaterialCollection); return getDataTable(list); } /** * 导åºç©æééå表 */ @PreAuthorize("@ss.hasPermi('da:materialCollection:export')") @Log(title = "ç©æéé", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, DaMaterialCollection daMaterialCollection) { List<DaMaterialCollection> list = daMaterialCollectionService.selectDaMaterialCollectionList(daMaterialCollection); ExcelUtil<DaMaterialCollection> util = new ExcelUtil<DaMaterialCollection>(DaMaterialCollection.class); util.exportExcel(response, list, "ç©æééæ°æ®"); } /** * è·åç©æéé详ç»ä¿¡æ¯ */ @PreAuthorize("@ss.hasPermi('da:materialCollection:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return success(daMaterialCollectionService.selectDaMaterialCollectionById(id)); } /** * æ°å¢ç©æéé */ @PreAuthorize("@ss.hasPermi('da:materialCollection:add')") @Log(title = "ç©æéé", businessType = BusinessType.INSERT) @PostMapping public void add(@RequestBody DaMaterialCollection daMaterialCollection) { daMaterialCollectionService.insertDaMaterialCollection(daMaterialCollection); } /** * ä¿®æ¹ç©æéé */ @PreAuthorize("@ss.hasPermi('da:materialCollection:edit')") @Log(title = "ç©æéé", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody DaMaterialCollection daMaterialCollection) { return toAjax(daMaterialCollectionService.updateDaMaterialCollection(daMaterialCollection)); } /** * å é¤ç©æéé */ @PreAuthorize("@ss.hasPermi('da:materialCollection:remove')") @Log(title = "ç©æéé", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(daMaterialCollectionService.deleteDaMaterialCollectionByIds(ids)); } } billion-main/src/main/java/com/billion/main/da/domain/DaMaterialCollection.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,51 @@ package com.billion.main.da.domain; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.billion.common.annotation.Excel; import com.billion.main.common.BaseEntity; /** * ç©æéé对象 da_material_collection * * @author Billion-Yi * @date 2024-11-22 */ @Data public class DaMaterialCollection extends BaseEntity { private static final long serialVersionUID = 1L; /** 主é®id */ private Long id; /** æ»æåºåå· */ @Excel(name = "æ»æåºåå·") private String sfcCode; /** å·¥ä½ç¼ç */ @Excel(name = "å·¥ä½ç¼ç ") private String locationCode; /** åæ°ç¼ç */ @Excel(name = "åæ°ç¼ç ") private String paramCode; /** åæ°åç§° */ @Excel(name = "åæ°åç§°") private String paramName; /** åæ°å¼ */ @Excel(name = "åæ°å¼") private String paramValue; /** ééæ¶é´ */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @Excel(name = "ééæ¶é´", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") private Date collectTime; } billion-main/src/main/java/com/billion/main/da/mapper/DaMaterialCollectionMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,63 @@ package com.billion.main.da.mapper; import java.util.List; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.billion.main.da.domain.DaMaterialCollection; /** * ç©æééMapperæ¥å£ * * @author Billion-Yi * @date 2024-11-22 */ public interface DaMaterialCollectionMapper extends BaseMapper<DaMaterialCollection> { /** * æ¥è¯¢ç©æéé * * @param id ç©æééä¸»é® * @return ç©æéé */ public DaMaterialCollection selectDaMaterialCollectionById(Long id); /** * æ¥è¯¢ç©æééå表 * * @param daMaterialCollection ç©æéé * @return ç©æéééå */ public List<DaMaterialCollection> selectDaMaterialCollectionList(DaMaterialCollection daMaterialCollection); /** * æ°å¢ç©æéé * * @param daMaterialCollection ç©æéé * @return ç»æ */ public int insertDaMaterialCollection(DaMaterialCollection daMaterialCollection); /** * ä¿®æ¹ç©æéé * * @param daMaterialCollection ç©æéé * @return ç»æ */ public int updateDaMaterialCollection(DaMaterialCollection daMaterialCollection); /** * å é¤ç©æéé * * @param id ç©æééä¸»é® * @return ç»æ */ public int deleteDaMaterialCollectionById(Long id); /** * æ¹éå é¤ç©æéé * * @param ids éè¦å é¤çæ°æ®ä¸»é®éå * @return ç»æ */ public int deleteDaMaterialCollectionByIds(Long[] ids); } billion-main/src/main/java/com/billion/main/da/service/IDaMaterialCollectionService.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,63 @@ package com.billion.main.da.service; import java.util.List; import com.baomidou.mybatisplus.extension.service.IService; import com.billion.main.da.domain.DaMaterialCollection; /** * ç©æééServiceæ¥å£ * * @author Billion-Yi * @date 2024-11-22 */ public interface IDaMaterialCollectionService extends IService<DaMaterialCollection> { /** * æ¥è¯¢ç©æéé * * @param id ç©æééä¸»é® * @return ç©æéé */ public DaMaterialCollection selectDaMaterialCollectionById(Long id); /** * æ¥è¯¢ç©æééå表 * * @param daMaterialCollection ç©æéé * @return ç©æéééå */ public List<DaMaterialCollection> selectDaMaterialCollectionList(DaMaterialCollection daMaterialCollection); /** * æ°å¢ç©æéé * * @param daMaterialCollection ç©æéé * @return ç»æ */ public void insertDaMaterialCollection(DaMaterialCollection daMaterialCollection); /** * ä¿®æ¹ç©æéé * * @param daMaterialCollection ç©æéé * @return ç»æ */ public int updateDaMaterialCollection(DaMaterialCollection daMaterialCollection); /** * æ¹éå é¤ç©æéé * * @param ids éè¦å é¤çç©æéé主é®éå * @return ç»æ */ public int deleteDaMaterialCollectionByIds(Long[] ids); /** * å é¤ç©æééä¿¡æ¯ * * @param id ç©æééä¸»é® * @return ç»æ */ public int deleteDaMaterialCollectionById(Long id); } billion-main/src/main/java/com/billion/main/da/service/impl/DaMaterialCollectionServiceImpl.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,95 @@ package com.billion.main.da.service.impl; import java.util.List; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.billion.main.da.mapper.DaMaterialCollectionMapper; import com.billion.main.da.domain.DaMaterialCollection; import com.billion.main.da.service.IDaMaterialCollectionService; /** * ç©æééServiceä¸å¡å±å¤ç * * @author Billion-Yi * @date 2024-11-22 */ @Service public class DaMaterialCollectionServiceImpl extends ServiceImpl<DaMaterialCollectionMapper, DaMaterialCollection> implements IDaMaterialCollectionService { @Autowired private DaMaterialCollectionMapper daMaterialCollectionMapper; /** * æ¥è¯¢ç©æéé * * @param id ç©æééä¸»é® * @return ç©æéé */ @Override public DaMaterialCollection selectDaMaterialCollectionById(Long id) { return daMaterialCollectionMapper.selectDaMaterialCollectionById(id); } /** * æ¥è¯¢ç©æééå表 * * @param daMaterialCollection ç©æéé * @return ç©æéé */ @Override public List<DaMaterialCollection> selectDaMaterialCollectionList(DaMaterialCollection daMaterialCollection) { return daMaterialCollectionMapper.selectDaMaterialCollectionList(daMaterialCollection); } /** * æ°å¢ç©æéé * * @param daMaterialCollection ç©æéé * @return ç»æ */ @Override public void insertDaMaterialCollection(DaMaterialCollection daMaterialCollection) { this.save(daMaterialCollection); } /** * ä¿®æ¹ç©æéé * * @param daMaterialCollection ç©æéé * @return ç»æ */ @Override public int updateDaMaterialCollection(DaMaterialCollection daMaterialCollection) { return daMaterialCollectionMapper.updateDaMaterialCollection(daMaterialCollection); } /** * æ¹éå é¤ç©æéé * * @param ids éè¦å é¤çç©æééä¸»é® * @return ç»æ */ @Override public int deleteDaMaterialCollectionByIds(Long[] ids) { return daMaterialCollectionMapper.deleteDaMaterialCollectionByIds(ids); } /** * å é¤ç©æééä¿¡æ¯ * * @param id ç©æééä¸»é® * @return ç»æ */ @Override public int deleteDaMaterialCollectionById(Long id) { return daMaterialCollectionMapper.deleteDaMaterialCollectionById(id); } } billion-main/src/main/resources/mapper/da/DaMaterialCollectionMapper.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,79 @@ <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.billion.main.da.mapper.DaMaterialCollectionMapper"> <resultMap type="DaMaterialCollection" id="DaMaterialCollectionResult"> <result property="id" column="id" /> <result property="sfcCode" column="sfc_code" /> <result property="locationCode" column="location_code" /> <result property="paramCode" column="param_code" /> <result property="paramName" column="param_name" /> <result property="paramValue" column="param_value" /> <result property="collectTime" column="collect_time" /> </resultMap> <sql id="selectDaMaterialCollectionVo"> select id, sfc_code, location_code, param_code, param_name, param_value, collect_time from da_material_collection </sql> <select id="selectDaMaterialCollectionList" parameterType="DaMaterialCollection" resultMap="DaMaterialCollectionResult"> <include refid="selectDaMaterialCollectionVo"/> <where> <if test="sfcCode != null and sfcCode != ''"> and sfc_code = #{sfcCode}</if> <if test="locationCode != null and locationCode != ''"> and location_code like concat('%', #{locationCode}, '%')</if> <if test="paramCode != null and paramCode != ''"> and param_code like concat('%', #{paramCode}, '%')</if> <if test="paramName != null and paramName != ''"> and param_name like concat('%', #{paramName}, '%')</if> </where> </select> <select id="selectDaMaterialCollectionById" parameterType="Long" resultMap="DaMaterialCollectionResult"> <include refid="selectDaMaterialCollectionVo"/> where id = #{id} </select> <insert id="insertDaMaterialCollection" parameterType="DaMaterialCollection" useGeneratedKeys="true" keyProperty="id"> insert into da_material_collection <trim prefix="(" suffix=")" suffixOverrides=","> <if test="sfcCode != null">sfc_code,</if> <if test="locationCode != null">location_code,</if> <if test="paramCode != null">param_code,</if> <if test="paramName != null">param_name,</if> <if test="paramValue != null">param_value,</if> <if test="collectTime != null">collect_time,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="sfcCode != null">#{sfcCode},</if> <if test="locationCode != null">#{locationCode},</if> <if test="paramCode != null">#{paramCode},</if> <if test="paramName != null">#{paramName},</if> <if test="paramValue != null">#{paramValue},</if> <if test="collectTime != null">#{collectTime},</if> </trim> </insert> <update id="updateDaMaterialCollection" parameterType="DaMaterialCollection"> update da_material_collection <trim prefix="SET" suffixOverrides=","> <if test="sfcCode != null">sfc_code = #{sfcCode},</if> <if test="locationCode != null">location_code = #{locationCode},</if> <if test="paramCode != null">param_code = #{paramCode},</if> <if test="paramName != null">param_name = #{paramName},</if> <if test="paramValue != null">param_value = #{paramValue},</if> <if test="collectTime != null">collect_time = #{collectTime},</if> </trim> where id = #{id} </update> <delete id="deleteDaMaterialCollectionById" parameterType="Long"> delete from da_material_collection where id = #{id} </delete> <delete id="deleteDaMaterialCollectionByIds" parameterType="String"> delete from da_material_collection where id in <foreach item="id" collection="array" open="(" separator="," close=")"> #{id} </foreach> </delete> </mapper> billion-ui/src/api/main/da/materialCollection.js
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,44 @@ import request from '@/utils/request' // æ¥è¯¢ç©æééå表 export function listMaterialCollection(query) { return request({ url: '/da/materialCollection/list', method: 'get', params: query }) } // æ¥è¯¢ç©æééè¯¦ç» export function getMaterialCollection(id) { return request({ url: '/da/materialCollection/' + id, method: 'get' }) } // æ°å¢ç©æéé export function addMaterialCollection(data) { return request({ url: '/da/materialCollection', method: 'post', data: data }) } // ä¿®æ¹ç©æéé export function updateMaterialCollection(data) { return request({ url: '/da/materialCollection', method: 'put', data: data }) } // å é¤ç©æéé export function delMaterialCollection(id) { return request({ url: '/da/materialCollection/' + id, method: 'delete' }) } billion-ui/src/views/main/da/materialCollection/index.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,276 @@ <template> <div class="app-container"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form-item label-width="100" label="æ»æåºåå·" prop="sfcCode"> <el-input v-model="queryParams.sfcCode" placeholder="请è¾å ¥æ»æåºåå·" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="å·¥ä½ç¼ç " prop="locationCode"> <el-input v-model="queryParams.locationCode" placeholder="请è¾å ¥å·¥ä½ç¼ç " clearable @keyup.enter.native="handleQuery" /> </el-form-item> <!-- <el-form-item label="åæ°ç¼ç " prop="paramCode">--> <!-- <el-input--> <!-- v-model="queryParams.paramCode"--> <!-- placeholder="请è¾å ¥åæ°ç¼ç "--> <!-- clearable--> <!-- @keyup.enter.native="handleQuery"--> <!-- />--> <!-- </el-form-item>--> <!-- <el-form-item label="åæ°åç§°" prop="paramName">--> <!-- <el-input--> <!-- v-model="queryParams.paramName"--> <!-- placeholder="请è¾å ¥åæ°åç§°"--> <!-- clearable--> <!-- @keyup.enter.native="handleQuery"--> <!-- />--> <!-- </el-form-item>--> <el-form-item style="float: right"> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> </el-form-item> </el-form> <el-row :gutter="10" class="mb8"> <el-col :span="1.5"> <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['da:materialCollection:add']" >æ°å¢</el-button> </el-col> <el-col :span="1.5"> <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" v-hasPermi="['da:materialCollection:edit']" >ä¿®æ¹</el-button> </el-col> <el-col :span="1.5"> <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['da:materialCollection:remove']" >å é¤</el-button> </el-col> <el-col :span="1.5"> <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['da:materialCollection:export']" >导åº</el-button> </el-col> </el-row> <el-table border v-loading="loading" :data="materialCollectionList" @selection-change="handleSelectionChange"> <el-table-column show-overflow-tooltip="true" type="selection" width="55" align="center" /> <el-table-column label="主é®id" align="center" prop="id" /> <el-table-column label="æ»æåºåå·" align="center" prop="sfcCode" /> <el-table-column label="å·¥ä½ç¼ç " align="center" prop="locationCode" /> <el-table-column label="åæ°ç¼ç " align="center" prop="paramCode" /> <el-table-column label="åæ°åç§°" align="center" prop="paramName" /> <el-table-column label="åæ°å¼" align="center" prop="paramValue" /> <el-table-column label="ééæ¶é´" align="center" prop="collectTime" width="180"> </el-table-column> </el-table> <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> <!-- æ·»å æä¿®æ¹ç©æééå¯¹è¯æ¡ --> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form-item label="æ»æåºåå·" prop="sfcCode"> <el-input v-model="form.sfcCode" placeholder="请è¾å ¥æ»æåºåå·" /> </el-form-item> <el-form-item label="å·¥ä½ç¼ç " prop="locationCode"> <el-input v-model="form.locationCode" placeholder="请è¾å ¥å·¥ä½ç¼ç " /> </el-form-item> <el-form-item label="åæ°ç¼ç " prop="paramCode"> <el-input v-model="form.paramCode" placeholder="请è¾å ¥åæ°ç¼ç " /> </el-form-item> <el-form-item label="åæ°åç§°" prop="paramName"> <el-input v-model="form.paramName" placeholder="请è¾å ¥åæ°åç§°" /> </el-form-item> <el-form-item label="åæ°å¼" prop="paramValue"> <el-input v-model="form.paramValue" placeholder="请è¾å ¥åæ°å¼" /> </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> <el-button type="primary" @click="submitForm">ç¡® å®</el-button> <el-button @click="cancel">å æ¶</el-button> </div> </el-dialog> </div> </template> <script> import { listMaterialCollection, getMaterialCollection, delMaterialCollection, addMaterialCollection, updateMaterialCollection } from "@/api/main/da/materialCollection"; export default { name: "MaterialCollection", data() { return { // é®ç½©å± loading: true, // é䏿°ç» ids: [], // éå个ç¦ç¨ single: true, // éå¤ä¸ªç¦ç¨ multiple: true, // æ¾ç¤ºæç´¢æ¡ä»¶ showSearch: true, // æ»æ¡æ° total: 0, // ç©æééè¡¨æ ¼æ°æ® materialCollectionList: [], // å¼¹åºå±æ é¢ title: "", // æ¯å¦æ¾ç¤ºå¼¹åºå± open: false, // æ¥è¯¢åæ° queryParams: { pageNum: 1, pageSize: 10, sfcCode: null, locationCode: null, paramCode: null, paramName: null, }, // 表ååæ° form: {}, // è¡¨åæ ¡éª rules: { } }; }, created() { this.getList(); }, methods: { /** æ¥è¯¢ç©æééå表 */ getList() { this.loading = true; listMaterialCollection(this.queryParams).then(response => { this.materialCollectionList = response.rows; this.total = response.total; this.loading = false; }); }, // åæ¶æé® cancel() { this.open = false; this.reset(); }, // 表åéç½® reset() { this.form = { id: null, sfcCode: null, locationCode: null, paramCode: null, paramName: null, paramValue: null, collectTime: null }; this.resetForm("form"); }, /** æç´¢æé®æä½ */ handleQuery() { this.queryParams.pageNum = 1; this.getList(); }, /** éç½®æé®æä½ */ resetQuery() { this.resetForm("queryForm"); this.handleQuery(); }, // å¤éæ¡é䏿°æ® handleSelectionChange(selection) { this.ids = selection.map(item => item.id) this.single = selection.length!==1 this.multiple = !selection.length }, /** æ°å¢æé®æä½ */ handleAdd() { this.reset(); this.open = true; this.title = "æ·»å ç©æéé"; }, /** ä¿®æ¹æé®æä½ */ handleUpdate(row) { this.reset(); const id = row.id || this.ids getMaterialCollection(id).then(response => { this.form = response.data; this.open = true; this.title = "ä¿®æ¹ç©æéé"; }); }, /** æäº¤æé® */ submitForm() { this.$refs["form"].validate(valid => { if (valid) { if (this.form.id != null) { updateMaterialCollection(this.form).then(response => { this.$modal.msgSuccess("ä¿®æ¹æå"); this.open = false; this.getList(); }); } else { addMaterialCollection(this.form).then(response => { this.$modal.msgSuccess("æ°å¢æå"); this.open = false; this.getList(); }); } } }); }, /** å é¤æé®æä½ */ handleDelete(row) { const ids = row.id || this.ids; this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤ç©æééç¼å·ä¸º"' + ids + '"çæ°æ®é¡¹ï¼').then(function() { return delMaterialCollection(ids); }).then(() => { this.getList(); this.$modal.msgSuccess("å 餿å"); }).catch(() => {}); }, /** å¯¼åºæé®æä½ */ handleExport() { this.download('da/materialCollection/export', { ...this.queryParams }, `materialCollection_${new Date().getTime()}.xlsx`) } } }; </script> billion-ui/src/views/main/sc/collectionParamConf/index.vue
@@ -117,7 +117,7 @@ <el-table v-loading="loading" border :data="collectionParamConfList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> <el-table-column label="产åç¼ç " align="center" prop="productCode" /> <el-table-column show-overflow-tooltip="true" label="产åç¼ç " align="center" prop="productCode" /> <el-table-column label="产ååå·" align="center" prop="productType" /> <el-table-column label="å·¥ä½ç¼ç " align="center" prop="locationCode" /> <el-table-column label="åæ°ç¼ç " align="center" prop="paramCode" />