centaline-data-driven 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "centaline-data-driven",
3
- "version": "1.3.00",
3
+ "version": "1.3.01",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
@@ -107,6 +107,10 @@
107
107
  </el-popover>
108
108
  </div>
109
109
 
110
+ <ct-tablecurrency v-else-if="column.id==='voice'" :isShowVoice="true" :router="column.router" :colValue="column.router.label" :rowData="row" @click="rolRouterClickHandler"
111
+ :class="column.autoRowHeight ? 'lineFeedCell':'cell'">
112
+ </ct-tablecurrency>
113
+
110
114
  <!--可点击的列-->
111
115
  <ct-tablecurrency v-else-if="column.router" :align="column.attrs.align" :class="column.autoRowHeight ? 'lineFeedCell':'cell'" :router="column.router" :colValue="row[column.id]" :rowData="row"
112
116
  @click="rolRouterClickHandler">
@@ -6,7 +6,6 @@ import common from '../../../common';
6
6
  import Vue from 'vue';
7
7
  const SearchScreen = function (source, callBack, screenPara) {
8
8
  var init = function (source) {
9
- console.log(source.content)
10
9
  var rtn = {
11
10
  $vue: null,
12
11
  get source() {
@@ -1,12 +1,19 @@
1
1
  <template>
2
- <div :class="isOperationalColumn?'subdiv_allinline':''" v-if="isShowLabel" @click="isOperationalColumn?clickHandler($event):null">
3
- <div v-if="router.isListenVoice">
2
+ <div :class="isOperationalColumn?'subdiv_allinline':''" v-if="isShowLabel" @click="isOperationalColumn?clickHandler($event):null">
3
+ <div v-if="isShowVoice" style="line-height: 16px;padding-top: 3px;">
4
+ <video ref="video" :src="rowData[router.submitFormField]" controls="true" controlslist="nodownload"
5
+ @timeupdate="saveVoiceHistoryHandler" @ended="voiceEndedHandler"
6
+ height="20" width="100%">您的浏览器不支持 video 标签。
7
+ </video>
8
+ </div>
9
+ <div v-else-if="router.isListenVoice">
4
10
  <el-popover class="Stats-popover" :popper-class="'el-listenVoice'+rowindex" :placement="option.placement?option.placement:'left'"
5
11
  v-model="visible" :trigger="option.trigger?option.trigger:''" style="margin:0px;">
6
12
  <div class="alert fade in" role="alert" style="padding:0px;border-bottom:none;display: table-caption;">
7
13
  <button type="button" class="close el-icon-close" style="right:0px;float:right;margin-bottom: 5px;cursor: pointer;" data-dismiss="alert" aria-label="Close" @click="clickHandler">
8
14
  </button>
9
- <video ref="video" :src="rowData[router.submitFormField]" controls="true" autoplay controlslist="nodownload" @timeupdate="saveVoiceHistoryHandler"
15
+ <video ref="video" :src="rowData[router.submitFormField]" controls="true" controlslist="nodownload" @timeupdate="saveVoiceHistoryHandler"
16
+ @ended="voiceEndedHandler"
10
17
  :height="router.dialogHeight?router.dialogHeight:'40'" :width="router.dialogWidth?router.dialogWidth:'100%'">您的浏览器不支持 video 标签。
11
18
  </video>
12
19
  </div>
@@ -40,7 +47,11 @@
40
47
  isShowImg: {
41
48
  type: Boolean,
42
49
  default: true
43
- }
50
+ },
51
+ isShowVoice: {
52
+ type: Boolean,
53
+ default: false
54
+ },
44
55
  },
45
56
  computed: {
46
57
  label: function () {
@@ -56,6 +67,7 @@
56
67
  data() {
57
68
  return {
58
69
  visible:false,
70
+ listenSeconds:-1,
59
71
  option: {
60
72
  isHidden: true,//是否开启操作栏隐藏设置,默认开启
61
73
  showNum: 3,//如果isHidden为true时,个数大于3就会隐藏,默认是3
@@ -76,17 +88,25 @@
76
88
  },
77
89
  saveVoiceHistoryHandler() {
78
90
  var self=this;
79
- if(self.router.action && self.visible){
91
+ if(self.router.action && (self.visible || self.isShowVoice)){
92
+ var currentTime=parseInt(self.$refs.video.currentTime)+1;
93
+ if(this.listenSeconds===currentTime){
94
+ return;
95
+ }
96
+ this.listenSeconds=currentTime;
80
97
  var submitData = {};
81
98
  self.router.actionField.split(',').forEach((k) => {
82
99
  submitData[k] = self.rowData[k];
83
100
  });
84
- submitData.listenSeconds=self.$refs.video.currentTime;
101
+ submitData.listenSeconds=currentTime;
85
102
  self.router.doAction(submitData, (data) => {
86
103
 
87
104
  })
88
105
  }
89
- }
106
+ },
107
+ voiceEndedHandler() {
108
+ this.listenSeconds=-1;
109
+ },
90
110
  }
91
111
  }
92
112
  </script>
package/src/main.js CHANGED
@@ -47,7 +47,7 @@ Vue.use(centaline, {
47
47
  },
48
48
  // 请求完成事件,可判断是否登录过期执行响应操作
49
49
  requestComplete: function (response) {
50
- console.log(response);
50
+ // console.log(response);
51
51
  }
52
52
  }});
53
53