1 line
14 KiB
JSON
1 line
14 KiB
JSON
{"remainingRequest":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\babel-loader\\lib\\index.js!D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!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\\babel.config.js","mtime":1718070785981},{"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:Ly8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8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Ghpcy5saXN0UXVlcnkKICAgICAgfSkudGhlbihmdW5jdGlvbiAocmVzcG9uc2UpIHsKICAgICAgICBfdGhpcy5saXN0ID0gcmVzcG9uc2UuZGF0YS5kYXRhOwogICAgICAgIF90aGlzLnRvdGFsID0gcmVzcG9uc2UuZGF0YS50b3RhbDsKICAgICAgICBfdGhpcy5vc3MgPSByZXNwb25zZS5leHQub3NzOwogICAgICAgIF90aGlzLmxpc3RMb2FkaW5nID0gZmFsc2U7CiAgICAgIH0pLmNhdGNoKGZ1bmN0aW9uIChlcnIpIHt9KTsKICAgIH0sCiAgICBvbkRlbDogZnVuY3Rpb24gb25EZWwoaXRlbSkgewogICAgICB2YXIgX3RoaXMyID0gdGhpczsKICAgICAgdGhpcy4kYXhpb3MucG9zdCgnL2FkbWluL3dvcmsvZGVsJywgewogICAgICAgIGlkOiBpdGVtLmlkCiAgICAgIH0pLnRoZW4oZnVuY3Rpb24gKHJlcykgewogICAgICAgIF90aGlzMi5kaWFsb2dWaXNpYmxlID0gZmFsc2U7CiAgICAgICAgX3RoaXMyLmdldExpc3QoKTsKICAgICAgfSkuY2F0Y2goZnVuY3Rpb24gKGVycikge30pOwogICAgfSwKICAgIG9uU2F2ZTogZnVuY3Rpb24gb25TYXZlKGZyb20pIHsKICAgICAgdmFyIF90aGlzMyA9IHRoaXM7CiAgICAgIGlmIChmcm9tKSB7CiAgICAgICAgdGhpcy4kc2V0KGZyb20sICdkYXRlJywgW25ldyBEYXRlKGZyb20uc3RhcnQpLCBuZXcgRGF0ZShmcm9tLmVuZCldKTsKICAgICAgICB0aGlzLml0ZW0gPSBmcm9tOwogICAgICAgIHRoaXMuaXRlbS5vcyA9IGZyb20ub3MgKyAnJzsKICAgICAgICB0aGlzLmRpYWxvZ1dvcmsgPSB0cnVlOwogICAgICAgIHJldHVybjsKICAgICAgfQogICAgICB0aGlzLiRheGlvcy5wb3N0KCcvYWRtaW4vd29yay9zYXZlJywgdGhpcy5pdGVtKS50aGVuKGZ1bmN0aW9uIChyZXNwb25zZSkgewogICAgICAgIF90aGlzMy5kaWFsb2dXb3JrID0gZmFsc2U7CiAgICAgICAgX3RoaXMzLmdldExpc3QoKTsKICAgICAgfSkuY2F0Y2goZnVuY3Rpb24gKGVycikge30pOwogICAgfSwKICAgIG9uQWRkOiBmdW5jdGlvbiBvbkFkZCgpIHsKICAgICAgdmFyIF90aGlzNCA9IHRoaXM7CiAgICAgIHRoaXMuJGF4aW9zLmdldCgnL2FkbWluL3dvcmsvYW5jaG9yJykudGhlbihmdW5jdGlvbiAocmVzKSB7CiAgICAgICAgX3RoaXM0LmFuY2hvcnMgPSByZXMuZGF0YSB8fCBbXTsKICAgICAgICBfdGhpczQuZGlhbG9nQ3JlYXRlID0gdHJ1ZTsKICAgICAgfSkuY2F0Y2goZnVuY3Rpb24gKGVycikge30pOwogICAgfSwKICAgIG9uU2F2ZXM6IGZ1bmN0aW9uIG9uU2F2ZXMoKSB7CiAgICAgIHZhciBfdGhpczUgPSB0aGlzOwogICAgICBpZiAodGhpcy5sb2FkaW5nKSByZXR1cm47CiAgICAgIHRoaXMubG9hZGluZyA9IHRydWU7CiAgICAgIHRoaXMuJGF4aW9zLnBvc3QoJy9hZG1pbi93b3JrL3NhdmUyJywgdGhpcy5hbmNob3JzKS50aGVuKGZ1bmN0aW9uIChyZXMpIHsKICAgICAgICBfdGhpczUuZGlhbG9nQ3JlYXRlID0gZmFsc2U7CiAgICAgICAgX3RoaXM1LmxvYWRpbmcgPSBmYWxzZTsKICAgICAgfSkuY2F0Y2goZnVuY3Rpb24gKGVycikgewogICAgICAgIF90aGlzNS5sb2FkaW5nID0gZmFsc2U7CiAgICAgIH0pOwogICAgfQogIH0KfTs="},{"version":3,"names":["Pagination","name","components","data","oss","list","total","listLoading","loading","listQuery","page","limit","dialogWork","dialogCreate","item","anchors","created","getList","methods","_this","$axios","get","params","then","response","ext","catch","err","onDel","_this2","post","id","res","dialogVisible","onSave","from","_this3","$set","Date","start","end","os","onAdd","_this4","onSaves","_this5"],"sources":["src/views/admin/works.vue"],"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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoJA,OAAAA,UAAA;;AAEA;EACAC,IAAA;EACAC,UAAA;IAAAF,UAAA,EAAAA;EAAA;EACAG,IAAA,WAAAA,KAAA;IACA;MACAC,GAAA;MACAC,IAAA;MACAC,KAAA;MACAC,WAAA;MACAC,OAAA;MACAC,SAAA;QACAC,IAAA;QACAC,KAAA;MACA;MACAC,UAAA;MACAC,YAAA;MACAC,IAAA;MACAC,OAAA;IACA;EACA;EACAC,OAAA,WAAAA,QAAA;IACA,KAAAC,OAAA;EACA;EACAC,OAAA;IACAD,OAAA,WAAAA,QAAA;MAAA,IAAAE,KAAA;MACA,KAAAC,MAAA,CAAAC,GAAA;QAAAC,MAAA,OAAAb;MAAA,GAAAc,IAAA,WAAAC,QAAA;QACAL,KAAA,CAAAd,IAAA,GAAAmB,QAAA,CAAArB,IAAA,CAAAA,IA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