| | |
| | | @ApiOperation("信息") |
| | | public Result<TyProductModel> get(@PathVariable("id") Long id){ |
| | | TyProductModel data = tyProductModelService.get(id); |
| | | Long busid = null; |
| | | String fileName = ""; |
| | | if (StringUtils.isNotBlank(data.getOperationalStatus())&&sysOssService.get(Long.parseLong(data.getOperationalStatus()))!=null){ |
| | | busid =sysOssService.get(Long.parseLong(data.getOperationalStatus())).getBusiId(); |
| | | fileName =sysPictureBaseService.get(busid).getName(); |
| | | data.setOperationalStatus(fileName); |
| | | } |
| | | if (StringUtils.isNotBlank(data.getStandbyState())&&sysOssService.get(Long.parseLong(data.getStandbyState()))!=null){ |
| | | busid =sysOssService.get(Long.parseLong(data.getStandbyState())).getBusiId(); |
| | | fileName =sysPictureBaseService.get(busid).getName(); |
| | | data.setStandbyState(fileName); |
| | | } |
| | | if (StringUtils.isNotBlank(data.getFaultState())&&sysOssService.get(Long.parseLong(data.getFaultState()))!=null){ |
| | | busid =sysOssService.get(Long.parseLong(data.getFaultState())).getBusiId(); |
| | | fileName =sysPictureBaseService.get(busid).getName(); |
| | | data.setFaultState(fileName); |
| | | if (data.getOperatImg() != null) { |
| | | data.setOperatImgName(sysPictureBaseService.get(data.getOperatImg()).getName()); |
| | | } |
| | | return Result.ok(data); |
| | | } |
| | |
| | | @ApiOperation("信息") |
| | | public Result<XhProductModel> get(@PathVariable("id") Long id){ |
| | | XhProductModel data = xhProductModelService.get(id); |
| | | Long busid = null; |
| | | String fileName = ""; |
| | | if (StringUtils.isNotBlank(data.getOperationalStatus())&&sysOssService.get(Long.parseLong(data.getOperationalStatus()))!=null){ |
| | | busid =sysOssService.get(Long.parseLong(data.getOperationalStatus())).getBusiId(); |
| | | fileName =sysPictureBaseService.get(busid).getName(); |
| | | data.setOperationalStatus(fileName); |
| | | } |
| | | if (StringUtils.isNotBlank(data.getStandbyState())&&sysOssService.get(Long.parseLong(data.getStandbyState()))!=null){ |
| | | busid =sysOssService.get(Long.parseLong(data.getStandbyState())).getBusiId(); |
| | | fileName =sysPictureBaseService.get(busid).getName(); |
| | | data.setStandbyState(fileName); |
| | | } |
| | | if (StringUtils.isNotBlank(data.getFaultState())&&sysOssService.get(Long.parseLong(data.getFaultState()))!=null){ |
| | | busid =sysOssService.get(Long.parseLong(data.getFaultState())).getBusiId(); |
| | | fileName =sysPictureBaseService.get(busid).getName(); |
| | | data.setFaultState(fileName); |
| | | if (data.getOperatImg() != null) { |
| | | data.setOperatImgName(sysPictureBaseService.get(data.getOperatImg()).getName()); |
| | | } |
| | | return Result.ok(data); |
| | | } |
| | |
| | | List<XhProductModel> getProductList(); |
| | | |
| | | List<ProductImg> getProduct(Long productId); |
| | | |
| | | String getDefaultImg(); |
| | | } |
| | |
| | | @ApiModelProperty(value = "维修分布") |
| | | private Integer repairDistrib; |
| | | |
| | | @ApiModelProperty(value = "运行状态图片ID") |
| | | private String operationalStatus; |
| | | @ApiModelProperty(value = "运行图片ID") |
| | | private Long operatImg; |
| | | |
| | | @ApiModelProperty(value = "待机状态图片ID") |
| | | private String standbyState; |
| | | |
| | | @ApiModelProperty(value = "故障状态图片ID") |
| | | private String faultState; |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "图片名称") |
| | | private String operatImgName; |
| | | |
| | | @ApiModelProperty(value = "排序") |
| | | private Integer sort; |
| | |
| | | @ApiModelProperty(value = "节点类型") |
| | | private String productType; |
| | | |
| | | @ApiModelProperty(value = "默认图片") |
| | | private String defaultImg; |
| | | @ApiModelProperty(value = "运行图片") |
| | | private Long operatImg; |
| | | |
| | | @ApiModelProperty(value = "运行状态图片") |
| | | private String operationalStatus; |
| | | |
| | | @ApiModelProperty(value = "待机状态图片") |
| | | private String standbyState; |
| | | |
| | | @ApiModelProperty(value = "故障状态图片") |
| | | private String faultState; |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "图片名称") |
| | | private String operatImgName; |
| | | |
| | | @ApiModelProperty(value = "排序") |
| | | private Integer sort; |
| | |
| | | */ |
| | | public List<XhProductModel> page(QueryFilter queryFilter) { |
| | | List<XhProductModel> list = baseDao.getList(queryFilter.getQueryParams()); |
| | | for (XhProductModel productModel : list) { |
| | | if (productModel.getProductType().equals("1")) { |
| | | productModel.setDefaultImg(baseDao.getDefaultImg()); |
| | | if (productModel.getId() != null) { |
| | | this.update(productModel); |
| | | } |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = Constant.Q.ORDER_FIELD, value = Constant.QV.ORDER_FIELD, dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = Constant.Q.ORDER, value = Constant.QV.ORDER, dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = "contentType", value = "检索关键字", dataType = Constant.QT.STRING, format = "CONTENT_TYPE^LK"), @ApiImplicitParam(name = "systemMark", value = "系统标识", dataType = Constant.QT.STRING, format = "SYSTEM_MARK^LK")}) |
| | | @ApiImplicitParam(name = "productType", value = "检索关键字", dataType = Constant.QT.STRING, format = "CONTENT_TYPE^LK"), @ApiImplicitParam(name = "systemMark", value = "系统标识", dataType = Constant.QT.STRING, format = "SYSTEM_MARK^LK")}) |
| | | public Result<List<SysPictureBase>> page(@ApiIgnore @QueryParam QueryFilter queryFilter) { |
| | | |
| | | return Result.ok(sysPictureBaseService.page(queryFilter)); |
| | |
| | | @PostMapping("save") |
| | | @ApiOperation("保存") |
| | | @LogOperation("保存") |
| | | public Result save(@RequestBody MultipartFile file, Long id, String type, String subType, |
| | | String name, String contentType, String systemMark, Integer sortNo, String remark) { |
| | | public Result save(@RequestBody MultipartFile file, Long id, Integer isDefault, |
| | | String name, String contentType, Integer productType, String remark) { |
| | | SysPictureBase sysPictureBase; |
| | | if (id != 0) { |
| | | sysPictureBase = sysPictureBaseService.get(id); |
| | | sysPictureBase.setType(type); |
| | | sysPictureBase.setSubType(subType); |
| | | sysPictureBase.setIsDefault(isDefault); |
| | | sysPictureBase.setName(name); |
| | | sysPictureBase.setContentType(contentType); |
| | | sysPictureBase.setSystemMark(systemMark); |
| | | sysPictureBase.setSortNo(sortNo); |
| | | sysPictureBase.setProductType(productType); |
| | | sysPictureBase.setRemark(remark); |
| | | sysPictureBaseService.update(sysPictureBase); |
| | | } else { |
| | | sysPictureBase = new SysPictureBase(); |
| | | sysPictureBase.setType(type); |
| | | sysPictureBase.setSubType(subType); |
| | | sysPictureBase.setIsDefault(isDefault); |
| | | sysPictureBase.setName(name); |
| | | sysPictureBase.setContentType(contentType); |
| | | sysPictureBase.setSystemMark(systemMark); |
| | | Integer no = sysPictureBaseService.getNo(); |
| | | sysPictureBase.setSortNo(no + 1); |
| | | sysPictureBase.setProductType(productType); |
| | | sysPictureBase.setRemark(remark); |
| | | sysPictureBaseService.insert(sysPictureBase); |
| | | } |
| | | if (sysPictureBase.getIsDefault()==1){ |
| | | sysPictureBaseService.updateByDefault(sysPictureBase.getId(),sysPictureBase.getProductType()); |
| | | } |
| | | if (file != null) { |
| | | BufferedImage bufferedImage = null; |
| | | try { |
| | |
| | | |
| | | List<SysPictureBase> getList(Map<String, Object> params); |
| | | |
| | | Integer getNo(); |
| | | void updateByDefault(Long id, Integer productType); |
| | | } |
| | |
| | | public class SysPictureBase extends BusiEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "类型") |
| | | private String type; |
| | | |
| | | @ApiModelProperty(value = "子类型") |
| | | private String subType; |
| | | @ApiModelProperty(value = "是否默认") |
| | | private Integer isDefault; |
| | | |
| | | @ApiModelProperty(value = "图片名称") |
| | | private String name; |
| | |
| | | @ApiModelProperty(value = "检索关键字") |
| | | private String contentType; |
| | | |
| | | @ApiModelProperty(value = "系统标识") |
| | | private String systemMark; |
| | | |
| | | @ApiModelProperty(value = "排序") |
| | | private Integer sortNo; |
| | | @ApiModelProperty(value = "产品类型") |
| | | private Integer productType; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | private String remark; |
| | | |
| | | @TableField(exist = false) |
| | | private MultipartFile file; |
| | | |
| | | } |
| | |
| | | super.deleteLogic(ids); |
| | | } |
| | | |
| | | public Integer getNo() { |
| | | if (baseDao.getNo() == null){ |
| | | return 0; |
| | | } |
| | | return baseDao.getNo(); |
| | | public void updateByDefault(Long id, Integer productType) { |
| | | baseDao.updateByDefault(id,productType); |
| | | } |
| | | } |
| | |
| | | and a.product_type = 5 |
| | | </select> |
| | | <select id="getProduct" resultType="com.zt.life.modules.mainPart.basicInfo.model.ProductImg"> |
| | | SELECT a.default_img as imgPath, |
| | | SELECT a.operat_img as imgPath, |
| | | a.`NAME` as imgName, |
| | | 'node' as nodeType, |
| | | '' as nodeTypeExt, |
| | | s.width as imgWidth, |
| | | s.height as imgHeight, |
| | | s.width as imgWidth, |
| | | s.height as imgHeight, |
| | | a.id as dataId, |
| | | '' as statusImg, |
| | | d.dict_code as productType, |
| | |
| | | FROM product_model a |
| | | left join sys_dict_data d on d.DICT_VALUE = a.product_type and dict_type_id = '1728965873022050306' |
| | | left join param_data p on p.product_id = a.id and p.page_code = 'expect' |
| | | left join sys_picture_base s on s.id = a.default_img |
| | | left join sys_picture_base s on s.id = a.operat_img |
| | | WHERE a.is_delete = 0 |
| | | AND a.PID = ${productId} |
| | | |
| | | </select> |
| | | <select id="getDefaultImg" resultType="java.lang.String"> |
| | | SELECT a.id |
| | | FROM sys_picture_base a |
| | | WHERE a.IS_DELETE = 0 |
| | | AND a.CONTENT_TYPE = '默认设备' |
| | | </select> |
| | | </mapper> |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.zt.life.modules.sysPictureBase.dao.SysPictureBaseDao"> |
| | | <update id="updateByDefault"> |
| | | update sys_picture_base |
| | | set is_default=2 |
| | | where id = ${id} |
| | | and product_type = ${productType} |
| | | and is_delete = 0 |
| | | </update> |
| | | |
| | | <select id="getList" resultType="com.zt.life.modules.sysPictureBase.model.SysPictureBase"> |
| | | select a.* |
| | |
| | | ORDER BY ${orderBySql} |
| | | </if> |
| | | </select> |
| | | <select id="getNo" resultType="java.lang.Integer"> |
| | | SELECT COUNT(*) |
| | | FROM sys_picture_base |
| | | WHERE is_delete = 0; |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </el-col> |
| | | <el-col :span="19"> |
| | | <div class="mod-basicInfo-paramData}"> |
| | | <zt-table-wraper ref="tableObj" :query-url=queryUrl |
| | | <zt-table-wraper ref="tableObj" defaultNotQuery="true" :query-url=queryUrl |
| | | :delete-url=deleteUrl |
| | | @dataLoaded="dataLoaded" |
| | | v-slot="{ table }" |
| | |
| | | <el-table-column prop="name" label="图片名称"/> |
| | | <el-table-column label="图片" align="center"> |
| | | <template v-slot="{ row }"> |
| | | <el-image v-if="row.accessoryMap" :src="getPath(row)" style="height: 50px;width: 50px"></el-image> |
| | | <el-image v-if="row.id" :src="url+row.id" style="height: 50px;width: 50px"></el-image> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import Cookies from 'js-cookie' |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | url: `${window.SITE_CONFIG['apiURL']}/sysPictureBase/getProductImg?token=${Cookies.get('token')}&id=`, |
| | | name: 'SelectPicture', |
| | | type: '', |
| | | dataForm: { |
| | | id:'', |
| | | contentType: '', |
| | | systemMark: '', |
| | | sortNo: '' |
| | |
| | | init(type) { |
| | | this.type = type |
| | | }, |
| | | getPath(row) { |
| | | if (row.accessoryMap) { |
| | | for (let key in row.accessoryMap) { |
| | | return key |
| | | } |
| | | } |
| | | }, |
| | | async selectedPicture(row) { |
| | | await this.$tip.success() |
| | | this.$refs.dialog.close() |
| | | this.$emit('setPicture', row, this.type) |
| | | this.$emit('setPicture', row) |
| | | } |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <zt-dialog ref="dialog" @confirm="formSubmit" append-to-body> |
| | | <zt-dialog ref="dialog" @confirm="formSubmit" append-to-body> |
| | | <el-form :model="dataForm" ref="dataForm" :disabled="dataForm.disabled" label-width="120px"> |
| | | <zt-form-item label="上级系统" prop="pid" > |
| | | <zt-form-item label="上级系统" prop="pid"> |
| | | <zt-select v-model="dataForm.pid" placeholder=" " :datas="productList"/> |
| | | </zt-form-item> |
| | | <zt-form-item label="名称" prop="name" rules="required"> |
| | |
| | | <zt-form-item label="维修分布" prop="repairDistrib"> |
| | | <zt-dict v-model="dataForm.repairDistrib" dict="RepairDistribType" placeholder="请选择维修分布类型"></zt-dict> |
| | | </zt-form-item> |
| | | <zt-form-item label="运行状态图" prop="operationalStatus"> |
| | | <el-input v-model="dataForm.operationalStatus" @focus="selectPicture('operational')" :readonly="readonly"></el-input> |
| | | </zt-form-item> |
| | | <zt-form-item label="待机状态图" prop="standbyState"> |
| | | <el-input v-model="dataForm.standbyState" @focus="selectPicture('standby')" :readonly="readonly"></el-input> |
| | | </zt-form-item> |
| | | <zt-form-item label="故障状态图" prop="faultState"> |
| | | <el-input v-model="dataForm.faultState" @focus="selectPicture('fault')" :readonly="readonly"></el-input> |
| | | <zt-form-item label="运行图片" prop="operatImg"> |
| | | <el-input v-model="dataForm.operatImgName" @focus="selectPicture()" :readonly="readonly"></el-input> |
| | | </zt-form-item> |
| | | <zt-form-item label="排序" prop="sort"> |
| | | <el-input v-model="dataForm.sort" :readonly="readonly"></el-input> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | map: new Map(), |
| | | fileId:'', |
| | | productList:[], |
| | | fileId: '', |
| | | productList: [], |
| | | dataForm: { |
| | | id: '', |
| | | pid: '', |
| | |
| | | taskCompute: '', |
| | | reliabDistrib: '', |
| | | repairDistrib: '', |
| | | operationalStatus:'', |
| | | standbyState:'', |
| | | faultState:'', |
| | | operatImg: '', |
| | | operatImgName:'', |
| | | sort: '', |
| | | } |
| | | } |
| | | }, |
| | | components:{ |
| | | components: { |
| | | PictureSelect |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.getProductList() |
| | | |
| | | }, |
| | | // 获取系统列表 |
| | | async getProductList() { |
| | | let res = await this.$http.get('/basicInfo/TyProductModel/getProductList') |
| | | this.productList = res.data |
| | | console.log(this.productList,'getProductList') |
| | | console.log(this.productList, 'getProductList') |
| | | }, |
| | | selectPicture(type){ |
| | | this.$refs.pictureSelect.$refs.dialog.init(type) |
| | | selectPicture() { |
| | | this.$refs.pictureSelect.$refs.dialog.init() |
| | | }, |
| | | openAddWin(row,type){ |
| | | console.log(type,'openAddWin(row)') |
| | | if (type==='operational'){ |
| | | this.dataForm.operationalStatus = row.name |
| | | for (let key in row.accessoryMap) { |
| | | let id = /_zt_oss_id=(\d+)/.exec(key) |
| | | this.fileId = id ? id[1] : '' |
| | | } |
| | | this.map.set(this.dataForm.operationalStatus,this.fileId); |
| | | console.log(this.map,'openAddWin(row)') |
| | | }else if(type==='standby'){ |
| | | this.dataForm.standbyState = row.name |
| | | for (let key in row.accessoryMap) { |
| | | let id = /_zt_oss_id=(\d+)/.exec(key) |
| | | this.fileId = id ? id[1] : '' |
| | | } |
| | | this.map.set(this.dataForm.standbyState,this.fileId); |
| | | console.log(this.map,'openAddWin(row)') |
| | | }else if(type==='fault'){ |
| | | this.dataForm.faultState = row.name |
| | | for (let key in row.accessoryMap) { |
| | | let id = /_zt_oss_id=(\d+)/.exec(key) |
| | | this.fileId = id ? id[1] : '' |
| | | } |
| | | this.map.set(this.dataForm.faultState,this.fileId); |
| | | console.log(this.map,'openAddWin(row)') |
| | | } |
| | | openAddWin(row) { |
| | | this.dataForm.operatImgName = row.name |
| | | this.dataForm.operatImg = row.id |
| | | console.log(row, 'openAddWin(row)') |
| | | }, |
| | | // 获取信息 |
| | | async getInfo() { |
| | |
| | | ...this.dataForm, |
| | | ...res.data |
| | | } |
| | | console.log(this.map,'getInfo') |
| | | console.log(this.map, 'getInfo') |
| | | }, |
| | | // 表单提交 |
| | | async formSubmit() { |
| | | this.dataForm.operationalStatus = this.map.get(this.dataForm.operationalStatus) |
| | | this.dataForm.standbyState = this.map.get(this.dataForm.standbyState) |
| | | this.dataForm.faultState = this.map.get(this.dataForm.faultState) |
| | | let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/basicInfo/TyProductModel/', this.dataForm) |
| | | if (res.success) { |
| | | await this.$tip.success() |
| | |
| | | <zt-table-column-dict prop="taskCompute" label="任务计算" dict="is_or_not"/> |
| | | <zt-table-column-dict prop="reliabDistrib" label="可靠性分布" dict="ReliabDistribType"/> |
| | | <zt-table-column-dict prop="repairDistrib" label="维修分布" dict="RepairDistribType"/> |
| | | <el-table-column prop="operationalStatus" label="运行状态图" align="center"> |
| | | <el-table-column prop="operatImg" label="运行图片" align="center"> |
| | | <template v-slot="{ row }"> |
| | | <el-image v-if="row.operationalStatus" :src="getPath(row.operationalStatus)" style="height: 50px;width: 50px"></el-image> |
| | | </template > |
| | | </el-table-column> |
| | | <el-table-column prop="standbyState" label="待机状态图" align="center"> |
| | | <template v-slot="{ row }"> |
| | | <el-image v-if="row.standbyState" :src="getPath(row.standbyState)" style="height: 50px;width: 50px"></el-image> |
| | | </template > |
| | | </el-table-column> |
| | | <el-table-column prop="faultState" label="故障状态图" align="center"> |
| | | <template v-slot="{ row }"> |
| | | <el-image v-if="row.faultState" :src="getPath(row.faultState)" style="height: 50px;width: 50px"></el-image> |
| | | </template > |
| | | <el-image v-if="row.operatImg" :src="url+row.operatImg" style="height: 50px;width: 50px"></el-image> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="sort" label="排序"/> |
| | | <zt-table-column-handle :table="table"/> |
| | |
| | | |
| | | <script> |
| | | import AddOrUpdate from './TyProductModel-AddOrUpdate' |
| | | import Cookies from "js-cookie"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | url: `${window.SITE_CONFIG['apiURL']}/sysPictureBase/getProductImg?token=${Cookies.get('token')}&id=`, |
| | | dataForm: { |
| | | operationalStatus:'', |
| | | standbyState:'', |
| | |
| | | return 'text-align: left !important;' |
| | | } |
| | | }, |
| | | getPath(id){ |
| | | console.log(id,'path') |
| | | return `${window.SITE_CONFIG['apiURL']}/sys/oss/content2?fileId=${id}` |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <zt-form-item label="节点类型" prop="productType" rules="required"> |
| | | <zt-dict v-model="dataForm.productType" dict="product"></zt-dict> |
| | | </zt-form-item> |
| | | <zt-form-item label="运行状态图" prop="operationalStatus" v-if="isShow"> |
| | | <el-input v-model="dataForm.operationalStatus" @focus="selectPicture('operational')" |
| | | <zt-form-item label="运行状态图" prop="operatImg" v-if="isShow"> |
| | | <el-input v-model="dataForm.operatImgName" @focus="selectPicture()" |
| | | :readonly="readonly"></el-input> |
| | | </zt-form-item> |
| | | <zt-form-item label="待机状态图" prop="standbyState" v-if="isShow"> |
| | | <el-input v-model="dataForm.standbyState" @focus="selectPicture('standby')" :readonly="readonly"></el-input> |
| | | </zt-form-item> |
| | | <zt-form-item label="故障状态图" prop="faultState" v-if="isShow"> |
| | | <el-input v-model="dataForm.faultState" @focus="selectPicture('fault')" :readonly="readonly"></el-input> |
| | | </zt-form-item> |
| | | <zt-form-item label="排序" prop="sort"> |
| | | <el-input v-model="dataForm.sort" :readonly="readonly"></el-input> |
| | |
| | | return { |
| | | isTree: false, |
| | | isShow: true, |
| | | map: new Map(), |
| | | fileId: '', |
| | | productList: [], |
| | | dataForm: { |
| | |
| | | pid: '', |
| | | name: '', |
| | | productType: '', |
| | | operationalStatus: '', |
| | | standbyState: '', |
| | | faultState: '', |
| | | operatImg: '', |
| | | operatImgName:'', |
| | | sort: '', |
| | | status: '' |
| | | } |
| | |
| | | this.productList = res.data |
| | | console.log(this.productList, 'getProductList') |
| | | }, |
| | | selectPicture(type) { |
| | | this.$refs.pictureSelect.$refs.dialog.init(type) |
| | | selectPicture() { |
| | | this.$refs.pictureSelect.$refs.dialog.init() |
| | | }, |
| | | openAddWin(row, type) { |
| | | console.log(type, 'openAddWin(row)') |
| | | if (type === 'operational') { |
| | | this.dataForm.operationalStatus = row.name |
| | | for (let key in row.accessoryMap) { |
| | | let id = /_zt_oss_id=(\d+)/.exec(key) |
| | | this.fileId = id ? id[1] : '' |
| | | } |
| | | this.map.set(this.dataForm.operationalStatus, this.fileId); |
| | | console.log(this.map, 'openAddWin(row)') |
| | | } else if (type === 'standby') { |
| | | this.dataForm.standbyState = row.name |
| | | for (let key in row.accessoryMap) { |
| | | let id = /_zt_oss_id=(\d+)/.exec(key) |
| | | this.fileId = id ? id[1] : '' |
| | | } |
| | | this.map.set(this.dataForm.standbyState, this.fileId); |
| | | console.log(this.map, 'openAddWin(row)') |
| | | } else if (type === 'fault') { |
| | | this.dataForm.faultState = row.name |
| | | for (let key in row.accessoryMap) { |
| | | let id = /_zt_oss_id=(\d+)/.exec(key) |
| | | this.fileId = id ? id[1] : '' |
| | | } |
| | | this.map.set(this.dataForm.faultState, this.fileId); |
| | | console.log(this.map, 'openAddWin(row)') |
| | | } |
| | | openAddWin(row) { |
| | | this.dataForm.operatImgName = row.name |
| | | this.dataForm.operatImg = row.id |
| | | console.log(row, 'openAddWin(row)') |
| | | }, |
| | | // 获取信息 |
| | | async getInfo() { |
| | |
| | | }, |
| | | // 表单提交 |
| | | async formSubmit() { |
| | | this.dataForm.operationalStatus = this.map.get(this.dataForm.operationalStatus) |
| | | this.dataForm.standbyState = this.map.get(this.dataForm.standbyState) |
| | | this.dataForm.faultState = this.map.get(this.dataForm.faultState) |
| | | let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/basicInfo/XhProductModel/', this.dataForm) |
| | | if (res.success) { |
| | | await this.$tip.success() |
| | |
| | | </el-col> |
| | | <el-col :span="19"> |
| | | <div class="mod-basicInfo-xhProductModel}"> |
| | | <zt-table-wraper ref="tableObj" query-url="/basicInfo/XhProductModel/page" |
| | | <zt-table-wraper ref="tableObj" defaultNotQuery="true" query-url="/basicInfo/XhProductModel/page" |
| | | delete-url="/basicInfo/XhProductModel/ " |
| | | :paging='false' |
| | | v-slot="{ table }"> |
| | |
| | | > |
| | | <el-table-column prop="name" label="名称"/> |
| | | <zt-table-column-dict prop="productType" label="节点类型" dict="product"/> |
| | | <el-table-column prop="operationalStatus" label="运行状态图" align="center"> |
| | | <el-table-column prop="operatImg" label="运行图片" align="center"> |
| | | <template v-slot="{ row }"> |
| | | <el-image v-if="row.operationalStatus" :src="getPath(row.operationalStatus)" |
| | | style="height: 50px;width: 50px"></el-image> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="standbyState" label="待机状态图" align="center"> |
| | | <template v-slot="{ row }"> |
| | | <el-image v-if="row.standbyState" :src="getPath(row.standbyState)" |
| | | style="height: 50px;width: 50px"></el-image> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="faultState" label="故障状态图" align="center"> |
| | | <template v-slot="{ row }"> |
| | | <el-image v-if="row.faultState" :src="getPath(row.faultState)" |
| | | style="height: 50px;width: 50px"></el-image> |
| | | <el-image v-if="row.operatImg" :src="url+row.operatImg" style="height: 50px;width: 50px"></el-image> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="sort" label="排序"/> |
| | |
| | | import AddOrUpdate from './XhProductModel-AddOrUpdate' |
| | | import SelectTyModel from './SelectTyModel' |
| | | import ProductModelTree from "./ProductModelTree"; |
| | | import Cookies from "js-cookie"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | url: `${window.SITE_CONFIG['apiURL']}/sysPictureBase/getProductImg?token=${Cookies.get('token')}&id=`, |
| | | dataForm: { |
| | | name: '', |
| | | productType: '', |
| | |
| | | <template> |
| | | <zt-dialog ref="dialog" @confirm="formSubmit"> |
| | | <el-form :model="dataForm" ref="dataForm" :disabled="dataForm.disabled" label-width="120px"> |
| | | <zt-form-item label="类型" prop="type"> |
| | | <el-input v-model="dataForm.type"></el-input> |
| | | </zt-form-item> |
| | | <zt-form-item label="子类型" prop="subType"> |
| | | <el-input v-model="dataForm.subType"></el-input> |
| | | </zt-form-item> |
| | | |
| | | <zt-form-item label="图片名称" prop="name" rules="required"> |
| | | <el-input v-model="dataForm.name"></el-input> |
| | | </zt-form-item> |
| | | <zt-form-item label="产品类型" prop="productType" rules="required"> |
| | | <zt-dict v-model="dataForm.productType" dict="product"></zt-dict> |
| | | </zt-form-item> |
| | | <zt-form-item label="是否默认" prop="isDefault" rules="required"> |
| | | <zt-dict v-model="dataForm.isDefault" dict="is_or_not"></zt-dict> |
| | | </zt-form-item> |
| | | <zt-form-item label="检索关键字" prop="contentType"> |
| | | <el-input v-model="dataForm.contentType"></el-input> |
| | | </zt-form-item> |
| | | <zt-form-item label="系统标识" prop="systemMark"> |
| | | <zt-dict v-model="dataForm.systemMark" dict="product"></zt-dict> |
| | | </zt-form-item> |
| | | <zt-form-item label="排序" prop="sortNo"> |
| | | <el-input v-model="dataForm.sortNo" :readonly="readonly" @input=""></el-input> |
| | | </zt-form-item> |
| | | |
| | | <div class="el-flex img-src" style="height: 20px"> |
| | | <el-form-item class="marginTopAndMarginBottom" style="width: 100%"> |
| | | <!--<config-uploader :lineHeight="true" busi-type="sys_picture" model-name="dataForm" :dataForm="dataForm" |
| | |
| | | fileList: [], |
| | | dataForm: { |
| | | id: '', |
| | | type: '', |
| | | subType: '', |
| | | isDefault: '', |
| | | name: '', |
| | | contentType: '', |
| | | systemMark: '', |
| | | sortNo: '', |
| | | productType: '', |
| | | remark: '' |
| | | }, |
| | | readonly: { |
| | |
| | | this.dataForm.id = 0 |
| | | } |
| | | params.append('id', this.dataForm.id) |
| | | params.append('type', this.dataForm.type) |
| | | params.append('subType', this.dataForm.subType) |
| | | params.append('isDefault', this.dataForm.isDefault) |
| | | params.append('name', this.dataForm.name) |
| | | params.append('contentType', this.dataForm.contentType) |
| | | params.append('systemMark', this.dataForm.systemMark) |
| | | params.append('sortNo', this.dataForm.sortNo) |
| | | params.append('productType', this.dataForm.productType) |
| | | params.append('remark', this.dataForm.remark) |
| | | console.log(params, 'async formSubmit()') |
| | | let res = await this.$http.post('/sysPictureBase/save', params) |
| | | if (res.success) { |
| | |
| | | |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <zt-dict v-model="dataForm.systemMark" dict="product" placeholder="请选择系统标识" clearable></zt-dict> |
| | | <zt-dict v-model="dataForm.productType" dict="product" placeholder="请选择产品类型" clearable></zt-dict> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <zt-button type="query" @click="table.query()"/> |
| | |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:70}" |
| | | border @selection-change="table.selectionChangeHandle"> |
| | | <el-table-column type="selection" width="40" align="center"/> |
| | | <el-table-column prop="sortNo" label="排序"/> |
| | | <el-table-column prop="name" label="图片名称"/> |
| | | <zt-table-column-dict prop="isDefault" label="是否默认" dict="is_or_not"/> |
| | | <el-table-column label="图片" align="center"> |
| | | <template v-slot="{ row }"> |
| | | <el-image v-if="row.id" :src="url+row.id" style="height: 50px;width: 50px"></el-image> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="contentType" label="检索关键字"/> |
| | | <zt-table-column-dict prop="systemMark" label="系统标识" dict="product"/> |
| | | <zt-table-column-dict prop="productType" label="产品类型" dict="product"/> |
| | | <zt-table-column-handle :table="table" |
| | | delete-perm="sysPictureBase::delete"/> |
| | | </el-table> |
| | |
| | | url: `${window.SITE_CONFIG['apiURL']}/sysPictureBase/getProductImg?token=${Cookies.get('token')}&id=`, |
| | | dataForm: { |
| | | contentType: '', |
| | | systemMark: '', |
| | | sortNo: '' |
| | | productType: '', |
| | | }, |
| | | } |
| | | }, |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="5" v-show="nodeType=='node'" align="middle" style="margin-top:20px;"> |
| | | <el-col :span=24> |
| | | <el-col :span=8 style="font-size: 16px;line-height: 32px">MTBCF</el-col> |
| | | <el-col :span=16> |
| | | <el-input type="number" v-model="globalGridAttr.taskMtbcf" @change="onTaskMtbcfChange"></el-input> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="5" align="middle" style="margin-top:20px;"> |
| | | <el-col :span=24> |
| | | <el-col :span=8 style="font-size: 16px;line-height: 32px">MTTCR</el-col> |
| | | <el-col :span=16> |
| | | <el-input type="number" v-model="globalGridAttr.repairMttcr" @change="onRepairMttcrChange"></el-input> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <zt-table-column-handle :table="table" |
| | | delete-perm="taskReliability::delete" :has-view="false" width="180px"> |
| | | <template v-slot="{ row }"> |
| | | <el-button type="primary" @click="drawRBD(row)">模型设计</el-button> |
| | | <el-button @click="drawRBD(row)">模型设计</el-button> |
| | | </template> |
| | | </zt-table-column-handle> |
| | | </el-table> |