|
@@ -56,6 +56,7 @@
|
|
|
icon="el-icon-delete"
|
|
|
size="mini"
|
|
|
v-hasPermi="['production:quality:list']"
|
|
|
+ @click="handleRemove"
|
|
|
>批量删除</el-button>
|
|
|
</el-col>
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
@@ -2373,6 +2374,35 @@
|
|
|
<el-button type="primary" @click="submitComment">确 定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <!-- 批量删除对话框 -->
|
|
|
+ <el-dialog :title="remove.title" :visible.sync="remove.open" width="500px" append-to-body>
|
|
|
+ <el-form :rules="removeRules" :model="removeForm" ref="removeForm" label-width="68px">
|
|
|
+ <el-form-item label="采样点" prop="removeSamplePoint">
|
|
|
+ <el-select v-model="removeForm.removeSamplePoint" placeholder="请选择">
|
|
|
+ <el-option
|
|
|
+ v-for="item in samplePointOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="采样日期" prop="removeSampleDate">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="removeForm.removeSampleDate"
|
|
|
+ type="daterange"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="cyan" size="mini" @click="handleConfirmRemove">确定</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -2401,7 +2431,7 @@ import { listS6101, getS6101, delS6101, addS6101, updateS6101, exportS6101 } fro
|
|
|
import { listS6107, getS6107, delS6107, addS6107, updateS6107, exportS6107 } from "@/api/production/s6107";
|
|
|
import { listS6301, getS6301, delS6301, addS6301, updateS6301, exportS6301 } from "@/api/production/s6301";
|
|
|
import { listZ404, getZ404, delZ404, addZ404, updateZ404, exportZ404 } from "@/api/production/z404";
|
|
|
-import { exportQuality, c3ReactorTable, c3ReactorAnalysis, c2ReactorAnalysis, c2ReactorTable } from "@/api/production/quality";
|
|
|
+import { removeQuality, exportQuality, c3ReactorTable, c3ReactorAnalysis, c2ReactorAnalysis, c2ReactorTable } from "@/api/production/quality";
|
|
|
import { submitComment, getCommentInfo } from "@/api/production/comment";
|
|
|
import { treeselect } from "@/api/system/dept";
|
|
|
import { getToken } from "@/utils/auth";
|
|
@@ -2423,6 +2453,49 @@ export default {
|
|
|
components: { Treeselect },
|
|
|
data() {
|
|
|
return {
|
|
|
+ removeForm: {
|
|
|
+ removeSampleDate: [],
|
|
|
+ removeSamplePoint: '',
|
|
|
+ },
|
|
|
+ // 表单校验
|
|
|
+ removeRules: {
|
|
|
+ removeSamplePoint: [
|
|
|
+ {required: true, message: this.$t('采样点') + this.$t('不能为空'), trigger: "change"}
|
|
|
+ ],
|
|
|
+ removeSampleDate: [
|
|
|
+ {required: true, message: this.$t('采样日期') + this.$t('不能为空'), trigger: "change"}
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ samplePointOptions: [
|
|
|
+ { value: '1', label: 'S-0501'},
|
|
|
+ { value: '2', label: 'S-1301'},
|
|
|
+ { value: '3', label: 'S-2002'},
|
|
|
+ { value: '4', label: 'S-2005'},
|
|
|
+ { value: '5', label: 'S-2007'},
|
|
|
+ { value: '6', label: 'S-2011'},
|
|
|
+ { value: '7', label: 'S-2400'},
|
|
|
+ { value: '8', label: 'S-3004'},
|
|
|
+ { value: '9', label: 'S-3009'},
|
|
|
+ { value: '10', label: 'S-3010'},
|
|
|
+ { value: '11', label: 'S-3011'},
|
|
|
+ { value: '12', label: 'S-3012'},
|
|
|
+ { value: '13', label: 'S-3022'},
|
|
|
+ { value: '14', label: 'S-4012'},
|
|
|
+ { value: '15', label: 'S-4013'},
|
|
|
+ { value: '16', label: 'S-4501'},
|
|
|
+ { value: '17', label: 'S-5001'},
|
|
|
+ { value: '18', label: 'S-5003'},
|
|
|
+ { value: '19', label: 'S-5010'},
|
|
|
+ { value: '20', label: 'S-5012'},
|
|
|
+ { value: '21', label: 'S-6101'},
|
|
|
+ { value: '22', label: 'S-6107'},
|
|
|
+ { value: '23', label: 'S-6301'},
|
|
|
+ { value: '24', label: 'Z-404'},
|
|
|
+ ],
|
|
|
+ remove: {
|
|
|
+ title: "批量删除",
|
|
|
+ open: false,
|
|
|
+ },
|
|
|
comment: '',
|
|
|
analysisDescription: null,
|
|
|
c3ReactorTableData: {},
|
|
@@ -2598,6 +2671,25 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
+ /** 确认批量删除 */
|
|
|
+ handleConfirmRemove() {
|
|
|
+ this.$refs["removeForm"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ removeQuality({
|
|
|
+ "samplePoint": this.removeForm.removeSamplePoint,
|
|
|
+ "startDate": this.removeForm.removeSampleDate[0],
|
|
|
+ "endDate": this.removeForm.removeSampleDate[1]
|
|
|
+ }).then(() => {
|
|
|
+ this.msgSuccess("批量删除成功");
|
|
|
+ this.remove.open = false;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 批量删除 */
|
|
|
+ handleRemove() {
|
|
|
+ this.remove.open = true;
|
|
|
+ },
|
|
|
/** 处理评价提交 */
|
|
|
submitComment() {
|
|
|
submitComment({
|