|
|
@@ -25,11 +25,19 @@
|
|
|
<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
|
|
|
v-hasPermi="['stamp:seal:export']">导出</el-button>
|
|
|
</el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button type="success" size="mini" :disabled="single" @click="handleOpen()"
|
|
|
+ v-hasPermi="['stamp:seal:open']">开启</el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button type="info" size="mini" :disabled="single" @click="handleClose()"
|
|
|
+ v-hasPermi="['stamp:seal:close']">关闭</el-button>
|
|
|
+ </el-col>
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
|
- <el-table v-loading="loading" :data="SealList">
|
|
|
- <!-- <el-table-column label="类别" align="center" prop="sealType" /> -->
|
|
|
+ <el-table v-loading="loading" :data="SealList" @selection-change="handleSelectionChange">
|
|
|
+ <el-table-column type="selection" align="center" width="55" />
|
|
|
<el-table-column label="名称" align="center" prop="sealName" />
|
|
|
<el-table-column label="有效期起" align="center" prop="startDate" />
|
|
|
<el-table-column label="有效期止" align="center" prop="endDate" />
|
|
|
@@ -76,12 +84,12 @@
|
|
|
style="width: 100%;">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="状态">
|
|
|
+ <!-- <el-form-item label="状态">
|
|
|
<el-radio-group v-model="form.status">
|
|
|
<el-radio label="1">打开</el-radio>
|
|
|
<el-radio label="2">关闭</el-radio>
|
|
|
</el-radio-group>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item> -->
|
|
|
<el-form-item label="附件">
|
|
|
<el-upload :action="fileUrl" :headers="headers" :file-list="files" :on-success="handleFileSuccessCite"
|
|
|
:before-upload="beforeUploadFile" :on-remove="handleRemove">
|
|
|
@@ -101,14 +109,16 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import { listSeal, getSeal, delSeal, addSeal, updateSeal, exportSeal } from "@/api/stamp/sealList";
|
|
|
+ import { open,close,listSeal, getSeal, delSeal, addSeal, updateSeal, exportSeal } from "@/api/stamp/sealList";
|
|
|
import { getBaseHeader } from "@/utils/request";
|
|
|
- import { getDictDatas, DICT_TYPE } from '@/utils/dict'
|
|
|
|
|
|
export default {
|
|
|
name: "StampSeal",
|
|
|
data() {
|
|
|
return {
|
|
|
+ dataInfo:undefined,
|
|
|
+ // 非单个禁用
|
|
|
+ single: true,
|
|
|
files: [],
|
|
|
// 设置上传的请求头部
|
|
|
headers: getBaseHeader(),
|
|
|
@@ -152,6 +162,24 @@
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleSelectionChange(selection) {
|
|
|
+ console.log(selection);
|
|
|
+ this.dataInfo = selection.map(item => item)
|
|
|
+ console.log(this.dataInfo);
|
|
|
+ this.single = selection.length != 1
|
|
|
+ },
|
|
|
+ handleOpen(){
|
|
|
+ open(this.dataInfo[0].id).then(response => {
|
|
|
+ this.$modal.msgSuccess("开启成功");
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleClose(){
|
|
|
+ close(this.dataInfo[0].id).then(response => {
|
|
|
+ this.$modal.msgSuccess("关闭成功");
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ },
|
|
|
handleRemove(file, fileList) {
|
|
|
console.log(file, fileList);
|
|
|
let fileIds = [];
|