PublicAccountParameterManage.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  1. <template>
  2. <div>
  3. <!-- <div class="crumbs">-->
  4. <!-- <el-breadcrumb separator="/">-->
  5. <!-- <el-breadcrumb-item><i class="el-icon-lx-calendar"></i>商品管理</el-breadcrumb-item>-->
  6. <!-- <el-breadcrumb-item>-->
  7. <!-- <template v-if="newfla">新建商品</template>-->
  8. <!-- <template v-else>编辑商品</template>-->
  9. <!-- </el-breadcrumb-item>-->
  10. <!-- </el-breadcrumb>-->
  11. <!-- </div>-->
  12. <div class="container">
  13. <div class="container" style="margin-top:10px">
  14. <!-- <div class="crumbs" style="margin-top:-10px;">-->
  15. <!-- <el-breadcrumb separator="" style="position: relative;">-->
  16. <!-- <el-breadcrumb-item><i class="el-icon-lx-calendar"></i>商品型号</el-breadcrumb-item>-->
  17. <!-- </el-breadcrumb>-->
  18. <!-- </div>-->
  19. <el-table :border="true" :data="tableData" :fit="true" :stripe="true"
  20. style="width: 100%;">
  21. <el-table-column align="left" label="今日扫码关注" prop="num">
  22. </el-table-column>
  23. <el-table-column align="left" label="今日扫码总数" prop="num1">
  24. </el-table-column>
  25. <el-table-column align="left" label="今日扫码(已关注)" prop="num2">
  26. </el-table-column>
  27. </el-table>
  28. </div>
  29. <div class="container" style="margin-top:10px">
  30. <div class="crumbs" style="margin-top:-10px">
  31. <el-breadcrumb separator="" style="position: relative;">
  32. <el-breadcrumb-item><i class="el-icon-lx-calendar"></i>公众号参数二维码</el-breadcrumb-item>
  33. </el-breadcrumb>
  34. </div>
  35. <div class="handle-box">
  36. <el-button type="primary" icon="search" @click="addRow"
  37. >添加二维码</el-button>
  38. <el-button type="primary" icon="search" @click="statistics"
  39. >统计数据</el-button>
  40. </div>
  41. <dptable :columns="columns1" :dataSource="tableData2" :fetch="getDataList" :options="options2"/>
  42. </div>
  43. </div>
  44. <el-dialog :title="title" :visible.sync="addDialogVisible" :before-close="closeDialog">
  45. <div class="container" >
  46. <div class="form-box">
  47. <el-form ref="form" :model="addForm" label-width="120px">
  48. <el-form-item label="场景值" :required="true" style="text-align:left">
  49. <el-input v-model="addForm.scene" style="width:360px" clearable></el-input>
  50. </el-form-item>
  51. <el-form-item>
  52. <el-button type="primary" @click="closeDialog">保存</el-button>
  53. <el-button @click="closeDialog">关闭</el-button>
  54. </el-form-item>
  55. </el-form>
  56. </div>
  57. </div>
  58. </el-dialog>
  59. <el-dialog :title="title1" :visible.sync="addDialogVisible1" :before-close="closeDialog1" width="60%">
  60. <div class="container" >
  61. <div>
  62. <span>场景值</span>
  63. <el-select v-model="scene" clearable placeholder="请选择">
  64. <el-option
  65. v-for="item in sceneList"
  66. :key="item.value"
  67. :label="item.label"
  68. :value="item.value">
  69. </el-option>
  70. </el-select>
  71. <span>时间范围</span>
  72. <el-date-picker
  73. v-model="time"
  74. type="daterange"
  75. range-separator="至"
  76. start-placeholder="开始日期"
  77. end-placeholder="结束日期">
  78. </el-date-picker>
  79. <el-button type="primary" icon="search" @click="getSceneList">查询</el-button>
  80. </div>
  81. </div>
  82. <div class="container" >
  83. <div class="container" style="margin-top:10px">
  84. <el-table :border="true" :data="tableData" :fit="true" :stripe="true"
  85. style="width: 100%;">
  86. <el-table-column align="left" label="今日扫码关注" prop="num">
  87. </el-table-column>
  88. <el-table-column align="left" label="今日扫码总数" prop="num1">
  89. </el-table-column>
  90. <el-table-column align="left" label="今日扫码(已关注)" prop="num2">
  91. </el-table-column>
  92. </el-table>
  93. </div>
  94. </div>
  95. <span slot="footer" class="dialog-footer">
  96. <el-button @click="closeDialog1">关闭</el-button>
  97. </span>
  98. </el-dialog>
  99. </div>
  100. </template>
  101. <script>
  102. import dptable from "../../../common/Dptable";
  103. export default {
  104. components: {
  105. dptable
  106. },
  107. data() {
  108. return {
  109. time: '',
  110. scene: '',
  111. sceneList: [{
  112. value: '选项1',
  113. label: '小包纸巾'
  114. }, {
  115. value: '选项2',
  116. label: '公众号进入'
  117. }],
  118. addForm: {
  119. scene: ''
  120. },
  121. // 数据列的定义
  122. tableData: [
  123. {
  124. num: 10,
  125. num1: 20,
  126. num2: 5,
  127. }
  128. ],
  129. dialogVisible: false,
  130. addDialogVisible: false,
  131. addDialogVisible1: false,
  132. title: '',
  133. title1: '',
  134. columns1: [
  135. {
  136. prop: "appId",
  137. label: "公众号appid",
  138. },
  139. {
  140. prop: "scene",
  141. label: "场景值",
  142. },
  143. {
  144. prop: "num",
  145. label: "扫码次数",
  146. },
  147. {
  148. prop: "orderKey",
  149. label: "小程序码",
  150. },
  151. {
  152. prop: 'createDate', label: '创建时间', formatter: (row) => {
  153. var date = row.createDate;
  154. if (date == undefined) {
  155. return "";
  156. }
  157. return this.$moment(date).format("YYYY-MM-DD HH:mm:ss");
  158. }
  159. },
  160. {
  161. button: true,
  162. label: "操作",
  163. group: [
  164. {
  165. name: '编辑',
  166. icon: 'el-icon-edit',
  167. plain: true,
  168. onClick: (row, index) => {
  169. this.editRow(row);
  170. }
  171. },
  172. {
  173. name: '删除',
  174. type: 'danger',
  175. icon: 'el-icon-delete',
  176. plain: true,
  177. onClick: (row, index) => {
  178. this.deleteRow(row);
  179. }
  180. }
  181. ]
  182. }
  183. ],
  184. tableData2: [],
  185. options2: {
  186. mutiSelect: false,// 是否有前部的多选框
  187. index: false, // 显示序号, 多选则 mutiSelect
  188. initTable: false, // 是否一挂载就加载数据
  189. border: true
  190. },
  191. isImgShow: false,
  192. }
  193. },
  194. created() {
  195. },
  196. methods: {
  197. getSceneList() {
  198. },
  199. closeDialog() {
  200. this.addDialogVisible = false
  201. },
  202. closeDialog1() {
  203. this.addDialogVisible1 = false
  204. },
  205. getDataList() {
  206. },
  207. editRow() {
  208. this.title = '编辑公众号参数二维码';
  209. this.addDialogVisible = true;
  210. },
  211. addRow() {
  212. this.title = '新增公众号参数二维码';
  213. this.addDialogVisible = true;
  214. },
  215. statistics() {
  216. this.title1 = '新增公众号参数二维码统计';
  217. this.addDialogVisible1 = true;
  218. },
  219. //删除商品参数
  220. deleteRow(goodsParamId) {
  221. this.$confirm('确定要删除该公众号参数二维码吗?', '提示', {
  222. confirmButtonText: '确定',
  223. cancelButtonText: '取消',
  224. type: 'warning'
  225. }).then(() => {
  226. this.$message.success("删除成功!");
  227. }).catch(() => {
  228. this.$message.info('已取消删除');
  229. });
  230. },
  231. }
  232. }
  233. </script>
  234. <style scoped>
  235. .added {
  236. position: absolute;
  237. right: 20px;
  238. top: -10px;
  239. }
  240. .handle-box {
  241. margin-bottom: 20px;
  242. }
  243. .handle-select {
  244. width: 120px;
  245. }
  246. .handle-input {
  247. width: 300px;
  248. display: inline-block;
  249. }
  250. .del-dialog-cnt {
  251. font-size: 16px;
  252. text-align: center
  253. }
  254. .table {
  255. width: 100%;
  256. font-size: 14px;
  257. }
  258. .red {
  259. color: #ff0000;
  260. }
  261. .mr10 {
  262. margin-right: 10px;
  263. }
  264. .container {
  265. background-color: #f6fafd;
  266. margin-top: 10px;
  267. }
  268. .el-form-item label {
  269. color: #35637d;
  270. margin-right: 10px;
  271. }
  272. /* .el-form-item div{
  273. border-bottom: 1px solid #cccccc;
  274. margin-left: 20px;
  275. width: 60%;
  276. height: 30px;
  277. } */
  278. .el-form-item .upload-demo /deep/ .el-upload–text {
  279. border: none;
  280. width: 0px;
  281. }
  282. .avatar-uploader .el-upload {
  283. border: none;
  284. border-radius: 6px;
  285. cursor: pointer;
  286. position: relative;
  287. overflow: hidden;
  288. width: 400px;
  289. background: none;
  290. height: 210px;
  291. }
  292. .el-upload--text {
  293. color: #97a8be;
  294. font-size: 14px;
  295. text-align: center;
  296. width: 210px !important;
  297. height: 210px !important;
  298. background: none !important;
  299. }
  300. /* .el-upload--text {
  301. background-color: #fff;
  302. border: none;
  303. border-radius: 6px;
  304. width: 0px;
  305. height: 0px;
  306. cursor: pointer;
  307. position: fixed;
  308. overflow: hidden;
  309. } */
  310. .el-upload {
  311. display: inline-block;
  312. text-align: center;
  313. cursor: pointer;
  314. outline: 0;
  315. width: 0px;
  316. height: 0px;
  317. }
  318. .hide .el-upload--picture-card {
  319. display: none;
  320. }
  321. .addimg {
  322. width: 192px;
  323. border: 1px solid;
  324. color: #97a8be;
  325. transition: color .25s;
  326. position: relative;
  327. border-radius: 6px;
  328. /* padding: 20px 0; */
  329. min-height: 80px;
  330. }
  331. .addimg::before {
  332. content: '';
  333. position: absolute;
  334. left: 50%;
  335. top: 50%;
  336. width: 60px;
  337. margin-left: -30px;
  338. margin-top: -5px;
  339. border-top: 5px solid;
  340. }
  341. .addimg::after {
  342. content: '';
  343. position: absolute;
  344. left: 50%;
  345. top: 50%;
  346. height: 60px;
  347. margin-left: -2px;
  348. margin-top: -30px;
  349. border-left: 5px solid;
  350. }
  351. .el-dialog__wrapper /deep/ .el-dialog .el-dialog__body {
  352. padding: 10px 20px !important;
  353. }
  354. .addimg1 {
  355. border: 1px solid;
  356. width: 192px;
  357. color: #97a8be;
  358. transition: color .25s;
  359. position: relative;
  360. border-radius: 6px;
  361. display: flex;
  362. justify-content: center;
  363. align-items: center;
  364. /* padding: 20px 0; */
  365. }
  366. </style>