| | |
| | | <!-- 查看修改页面 --> |
| | | <el-dialog |
| | | :visible.sync="dialogScore" |
| | | width="45%" |
| | | width="60%" |
| | | :destroy-on-close="true" |
| | | title="查看积分" |
| | | :before-close="handleClose" |
| | | :before-close="handleCloseScoreView" |
| | | > |
| | | <scoreView :storeInfo="storeInfo" @closeDialog="closeDialog" /> |
| | | <scoreView v-if="dialogScore" :storeInfo="storeInfoScoreView" /> |
| | | </el-dialog> |
| | | <!-- 分页 --> |
| | | <div class="pagination"> |
| | |
| | | userInfo: null, |
| | | dialogType: "", |
| | | storeInfo: null, |
| | | storeInfoScoreView: {}, |
| | | }; |
| | | }, |
| | | |
| | |
| | | this.dialogType = type; |
| | | }, |
| | | handleScoreView(row) { |
| | | this.storeInfoScoreView = row; |
| | | this.dialogScore = true; |
| | | this.storeInfo = row; |
| | | }, |
| | | |
| | | handleDelete(id) { |
| | |
| | | }) |
| | | .catch((err) => this.$message({ type: "error", message: err })); |
| | | }, |
| | | |
| | | handleCloseScoreView() { |
| | | this.dialogScore = false; |
| | | }, |
| | | handleClose() { |
| | | this.dialogUpdate = false; |
| | | this.dialogScore = false; |
| | | }, |
| | | |
| | | closeDialog() { |
| | | this.dialogUpdate = false; |
| | | this.dialogScore = false; |
| | | this.search(); |
| | | }, |
| | | |
| | |
| | | |
| | | export default { |
| | | created() { |
| | | this.search(); |
| | | this.loadData(); |
| | | }, |
| | | |
| | | props: ["storeInfo"], |
| | | |
| | | data() { |
| | | return { |
| | | tableData: [], |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | search() { |
| | | loadData() { |
| | | getStoreScore(this.storeInfo.id) |
| | | .then((res) => { |
| | | this.tableData = res.records; |
| | |
| | | |
| | | changeCurrentPage(currentPage) { |
| | | this.currentPage = currentPage; |
| | | this.search(); |
| | | this.loadData(); |
| | | }, |
| | | |
| | | tableRowClassName({ row, rowIndex }) { |
| | |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <!-- 店铺状态 --> |
| | | <el-form-item |
| | | v-if="isStorePage" |
| | | class="optionItem" |
| | | label="店铺状态:" |
| | | prop="status" |
| | | > |
| | | <el-select |
| | | v-model="store.status" |
| | | placeholder="请选择店铺状态" |
| | | :disabled="isView()" |
| | | > |
| | | <el-option |
| | | v-for="item in statusList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-if="!isStorePage" |
| | | class="optionItem" |
| | |
| | | relationVideo: "", |
| | | type: null, |
| | | storeScore: null, |
| | | status: null, |
| | | }, |
| | | rules: { |
| | | type: [{ required: true, validator: validateStoreType }], |
| | |
| | | relationVideo: [ |
| | | { required: true, trigger: "blur", message: "请输入关联摄像机" }, |
| | | ], |
| | | status: [ |
| | | { required: true, trigger: "blur", message: "请选择店铺状态" }, |
| | | ], |
| | | }, |
| | | shopTypeList: [], |
| | | relationVideoList: [], |
| | | statusList: [ |
| | | { id: 1, name: "经营" }, |
| | | { id: 2, name: "倒闭" }, |
| | | ], |
| | | }; |
| | | }, |
| | | async created() { |
| | |
| | | this.store.relationVideo = this.store.videoPoint.name; |
| | | } |
| | | } |
| | | |
| | | |
| | | if (!this.isView()) { |
| | | await this.getShopTypeList(); |
| | | } |
| | |
| | | onSubmit() { |
| | | this.$refs.store.validate((valid) => { |
| | | if (valid) { |
| | | debugger |
| | | debugger; |
| | | this.store.type = this.store.type[1]; |
| | | if (this.isCreated()) { |
| | | addStoreInfo(this.store) |
| | |
| | | async getShopTypeList() { |
| | | let arr = await getCodeList("16"); |
| | | this.shopTypeList = this.createShopTypeTree(arr); |
| | | |
| | | |
| | | if (this.dialogType === "update") { |
| | | const selectedStoreType = arr.find( |
| | | (item) => item.name === this.store.typeName |