|
@@ -24,6 +24,7 @@
|
|
fit
|
|
fit
|
|
highlight-current-row
|
|
highlight-current-row
|
|
stripe
|
|
stripe
|
|
|
|
+ @selection-change="handleSelectionChange"
|
|
>
|
|
>
|
|
<el-table-column type="selection" width="55" align="center">
|
|
<el-table-column type="selection" width="55" align="center">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -230,15 +231,13 @@
|
|
import Pagination from "@/components/Pagination";
|
|
import Pagination from "@/components/Pagination";
|
|
import ImageUpload from '@/components/Common/image-upload.vue';
|
|
import ImageUpload from '@/components/Common/image-upload.vue';
|
|
import {
|
|
import {
|
|
- delTypeData,
|
|
|
|
- addData,
|
|
|
|
- updateType,
|
|
|
|
getProductList,
|
|
getProductList,
|
|
getImgCarouseList,
|
|
getImgCarouseList,
|
|
handleImgIsShow,
|
|
handleImgIsShow,
|
|
addImgCarousel,
|
|
addImgCarousel,
|
|
delImgData,
|
|
delImgData,
|
|
addCompany,
|
|
addCompany,
|
|
|
|
+ editImgCarousel,
|
|
} from "@/api/policy_list";
|
|
} from "@/api/policy_list";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -308,20 +307,7 @@
|
|
},
|
|
},
|
|
|
|
|
|
],
|
|
],
|
|
- options: [
|
|
|
|
- {
|
|
|
|
- value: "",
|
|
|
|
- label: "状态",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- value: 1,
|
|
|
|
- label: "显示",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- value: 0,
|
|
|
|
- label: "隐藏",
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
|
|
+
|
|
rules: {
|
|
rules: {
|
|
imgCarouselName: [
|
|
imgCarouselName: [
|
|
{ required: true, message: "请输入轮播图名称", trigger: "blur" },
|
|
{ required: true, message: "请输入轮播图名称", trigger: "blur" },
|
|
@@ -335,7 +321,7 @@
|
|
},
|
|
},
|
|
productList: [],
|
|
productList: [],
|
|
fileList: [],
|
|
fileList: [],
|
|
-
|
|
|
|
|
|
+ multipleSelection: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -356,7 +342,6 @@
|
|
// this.listLoading = false;
|
|
// this.listLoading = false;
|
|
// });
|
|
// });
|
|
getImgCarouseList(params).then((res) => {
|
|
getImgCarouseList(params).then((res) => {
|
|
- console.log(res.data);
|
|
|
|
this.dataList = res.data;
|
|
this.dataList = res.data;
|
|
this.listLoading = false;
|
|
this.listLoading = false;
|
|
});
|
|
});
|
|
@@ -389,7 +374,7 @@
|
|
},
|
|
},
|
|
hanleEdit(item) {
|
|
hanleEdit(item) {
|
|
this.dialogForm = {
|
|
this.dialogForm = {
|
|
- // id: item.id,
|
|
|
|
|
|
+ id: item.id,
|
|
companyRecordManageId: item.companyRecordManageId,
|
|
companyRecordManageId: item.companyRecordManageId,
|
|
imgCarouselName: item.imgCarouselName,
|
|
imgCarouselName: item.imgCarouselName,
|
|
imgCarouselUrl: item.imgCarouselUrl,
|
|
imgCarouselUrl: item.imgCarouselUrl,
|
|
@@ -417,47 +402,15 @@
|
|
},
|
|
},
|
|
|
|
|
|
addImgCarousel(){
|
|
addImgCarousel(){
|
|
- this.$refs.dialogForm.validate((valid) => {
|
|
|
|
- //console.log(...this.dialogForm)
|
|
|
|
- if (valid) {
|
|
|
|
- this.dialogForm.imgCarouselUrl = "http://hg.zfire.top/api/img/get?key=" + this.fileList[0].url
|
|
|
|
- const params = {
|
|
|
|
- ...this.dialogForm,
|
|
|
|
- };
|
|
|
|
- addImgCarousel(params).then((res) => {
|
|
|
|
- this.$successMsg("添加成功");
|
|
|
|
- this.hanleReset();
|
|
|
|
- });
|
|
|
|
- } else {
|
|
|
|
- console.log("error submit!!");
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- //添加公司信息
|
|
|
|
- addComPany(){
|
|
|
|
-
|
|
|
|
- //console.log(...this.dialogForm)
|
|
|
|
- const params = {
|
|
|
|
- ...this.comPanyDialogForm,
|
|
|
|
- };
|
|
|
|
- addCompany(params).then((res) => {
|
|
|
|
- this.$successMsg("添加成功");
|
|
|
|
- this.hanleReset();
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- handelInfo() {
|
|
|
|
if (this.type == 1) {
|
|
if (this.type == 1) {
|
|
this.$refs.dialogForm.validate((valid) => {
|
|
this.$refs.dialogForm.validate((valid) => {
|
|
|
|
+ //console.log(...this.dialogForm)
|
|
if (valid) {
|
|
if (valid) {
|
|
|
|
+ this.dialogForm.imgCarouselUrl = "http://hg.zfire.top/api/img/get?key=" + this.fileList[0].url
|
|
const params = {
|
|
const params = {
|
|
...this.dialogForm,
|
|
...this.dialogForm,
|
|
};
|
|
};
|
|
- addData(params).then((res) => {
|
|
|
|
- console.log(res);
|
|
|
|
|
|
+ addImgCarousel(params).then((res) => {
|
|
this.$successMsg("添加成功");
|
|
this.$successMsg("添加成功");
|
|
this.hanleReset();
|
|
this.hanleReset();
|
|
});
|
|
});
|
|
@@ -470,15 +423,30 @@
|
|
const upParams = {
|
|
const upParams = {
|
|
...this.dialogForm,
|
|
...this.dialogForm,
|
|
};
|
|
};
|
|
- updateType(upParams).then((res) => {
|
|
|
|
|
|
+ editImgCarousel(upParams).then((res) => {
|
|
this.$successMsg("修改成功");
|
|
this.$successMsg("修改成功");
|
|
-
|
|
|
|
this.hanleReset();
|
|
this.hanleReset();
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
this.dialogVisible = false;
|
|
this.dialogVisible = false;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 表格选择
|
|
|
|
+ handleSelectionChange(val) {
|
|
|
|
+ this.multipleSelection = val;
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ //添加公司信息
|
|
|
|
+ addComPany(){
|
|
|
|
+ const params = {
|
|
|
|
+ ...this.comPanyDialogForm,
|
|
|
|
+ };
|
|
|
|
+ addCompany(params).then((res) => {
|
|
|
|
+ this.$successMsg("添加成功");
|
|
|
|
+ this.hanleReset();
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ },
|
|
resetForm(formName) {
|
|
resetForm(formName) {
|
|
this.$refs.dialogForm.resetFields();
|
|
this.$refs.dialogForm.resetFields();
|
|
},
|
|
},
|
|
@@ -494,6 +462,26 @@
|
|
this.dialogVisible = false;
|
|
this.dialogVisible = false;
|
|
this.getList();
|
|
this.getList();
|
|
},
|
|
},
|
|
|
|
+ batchDelete() {
|
|
|
|
+ if(this.multipleSelection.length < 1) {
|
|
|
|
+ return this.$errorMsg('请选择信息');
|
|
|
|
+ }
|
|
|
|
+ this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ }).then(() => {
|
|
|
|
+ let ids = [];
|
|
|
|
+ this.multipleSelection.forEach(item => {
|
|
|
|
+ ids.push(item.id);
|
|
|
|
+ });
|
|
|
|
+ delImgData({ids: ids.join(',')}).then(res => {
|
|
|
|
+ this.$successMsg('删除成功');
|
|
|
|
+ this.hanleReset();
|
|
|
|
+ })
|
|
|
|
+ }).catch(() => {});
|
|
|
|
+ },
|
|
|
|
+
|
|
},
|
|
},
|
|
components: {
|
|
components: {
|
|
Pagination,
|
|
Pagination,
|