1 line
12 KiB
JSON
1 line
12 KiB
JSON
{"remainingRequest":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\phpstudy_pro\\WWW\\travel\\admin\\src\\views\\admin\\works.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\src\\views\\admin\\works.vue","mtime":1718703342892},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1718764957200},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\babel-loader\\lib\\index.js","mtime":1718764959024},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1718764957200},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\vue-loader\\lib\\index.js","mtime":1718764959862}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:Ly8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KL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SwNCiAgICBvblNhdmVzKCkgew0KICAgICAgaWYodGhpcy5sb2FkaW5nKSByZXR1cm4NCiAgICAgIHRoaXMubG9hZGluZyA9IHRydWUNCiAgICAgIHRoaXMuJGF4aW9zLnBvc3QoJy9hZG1pbi93b3JrL3NhdmUyJywgdGhpcy5hbmNob3JzKS50aGVuKHJlcyA9PiB7DQogICAgICAgIHRoaXMuZGlhbG9nQ3JlYXRlID0gZmFsc2UNCiAgICAgICAgdGhpcy5sb2FkaW5nID0gZmFsc2UNCiAgICAgIH0pLmNhdGNoKGVycj0+IHsNCiAgICAgICAgdGhpcy5sb2FkaW5nID0gZmFsc2UNCiAgICAgIH0pDQogICAgfQ0KICB9DQp9DQo="},{"version":3,"sources":["works.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoJA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"works.vue","sourceRoot":"src/views/admin","sourcesContent":["<template>\r\n <div class=\"app-container\">\r\n\r\n <div class=\"filter-container\">\r\n <el-input v-model=\"listQuery.username\" placeholder=\"用户名\" style=\"width: 200px; margin-right: 10px;\"\r\n class=\"filter-item\" />\r\n <el-button class=\"filter-item\" type=\"primary\" icon=\"el-icon-search\" @click=\"getList\">\r\n 搜索\r\n </el-button>\r\n\r\n <el-button class=\"filter-item\" type=\"primary\" icon=\"el-icon-circle-plus\" @click=\"onAdd\">\r\n 添加主播排班\r\n </el-button>\r\n\r\n </div>\r\n\r\n <el-table v-loading=\"listLoading\" :data=\"list\" border fit highlight-current-row style=\"width: 100%\">\r\n\r\n <el-table-column align=\"center\" fixed label=\"操作\" width=\"220\">\r\n <template slot-scope=\"scope\">\r\n <el-button type=\"danger\" @click=\"onDel(scope.row)\" size=\"small\" icon=\"el-icon-delete-solid\">\r\n 删除\r\n </el-button>\r\n\r\n <el-button type=\"primary\" @click=\"onSave(scope.row)\" size=\"small\" icon=\"el-icon-edit\">\r\n 修改\r\n </el-button>\r\n </template>\r\n </el-table-column>\r\n\r\n <el-table-column align=\"center\" label=\"ID\" width=\"80\">\r\n <template slot-scope=\"scope\">\r\n <span>{{ scope.row.id }}</span>\r\n </template>\r\n </el-table-column>\r\n\r\n <el-table-column align=\"center\" label=\"用户名\" width=\"160\">\r\n <template slot-scope=\"scope\">\r\n <span>{{ scope.row.admin.username }}</span>\r\n </template>\r\n </el-table-column>\r\n\r\n <el-table-column align=\"center\" label=\"姓名\" width=\"160\">\r\n <template slot-scope=\"scope\">\r\n <span>{{ scope.row.admin.name }}</span>\r\n </template>\r\n </el-table-column>\r\n\r\n <el-table-column align=\"center\" width=\"100px\" label=\"头像\">\r\n <template slot-scope=\"scope\">\r\n <el-avatar :size=\"50\" :src=\"scope.row.admin.avatar\"></el-avatar>\r\n </template>\r\n </el-table-column>\r\n\r\n <el-table-column align=\"center\" label=\"排班时间\">\r\n <template slot-scope=\"scope\">\r\n {{ scope.row.start| parseTime('{y}-{m}-{d} {h}:{i}') }} - {{ scope.row.end| parseTime('{y}-{m}-{d} {h}:{i}') }}\r\n </template>\r\n </el-table-column>\r\n\r\n <el-table-column align=\"center\" label=\"平台\">\r\n <template slot-scope=\"scope\">\r\n <template v-for=\"i in scope.row.os\">\r\n {{ oss[i] }}\r\n </template>\r\n </template>\r\n </el-table-column>\r\n\r\n <el-table-column align=\"center\" label=\"订单金额\">\r\n <template slot-scope=\"scope\">\r\n {{ scope.row.total/100 }}\r\n </template>\r\n </el-table-column>\r\n\r\n <el-table-column width=\"140px\" align=\"center\" label=\"创建时间\">\r\n <template slot-scope=\"scope\">\r\n <span>{{ scope.row.create_time | parseTime('{y}-{m}-{d} {h}:{i}') }}</span>\r\n </template>\r\n </el-table-column>\r\n\r\n <el-table-column width=\"140px\" align=\"center\" label=\"修改时间\">\r\n <template slot-scope=\"scope\">\r\n <span>{{ scope.row.update_time | parseTime('{y}-{m}-{d} {h}:{i}') }}</span>\r\n </template>\r\n </el-table-column>\r\n\r\n </el-table>\r\n\r\n <pagination v-show=\"total > 0\" :total=\"total\" :page.sync=\"listQuery.page\" :limit.sync=\"listQuery.limit\" @pagination=\"getList\" />\r\n\r\n <el-dialog title=\"修改排班\" :visible.sync=\"dialogWork\">\r\n <el-form label-width=\"120px\" :model=\"item\">\r\n\r\n <el-form-item label=\"上班时间\">\r\n <el-date-picker\r\n v-model=\"item.date\"\r\n type=\"datetimerange\"\r\n range-separator=\"至\"\r\n start-placeholder=\"开始日期\"\r\n end-placeholder=\"结束日期\">\r\n </el-date-picker>\r\n </el-form-item>\r\n\r\n <el-form-item label=\"渠道\">\r\n <el-checkbox-group v-model=\"item.oss\">\r\n <el-checkbox v-for=\"(v,i,k) in oss\" :label=\"i\" :key=\"k\">{{v}}</el-checkbox>\r\n </el-checkbox-group>\r\n </el-form-item>\r\n\r\n </el-form>\r\n\r\n <div slot=\"footer\" class=\"dialog-footer\">\r\n <el-button type=\"primary\" @click=\"onSave()\">保 存</el-button>\r\n </div>\r\n </el-dialog>\r\n\r\n <el-dialog title=\"主播排班表\" :visible.sync=\"dialogCreate\">\r\n <el-form label-width=\"120px\">\r\n <el-row v-for=\"an in anchors\" style=\"margin-bottom: 10px;\">\r\n <el-col :span=\"2\">{{ an.name }}</el-col>\r\n <el-col :span=\"14\">\r\n <el-date-picker\r\n v-model=\"an.times\"\r\n type=\"datetimerange\"\r\n range-separator=\"至\"\r\n start-placeholder=\"开始日期\"\r\n :default-time=\"['07:00:00', '23:59:59']\"\r\n style=\"width:90%\"\r\n end-placeholder=\"结束日期\">\r\n </el-date-picker>\r\n </el-col>\r\n <el-col :span=\"8\">\r\n <el-checkbox-group v-model=\"an.os\">\r\n <el-checkbox v-for=\"(v,i,k) in oss\" :label=\"i\" :key=\"k\">{{v}}</el-checkbox>\r\n </el-checkbox-group>\r\n </el-col>\r\n </el-row>\r\n </el-form>\r\n\r\n <div slot=\"footer\" class=\"dialog-footer\">\r\n <el-button type=\"primary\" v-loading=\"loading\" @click=\"onSaves()\">保 存</el-button>\r\n </div>\r\n </el-dialog>\r\n\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport Pagination from '@/components/Pagination' // Secondary package based on el-pagination\r\n\r\nexport default {\r\n name: 'Works',\r\n components: { Pagination },\r\n data() {\r\n return {\r\n oss: {},\r\n list: null,\r\n total: 0,\r\n listLoading: true,\r\n loading: false,\r\n listQuery: {\r\n page: 1,\r\n limit: 20\r\n },\r\n dialogWork: false,\r\n dialogCreate: false,\r\n item: {},\r\n anchors: []\r\n }\r\n },\r\n created() {\r\n this.getList()\r\n },\r\n methods: {\r\n getList() {\r\n this.$axios.get('/admin/work/index', { params: this.listQuery }).then(response => {\r\n this.list = response.data.data\r\n this.total = response.data.total\r\n this.oss = response.ext.oss\r\n this.listLoading = false\r\n }).catch(err => {\r\n })\r\n },\r\n onDel(item) {\r\n this.$axios.post('/admin/work/del', {id: item.id}).then(res => {\r\n this.dialogVisible = false\r\n this.getList()\r\n }).catch(err => {\r\n\r\n })\r\n },\r\n onSave(from) {\r\n if(from) {\r\n this.$set(from,'date',[new Date(from.start), new Date(from.end)]);\r\n this.item = from;\r\n this.item.os = from.os+'';\r\n this.dialogWork = true;\r\n return\r\n }\r\n this.$axios.post('/admin/work/save', this.item).then(response => {\r\n this.dialogWork = false\r\n this.getList()\r\n }).catch(err => {\r\n })\r\n },\r\n onAdd() {\r\n this.$axios.get('/admin/work/anchor').then((res) => {\r\n this.anchors = res.data || []\r\n this.dialogCreate = true\r\n }).catch(err=>{\r\n\r\n })\r\n },\r\n onSaves() {\r\n if(this.loading) return\r\n this.loading = true\r\n this.$axios.post('/admin/work/save2', this.anchors).then(res => {\r\n this.dialogCreate = false\r\n this.loading = false\r\n }).catch(err=> {\r\n this.loading = false\r\n })\r\n }\r\n }\r\n}\r\n</script>\r\n"]}]} |