|
@@ -3,11 +3,11 @@
|
|
|
<div class="condition">
|
|
|
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
|
|
<el-form-item label="机型型号:">
|
|
|
- <el-input v-model="formInline.user" placeholder="请输入批次编号" size="small"></el-input>
|
|
|
+ <el-input v-model="formInline.machineTypeCode" placeholder="请输入机型型号" size="small"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="选择日期:" size="small">
|
|
|
<el-date-picker v-model="formInline.timeQuantum" type="daterange" range-separator="至"
|
|
|
- start-placeholder="开始日期" end-placeholder="结束日期">
|
|
|
+ start-placeholder="开始日期" end-placeholder="结束日期" @change="onDateChange">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
@@ -18,38 +18,47 @@
|
|
|
</div>
|
|
|
<div class="list-page">
|
|
|
<div class="newly">
|
|
|
-
|
|
|
<el-button type="primary" @click="newnuedialog" size="small">新增</el-button>
|
|
|
</div>
|
|
|
|
|
|
<el-table class="center-align-table" :data="tableData" border :cell-style="rowStyle">
|
|
|
- <el-table-column align="center" fixed prop="" label="机型型号">
|
|
|
+ <el-table-column align="center" fixed prop="machineTypeCode" label="机型型号">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button @click="particulars(scope.row)" type="text" size="small">泗洪风场</el-button>
|
|
|
+ <el-button @click="particulars(scope.row)" type="text" size="small">{{ scope.row.machineTypeCode
|
|
|
+ }}</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column align="center" label="厂商编号"> </el-table-column>
|
|
|
-
|
|
|
+ <el-table-column prop="manufacturerCode" align="center" label="厂商编号">
|
|
|
+ </el-table-column>
|
|
|
|
|
|
- <el-table-column prop="" align="center" label="机型类型" width="100">
|
|
|
+ <el-table-column prop="curvedMotionType" align="center" label="机型类型" width="120">
|
|
|
+ <template v-slot="scope">
|
|
|
+ <!-- 假设 type 为 123 时显示特殊内容 -->
|
|
|
+ <span v-if="scope.row.curvedMotionType == '1'">双馈</span>
|
|
|
+ <span v-else-if="scope.row.curvedMotionType == '2'">半驱</span>
|
|
|
+ <span v-else-if="scope.row.curvedMotionType == '3'">半直曲</span>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="" align="center" label="厂商名称" width="100">
|
|
|
+ <el-table-column prop="manufacturerName" align="center" label="厂商名称" width="200">
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column prop="" align="center" label="品牌名称" width="100">
|
|
|
+ <el-table-column prop="brand" align="center" label="品牌名称" width="200">
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="" align="center" label="状态" width="100">
|
|
|
+ <el-table-column prop="state" align="center" label="状态" width="100">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ {{ row.state == 1 ? "启用" : "停用" }}
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="" align="center" label="创建时间">
|
|
|
+ <el-table-column prop="createTime" align="center" label="创建时间">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="transition" align="center" fixed="right" label="操作" width="200">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button @click="compile(scope.row)" type="text" size="small">编辑</el-button>
|
|
|
<el-button @click="uploading(scope.row)" type="text" size="small">上传</el-button>
|
|
|
- <el-button v-if="scope.row.transition == 1" @click="start(scope.row)" type="text"
|
|
|
+ <el-button v-if="scope.row.state == 0" @click="start(scope.row, 1)" type="text"
|
|
|
size="small">启用</el-button>
|
|
|
- <el-button v-else style="color: #666" @click="stop(scope.row)" type="text"
|
|
|
+ <el-button v-else style="color: #666" @click="start(scope.row, 0)" type="text"
|
|
|
size="small">停用</el-button>
|
|
|
<el-button style="color: #f00" @click="deleted(scope.row)" type="text"
|
|
|
size="small">删除</el-button>
|
|
@@ -57,152 +66,95 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<div class="pagination-container">
|
|
|
- <el-pagination :page-size="10" :pager-count="11" layout="total, prev, pager, next" :total="35">
|
|
|
+ <el-pagination @current-change="handleCurrentChange" :current-page.sync="formInline.pageNum"
|
|
|
+ layout="total, prev, pager, next" :page-size="formInline.pageSize" :total="formInline.totalSize">
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <!-- 弹出层 -->
|
|
|
-
|
|
|
- <!-- 新增 -->
|
|
|
- <el-dialog :title="title" :visible.sync="nuedialog" width="800px">
|
|
|
- <div class="general">
|
|
|
-
|
|
|
- <div class="condition">
|
|
|
- <p>机型型号:</p>
|
|
|
- <el-input v-model="windsiteName"></el-input>
|
|
|
- </div>
|
|
|
- <div class="condition">
|
|
|
- <p>厂商名称:</p>
|
|
|
- <el-input v-model="airdensity"></el-input>
|
|
|
- </div>
|
|
|
-
|
|
|
|
|
|
- <div class="condition">
|
|
|
- <p>品牌名称:</p>
|
|
|
- <el-input v-model="altitude"></el-input>
|
|
|
- </div>
|
|
|
|
|
|
- <div class="condition">
|
|
|
- <p>驱动方式:</p>
|
|
|
- <el-select v-model="sheng" placeholder="请选择">
|
|
|
- <el-option v-for="item in shengOptions" :key="item.value" :label="item.label"
|
|
|
- :value="item.value">
|
|
|
- </el-option>
|
|
|
+ <!-- 新增 -->
|
|
|
+ <el-dialog :title="title" :visible.sync="nuedialog" width="400px">
|
|
|
+ <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
|
|
+ <el-form-item label="机型型号:" prop="machineTypeCode">
|
|
|
+ <el-input v-model="ruleForm.machineTypeCode" size="small"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="厂商名称:" prop="manufacturerName">
|
|
|
+ <el-input v-model="ruleForm.manufacturerName" size="small"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="厂商编号:" prop="manufacturerCode">
|
|
|
+ <el-input v-model="ruleForm.manufacturerCode" size="small"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="品牌名称:" prop="brand">
|
|
|
+ <el-input v-model="ruleForm.brand" size="small"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="驱动方式:" prop="curvedMotionType">
|
|
|
+ <el-select v-model="ruleForm.curvedMotionType" placeholder="请选择" value-key="contentsValue"
|
|
|
+ size="small">
|
|
|
+ <el-option v-for="item in curvedMotionTypeOptions" :key="item.contentsValue"
|
|
|
+ :label="item.contentsName" :value="item.contentsValue"></el-option>
|
|
|
</el-select>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="condition">
|
|
|
- <p>塔筒高度:</p>
|
|
|
- <el-input v-model="longitude"></el-input>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="condition">
|
|
|
- <p>叶片长度:</p>
|
|
|
- <el-input v-model="dimensionality"></el-input>
|
|
|
- </div>
|
|
|
-
|
|
|
-
|
|
|
- </div>
|
|
|
-
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="nuedialog = false" size="small">取 消</el-button>
|
|
|
- <el-button type="primary" @click="newly" size="small">确 定</el-button>
|
|
|
- </span>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="塔筒高度:" prop="towerHeight">
|
|
|
+ <el-input v-model="ruleForm.towerHeight" size="small"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="叶片长度:" prop="vaneLong">
|
|
|
+ <el-input v-model="ruleForm.vaneLong" size="small"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="submitForm('ruleForm')" size="small">提交</el-button>
|
|
|
+ <el-button @click="resetForm('ruleForm')" size="small">取消</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <!-- 风场详情 -->
|
|
|
- <el-dialog title="机器详情" :visible.sync="unusualdialog" width="800px">
|
|
|
+ <!-- 机型详情 -->
|
|
|
+ <el-dialog title="机型详情" :visible.sync="unusualdialog" width="600px">
|
|
|
<div class="general">
|
|
|
<div class="condition">
|
|
|
<p>机型型号:</p>
|
|
|
+ <span>{{ particularsdata.machineTypeCode }}</span>
|
|
|
</div>
|
|
|
<div class="condition">
|
|
|
<p>厂商名称:</p>
|
|
|
+ <span>{{ particularsdata.manufacturerName }}</span>
|
|
|
</div>
|
|
|
|
|
|
<div class="condition">
|
|
|
<p>厂商编号:</p>
|
|
|
+ <span>{{ particularsdata.manufacturerCode }}</span>
|
|
|
</div>
|
|
|
<div class="condition">
|
|
|
<p>品牌名称:</p>
|
|
|
+ <span>{{ particularsdata.brand }}</span>
|
|
|
</div>
|
|
|
|
|
|
<div class="condition">
|
|
|
<p>驱动方式:</p>
|
|
|
+ <span>
|
|
|
+ <span v-if="particularsdata.curvedMotionType === 1">双馈</span>
|
|
|
+ <span v-else-if="particularsdata.curvedMotionType === 2">半驱</span>
|
|
|
+ <span v-else-if="particularsdata.curvedMotionType === 3">半直曲</span></span>
|
|
|
</div>
|
|
|
<div class="condition">
|
|
|
<p>状态:</p>
|
|
|
+ <span>{{ particularsdata.state == 1 ? "启用" : "停用" }}</span>
|
|
|
</div>
|
|
|
<div class="condition">
|
|
|
<p>塔筒高度:</p>
|
|
|
+ <span>{{ particularsdata.towerHeight }}米</span>
|
|
|
</div>
|
|
|
|
|
|
<div class="condition">
|
|
|
<p>叶片长度:</p>
|
|
|
+ <span>{{ particularsdata.vaneLong }}米</span>
|
|
|
</div>
|
|
|
-
|
|
|
-
|
|
|
</div>
|
|
|
<div class="attachment">
|
|
|
<p>下载标准功率曲线附件</p>
|
|
|
-
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
-
|
|
|
- <!-- 风机数量 -->
|
|
|
- <el-dialog title="风机信息" :visible.sync="draught" width="1000px">
|
|
|
- <el-table class="center-align-table" :data="tableData" border :cell-style="rowStyle" stripe>
|
|
|
- <!-- Table Columns -->
|
|
|
- <el-table-column fixed prop="name" align="center" label="风机名称">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="" align="center" label="风机编号">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="" align="center" label="风机机型">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="" align="center" label="主机厂商">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="" align="center" label="是否标杆">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="" align="center" label="海拔高度/米" width="80">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="" align="center" label="经度" width="80">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="" align="center" label="纬度" width="80">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="" align="center" label="额定容量">
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
-
|
|
|
- <div class="pagination-container">
|
|
|
- <el-pagination :page-size="10" :pager-count="11" layout="total, prev, pager, next" :total="35">
|
|
|
- </el-pagination>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
- <!-- 测风塔 -->
|
|
|
- <el-dialog title="测风塔信息" :visible.sync="anemometerdialog" width="800px">
|
|
|
- <H3 class="centeredH3">测风塔名称</H3>
|
|
|
- <div class="general">
|
|
|
- <div class="condition">
|
|
|
- <p>测风塔编号:</p>
|
|
|
- </div>
|
|
|
- <div class="condition">
|
|
|
- <p>测风塔名称:</p>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="condition">
|
|
|
- <p>经度:</p>
|
|
|
- </div>
|
|
|
- <div class="condition">
|
|
|
- <p>维度:</p>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="condition">
|
|
|
- <p>测风塔高度:</p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
-
|
|
|
|
|
|
<!-- 上传 -->
|
|
|
<el-dialog title="上传文件" :visible.sync="uploadingPOP" width="400px">
|
|
@@ -233,138 +185,272 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import {
|
|
|
+ windEngineMillPage,
|
|
|
+ updateWindEngineMill,
|
|
|
+ getDictList,
|
|
|
+ createEngineMill,
|
|
|
+ delWindEngineMill,
|
|
|
+ getWindEngineMillPageVo,
|
|
|
+
|
|
|
+} from "@/api/ledger.js";
|
|
|
+
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ tableData: [],
|
|
|
+ formInline: {
|
|
|
+ machineTypeCode: "",
|
|
|
+ timeQuantum: [],
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ totalSize: 0,
|
|
|
+ },
|
|
|
+ startDate: "",
|
|
|
+ endDate: "",
|
|
|
+ //新增
|
|
|
+ ruleForm: {
|
|
|
+ machineTypeCode: "",
|
|
|
+ manufacturerName: "",
|
|
|
+ brand: "",
|
|
|
+ curvedMotionType: "",
|
|
|
+ towerHeight: "",
|
|
|
+ manufacturerCode: "",
|
|
|
+ vaneLong: "",
|
|
|
+ },
|
|
|
+ curvedMotionTypeOptions: [],
|
|
|
+ rules: {
|
|
|
+ machineTypeCode: [
|
|
|
+ { required: true, message: "请输入机型型号", trigger: "blur" },
|
|
|
+ ],
|
|
|
+ manufacturerName: [
|
|
|
+ { required: true, message: "请输入厂商名称", trigger: "blur" },
|
|
|
+ ],
|
|
|
+ manufacturerCode: [
|
|
|
+ { required: true, message: "请输入厂商编号", trigger: "blur" },
|
|
|
+ ],
|
|
|
+ brand: [{ required: true, message: "请输入品牌名称", trigger: "blur" }],
|
|
|
+ curvedMotionType: [
|
|
|
+ { required: true, message: "请选择驱动方式", trigger: "change" },
|
|
|
+ ],
|
|
|
+ towerHeight: [
|
|
|
+ { required: true, message: "请输入塔筒高度", trigger: "blur" },
|
|
|
+ { validator: this.validateNumber, trigger: ["blur", "change"] },
|
|
|
+ ],
|
|
|
+ vaneLong: [
|
|
|
+ { required: true, message: "请输入叶片长度", trigger: "blur" },
|
|
|
+ { validator: this.validateNumber, trigger: ["blur", "change"] },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ particularsdata: [],
|
|
|
// 新增信息
|
|
|
- windsiteName: "",
|
|
|
- airdensity: "",
|
|
|
superior: "",
|
|
|
superiorOptions: [],
|
|
|
altitude: "",
|
|
|
- sheng: "",
|
|
|
- shengOptions: [],
|
|
|
- shi: "",
|
|
|
- shiOptions: [],
|
|
|
- longitude: "",
|
|
|
- dimensionality: "",
|
|
|
- anemometer: "",
|
|
|
- anemometerOptions: [],
|
|
|
-
|
|
|
fileList: [
|
|
|
{
|
|
|
name: "food.jpeg",
|
|
|
url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100",
|
|
|
},
|
|
|
-
|
|
|
- ],
|
|
|
- formInline: {
|
|
|
- user: "",
|
|
|
- region: "",
|
|
|
- timeQuantum: "",
|
|
|
- },
|
|
|
- tableData: [
|
|
|
- {
|
|
|
- id: 1,
|
|
|
- name: "王小虎",
|
|
|
- transition: "1",
|
|
|
- },
|
|
|
- {
|
|
|
- id: 3,
|
|
|
- name: "王小虎",
|
|
|
- abnormal: "1",
|
|
|
- transition: "0",
|
|
|
- children: [
|
|
|
- {
|
|
|
- id: 31,
|
|
|
-
|
|
|
- name: "王小虎",
|
|
|
-
|
|
|
- abnormal: "1",
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
],
|
|
|
nuedialog: false,
|
|
|
unusualdialog: false,
|
|
|
-
|
|
|
draught: false,
|
|
|
- anemometerdialog: false,
|
|
|
uploadingPOP: false,
|
|
|
- newform: {
|
|
|
- unit: "",
|
|
|
- province: "",
|
|
|
- city: "",
|
|
|
- descr: "",
|
|
|
- },
|
|
|
title: "新增",
|
|
|
+ detail: {},
|
|
|
+ isEdit: false
|
|
|
};
|
|
|
},
|
|
|
+ created() {
|
|
|
+ this.onSubmit();
|
|
|
+ this.Modeltype();
|
|
|
+ },
|
|
|
methods: {
|
|
|
rowStyle() {
|
|
|
return "text-align:center";
|
|
|
},
|
|
|
+ onDateChange(date) {
|
|
|
+ if (Array.isArray(date)) {
|
|
|
+ this.startDate = this.$formatDate(date[0]);
|
|
|
+ this.endDate = this.$formatDate(date[1]);
|
|
|
+ if (this.endDate < this.startDate) {
|
|
|
+ this.endDate = this.startDate;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.startDate = null;
|
|
|
+ this.endDate = null;
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
// 查询
|
|
|
onSubmit() {
|
|
|
- console.log("submit!");
|
|
|
- },
|
|
|
- // 重置
|
|
|
- reset() { },
|
|
|
-
|
|
|
- // 新增
|
|
|
- newly() {
|
|
|
- this.nuedialog = false;
|
|
|
+ let paramsData = {
|
|
|
+ machineTypeCode: this.formInline?.machineTypeCode || undefined,
|
|
|
+ beginTime: this.startDate || undefined,
|
|
|
+ endTime: this.endDate || undefined,
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ };
|
|
|
+ windEngineMillPage(paramsData).then((res) => {
|
|
|
+ this.tableData = res.data.list;
|
|
|
+ this.formInline.totalSize = res.data.totalSize;
|
|
|
+ });
|
|
|
},
|
|
|
-
|
|
|
- //异常详情
|
|
|
- particulars(row) {
|
|
|
- this.unusualdialog = true;
|
|
|
- },
|
|
|
- //风机信息
|
|
|
- ONdraught(row) {
|
|
|
- this.draught = true;
|
|
|
+ // 停用
|
|
|
+ start(row, type) {
|
|
|
+ let objectval = {
|
|
|
+ millTypeCode: row.millTypeCode,
|
|
|
+ state: type === 0 ? 0 : 1,
|
|
|
+ };
|
|
|
+ updateWindEngineMill(objectval).then((res) => {
|
|
|
+ this.$message({
|
|
|
+ message: "状态已更新成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ // this.$message(`${type === 1 ? '状态已更新成功' : '状态已更新成功'}`);
|
|
|
+ row.state = type === 1 ? 0 : 1;
|
|
|
+ this.onSubmit();
|
|
|
+ });
|
|
|
},
|
|
|
- ONanemometer(row) {
|
|
|
- this.anemometerdialog = true;
|
|
|
+ Modeltype() {
|
|
|
+ getDictList({
|
|
|
+ dictType: 1,
|
|
|
+ }).then((res) => {
|
|
|
+ this.curvedMotionTypeOptions = res.data;
|
|
|
+ });
|
|
|
},
|
|
|
- // 编辑
|
|
|
- compile(row) {
|
|
|
- this.nuedialog = true;
|
|
|
- this.title = "编辑";
|
|
|
+ // 新增提交
|
|
|
+ submitForm(formName) {
|
|
|
+ this.$refs[formName].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ let objectdata = {
|
|
|
+ machineTypeCode: this.ruleForm.machineTypeCode,
|
|
|
+ manufacturerName: this.ruleForm.manufacturerName,
|
|
|
+ manufacturerCode: this.ruleForm.manufacturerCode,
|
|
|
+ brand: this.ruleForm.brand,
|
|
|
+ curvedMotionType: this.ruleForm.curvedMotionType.contentsValue,
|
|
|
+ towerHeight: this.ruleForm.towerHeight,
|
|
|
+ vaneLong: this.ruleForm.vaneLong,
|
|
|
+ };
|
|
|
+ if (this.isEdit) {
|
|
|
+ objectdata.millTypeCode = this.detail.millTypeCode
|
|
|
+ }
|
|
|
+ const API = !this.isEdit ? createEngineMill(objectdata) : updateWindEngineMill(objectdata)
|
|
|
+ API.then((res) => {
|
|
|
+ this.nuedialog = false;
|
|
|
+ this.onSubmit();
|
|
|
+ this.isEdit = false
|
|
|
+ this.$message.success(this.isEdit ? "新增成功" : "编辑成功");
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
- // 上传附件
|
|
|
- uploading(row) {
|
|
|
- this.uploadingPOP = true;
|
|
|
+ resetForm(formName) {
|
|
|
+ this.$refs[formName].resetFields();
|
|
|
+ this.nuedialog = false;
|
|
|
},
|
|
|
- // 附件提交
|
|
|
- filesubmit() {
|
|
|
- this.uploadingPOP = false;
|
|
|
+ // 数字验证
|
|
|
+ validateNumber(rule, value, callback) {
|
|
|
+ const numberRegex = /^\d{1,4}(\.\d{1,2})?$/; // 匹配不超过四位数且小数点后不超过二位数的数字
|
|
|
+ if (!value) {
|
|
|
+ callback(new Error("该项不能为空"));
|
|
|
+ } else if (!numberRegex.test(value)) {
|
|
|
+ callback(
|
|
|
+ new Error("该项必须为不超过四位数且小数点后不超过三位数的数字")
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ callback();
|
|
|
+ }
|
|
|
},
|
|
|
- // 启用
|
|
|
- start(row) { },
|
|
|
- // 停用
|
|
|
- stop(row) { },
|
|
|
+
|
|
|
// 删除
|
|
|
deleted(row) {
|
|
|
- this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
|
|
|
+ console.log(row, "row");
|
|
|
+ if (row.state == "1") {
|
|
|
+ this.$message({
|
|
|
+ type: "error",
|
|
|
+ message: "该项处于启用状态,无法删除!",
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$confirm("此操作将永久删除该文件,是否继续?", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
|
})
|
|
|
.then(() => {
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "删除成功!",
|
|
|
+ delWindEngineMill({ millTypeCode: row.millTypeCode }).then((res) => {
|
|
|
+ this.onSubmit();
|
|
|
+ // 执行删除操作
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "删除成功!",
|
|
|
+ });
|
|
|
});
|
|
|
})
|
|
|
.catch(() => {
|
|
|
+ // 取消删除
|
|
|
this.$message({
|
|
|
type: "info",
|
|
|
message: "已取消删除",
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
+ //机型详情
|
|
|
+ particulars(row) {
|
|
|
+ getWindEngineMillPageVo({ millTypeCode: row.millTypeCode }).then(
|
|
|
+ (res) => {
|
|
|
+ this.unusualdialog = true;
|
|
|
+ this.particularsdata = res.data;
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
+ //分页数据切换
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.formInline.pageNum = val;
|
|
|
+ this.onSubmit();
|
|
|
+ },
|
|
|
+
|
|
|
+ // 重置
|
|
|
+ reset() { },
|
|
|
+
|
|
|
+ // 新增
|
|
|
+ newly() {
|
|
|
+ this.nuedialog = false;
|
|
|
+ },
|
|
|
+
|
|
|
+ // 编辑
|
|
|
+ compile(row) {
|
|
|
+ getWindEngineMillPageVo({ millTypeCode: row.millTypeCode }).then(
|
|
|
+ (res) => {
|
|
|
+ const item = JSON.parse(JSON.stringify(res.data))
|
|
|
+ this.detail = item
|
|
|
+ Object.keys(this.ruleForm).forEach(
|
|
|
+ key => {
|
|
|
+ this.ruleForm[key] = item[key]
|
|
|
+ }
|
|
|
+ )
|
|
|
+ console.log(res);
|
|
|
+ }
|
|
|
+ );
|
|
|
+ this.title = "编辑";
|
|
|
+ this.nuedialog = true;
|
|
|
+ this.isEdit = true;
|
|
|
+
|
|
|
+ },
|
|
|
+ // 上传附件
|
|
|
+ uploading(row) {
|
|
|
+ this.uploadingPOP = true;
|
|
|
+ },
|
|
|
+ // 附件提交
|
|
|
+ filesubmit() {
|
|
|
+ this.uploadingPOP = false;
|
|
|
+ },
|
|
|
+
|
|
|
// 删除附件
|
|
|
deleteRow(row) {
|
|
|
this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
|
|
@@ -386,7 +472,6 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
-
|
|
|
// 新增
|
|
|
newnuedialog() {
|
|
|
this.nuedialog = true;
|
|
@@ -409,12 +494,11 @@ export default {
|
|
|
width: 100px;
|
|
|
text-align: right;
|
|
|
line-height: 40px;
|
|
|
+ margin-right: 10px;
|
|
|
}
|
|
|
|
|
|
span {
|
|
|
line-height: 40px;
|
|
|
-
|
|
|
- padding-left: 20px;
|
|
|
}
|
|
|
|
|
|
.el-select {
|
|
@@ -463,4 +547,19 @@ export default {
|
|
|
height: 40px;
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
+
|
|
|
+// ......................
|
|
|
+.demo-ruleForm {
|
|
|
+ .el-form-item {
|
|
|
+ margin-bottom: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-form-item__error {
|
|
|
+ padding-top: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-select {
|
|
|
+ width: 260px;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|