347617796@qq.com 3 年之前
父节点
当前提交
6a947af2e0

+ 2 - 2
src/components/applicationIntegrationPopup.vue

@@ -81,10 +81,10 @@
 						<el-form-item
 							label="事件内容"
 							:prop="'items.' + index + '.remark'"
-							:rules="[{ required: true, message: '请输入事件内容', trigger: 'blur' }, { min: 3, max: 100, message: '长度在 3 到 100 个字符', trigger: 'blur' }]"
+							:rules="[{ required: true, message: '请输入事件内容', trigger: 'blur' }, { min: 3, max: 300, message: '长度在 3 到 300 个字符', trigger: 'blur' }]"
 						>
 							<el-row>
-								<el-col :span="18"><el-input type="textarea" rows="3" placeholder="请输入事件内容" style="width: 100%;" v-model="item.remark"></el-input></el-col>
+								<el-col :span="18"><el-input type="textarea" rows="5" placeholder="请输入事件内容" style="width: 100%;" v-model="item.remark"></el-input></el-col>
 							</el-row>
 						</el-form-item>
 

+ 2 - 2
src/components/bonusPointsPopup.vue

@@ -92,10 +92,10 @@
 						<el-form-item
 							label="事件内容"
 							:prop="'items.' + index + '.remark'"
-							:rules="[{ required: true, message: '请输入事件内容', trigger: 'blur' }, { min: 2, max: 100, message: '长度在 3 到 100 个字符', trigger: 'blur' }]"
+							:rules="[{ required: true, message: '请输入事件内容', trigger: 'blur' }, { min: 2, max: 300, message: '长度在 2 到 300 个字符', trigger: 'blur' }]"
 						>
 							<el-row>
-								<el-col :span="18"><el-input type="textarea" rows="3" placeholder="请输入事件内容" style="width: 100%;" v-model="item.remark"></el-input></el-col>
+								<el-col :span="18"><el-input type="textarea" placeholder="请输入事件内容" style="width: 100%;" :rows="5" maxlength="300" v-model="item.remark" ></el-input></el-col>
 							</el-row>
 						</el-form-item>
 

+ 224 - 207
src/components/upload.vue

@@ -1,214 +1,231 @@
 <template>
-<div>
-  <el-upload
-    ref="upload_com"
-    :headers="headers"
-    :action="action"
-    :show-file-list="showFileList"
-    :file-list="fileList"
-    :on-success="_onSuccess"
-    :on-preview="_onPreview"
-    :http-request="oss_upload"
-    :on-remove="_onRemove" 
-    :before-remove="_onBeforeRemove"
-    :before-upload="_beforeUpload"
-    :on-exceed="_onExceed"
-    :limit="limit"
-    :on-change="handleChange"
-    :multiple="multiple">
-    <slot></slot>
-    <slot name="tip"></slot>
-  </el-upload>
-  <el-progress v-show="showProcess" :percentage="processLength" :stroke-width="2"></el-progress>
-</div>
+	<div>
+		<el-upload
+			ref="upload_com"
+			:headers="headers"
+			:action="action"
+			:show-file-list="showFileList"
+			:file-list="fileList"
+			:on-success="_onSuccess"
+			:on-preview="_onPreview"
+			:http-request="oss_upload"
+			:on-remove="_onRemove"
+			:before-remove="_onBeforeRemove"
+			:before-upload="_beforeUpload"
+			:on-exceed="_onExceed"
+			:limit="limit"
+			:on-change="handleChange"
+			:multiple="multiple"
+		>
+			<slot></slot>
+			<slot name="tip"></slot>
+		</el-upload>
+		<el-progress v-show="showProcess" :percentage="processLength" :stroke-width="2"></el-progress>
+	</div>
 </template>
 
 <script>
-  function noop() {}
-  import moment from 'moment'
-  import axios from 'axios'
-  export default {
-    props: {
-      action: { //必选参数,上传的地址
-        type: String,
-        required: true
-      },
-      headers: {//设置上传的请求头部
-        type: Object,
-        default() {
-          return {};
-        }
-      },
-      data: Object,//上传时附带的额外参数
-      multiple: Boolean,//是否支持多选文件
-      name: {//上传的文件字段名
-        type: String,
-        default: 'file'
-      },
-      drag: Boolean,//是否启用拖拽上传
-      showFileList: {//是否显示已上传文件列表
-        type: Boolean,
-        default: false
-      },
-      accept: String,//	接受上传的文件类型(thumbnail-mode 模式下此参数无效)
+function noop() {}
+import moment from 'moment';
+import axios from 'axios';
+export default {
+	props: {
+		action: {
+			//必选参数,上传的地址
+			type: String,
+			required: true
+		},
+		headers: {
+			//设置上传的请求头部
+			type: Object,
+			default() {
+				return {};
+			}
+		},
+		data: Object, //上传时附带的额外参数
+		multiple: Boolean, //是否支持多选文件
+		name: {
+			//上传的文件字段名
+			type: String,
+			default: 'file'
+		},
+		drag: Boolean, //是否启用拖拽上传
+		showFileList: {
+			//是否显示已上传文件列表
+			type: Boolean,
+			default: false
+		},
+		accept: String, //	接受上传的文件类型(thumbnail-mode 模式下此参数无效)
 
-      beforeUpload: Function,//	上传文件之前的钩子,参数为上传的文件,若返回 false 或者返回 Promise 且被 reject,则停止上传。
-      onRemove: {//文件列表移除文件时的钩子
-        type: Function,
-        default: noop
-      },
-      onBeforeRemove:{//删除文件之前的钩子,参数为上传的文件和文件列表,若返回 false 或者返回 Promise 且被 reject,则停止删除。
-        type: Function,
-        default: noop
-      },
-      onPreview: {//点击文件列表中已上传的文件时的钩子
-        type: Function
-      },
-      onSuccess: {//文件上传成功时的钩子
-        type: Function,
-        default: noop
-      },
-      fileList: {//必选参数,上传的地址
-        type: Array,
-        default() {
-          return [];
-        }
-      },
-      limit: {//必选参数,上传的地址
-        type: Number,
-        default: ()=>{
-          return 1
-        }
-      },
-      onExceed: {//必选参数,上传的地址
-        type: Function,
-        default: noop
-      }
-    },
-    name: "upload",
-    data() {
-      return {
-        processLength:0,
-        showProcess:false,
-        files:{},
-        config: null
-      }
-    },
-    methods: {
-      handleChange(file,fileList){
-        this.files = file
-      },
-      handleChanges(file){
-        if(file.status === 'ready'){
-          this.processLength = 0 
-          this.showProcess = true
-          const interval = setInterval(() => {
-            if(this.processLength >= 99){
-            clearInterval(interval) 
-            return
-            }
-            this.processLength += 1
-          },20)
-        }
-        if(file.status === 'success'){
-          this.processLength =100
-          this.showProcess = false
-        }
-      },
-      get_sign(callback) {
-        // 测试添加 'https://intesys.cms.g107.com'
-        axios.get('https://intesys.cms.g107.com'+'/integral.php/Api/get_signature',{
-            headers: {
-              'Content-Type': 'application/json; charset=utf-8',
-			  'A-Token': this.$getToken()
-            }
-          }).then(res => {
-          this.config = res.data.data
-          callback()
-        })
-      },
-      _beforeUpload(file) {
-        if(!this.beforeUpload(file)){
-          return false
-        }else{
-          this.handleChanges(this.files)
-        }
-
-      },
-      oss_upload(upload_obj){
-        let self = this
-        this.get_sign(function () {
-          self.upload(upload_obj.file)
-        })
-      },
-      _onExceed(files, fileList){
-        this.$message.warning(`最多选择 ${this.limit} 个文件`)
-      },
-      _onSuccess(response, file, fileList) {
-        this.onSuccess(response, file, fileList)
-      },
-      _onPreview(file) {
-        this.onPreview(file)
-      },
-      _onRemove(file, fileList) {
-        this.onRemove(file, fileList)
-      },
-      _onBeforeRemove(file, fileList){
-        if(file.status == "success"){
-          return this.$confirm(`确定移除此项?`)
-        }
-      },
-      random_string(len) {
-        len = len || 32
-        var chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'
-        var maxPos = chars.length
-        var pwd = ''
-        for (let i = 0; i < len; i++) {
-          pwd += chars.charAt(Math.floor(Math.random() * maxPos))
-        }
-        return pwd
-      },
-      upload(item) {
-        let self = this
-        const photo = item // 获取图片对象
-        const photoName = item.name // 原图片的名称
-        const url = 'https://integralsys.oss-cn-shenzhen.aliyuncs.com'
-        let date = moment().format('YYYY/MM/DD')
-        let param = new FormData()
-        let randomStr = this.random_string(32)
-        let key = 'intesys/dd/' + this.$getUserData().site_id+ '/' + date + '/' + randomStr + '.png'
-        param.append('Filename', photoName)
-        param.append('key', key)
-        param.append('policy', this.config.policy)
-        param.append('OSSAccessKeyId', this.config.accessid)
-        param.append('success_action_status', '200') // 不要问为什么,照做
-        param.append('callback', this.config.callback)
-        param.append('signature', this.config.signature)
-        param.append('file', photo) // 这个**切记**一定要放到最后去 append ,不然阿里云会一直报 key 的错误
-        axios.post(url, param, {
-            headers: {
-              'Content-Type': 'multipart/form-data'
-            }
-          }).then(response => {
-            if(response.data.Status == 'Ok'){
-                this.processLength = 100
-                this.showProcess = false
-              setTimeout(()=>{
-                this.processLength = 0
-              },200)
-              self.fileList.push({name: randomStr + photoName, url: 'https://integralsys.oss-cn-shenzhen.aliyuncs.com/' + key, name: item.name, response:{
-                  url: 'https://integralsys.oss-cn-shenzhen.aliyuncs.com/' + key
-                }})
-              self._onSuccess({status: 1, url: 'https://integralsys.oss-cn-shenzhen.aliyuncs.com/' + key, file_name: randomStr + photoName}, item, self.fileList)
-            }
-          }).catch(err => {
-            this.showProcess = false
-          })
-      },
-    }
-  }
+		beforeUpload: Function, //	上传文件之前的钩子,参数为上传的文件,若返回 false 或者返回 Promise 且被 reject,则停止上传。
+		onRemove: {
+			//文件列表移除文件时的钩子
+			type: Function,
+			default: noop
+		},
+		onBeforeRemove: {
+			//删除文件之前的钩子,参数为上传的文件和文件列表,若返回 false 或者返回 Promise 且被 reject,则停止删除。
+			type: Function,
+			default: noop
+		},
+		onPreview: {
+			//点击文件列表中已上传的文件时的钩子
+			type: Function
+		},
+		onSuccess: {
+			//文件上传成功时的钩子
+			type: Function,
+			default: noop
+		},
+		fileList: {
+			//必选参数,上传的地址
+			type: Array,
+			default() {
+				return [];
+			}
+		},
+		limit: {
+			//必选参数,上传的地址
+			type: Number,
+			default: () => {
+				return 1;
+			}
+		},
+		onExceed: {
+			//必选参数,上传的地址
+			type: Function,
+			default: noop
+		}
+	},
+	name: 'upload',
+	data() {
+		return {
+			processLength: 0,
+			showProcess: false,
+			files: {},
+			config: null
+		};
+	},
+	methods: {
+		handleChange(file, fileList) {
+			this.files = file;
+		},
+		handleChanges(file) {
+			if (file.status === 'ready') {
+				this.processLength = 0;
+				this.showProcess = true;
+				const interval = setInterval(() => {
+					if (this.processLength >= 99) {
+						clearInterval(interval);
+						return;
+					}
+					this.processLength += 1;
+				}, 20);
+			}
+			if (file.status === 'success') {
+				this.processLength = 100;
+				this.showProcess = false;
+			}
+		},
+		get_sign(callback) {
+			axios
+				.get('https://intesys.cms.g107.com/integral.php/Api/get_signature', {
+					headers: {
+						'Content-Type': 'application/json; charset=utf-8',
+						'A-Token': this.$getToken()
+					}
+				})
+				.then(res => {
+					this.config = res.data.data;
+					callback();
+				});
+		},
+		_beforeUpload(file) {
+			if (!this.beforeUpload(file)) {
+				return false;
+			} else {
+				this.handleChanges(this.files);
+			}
+		},
+		oss_upload(upload_obj) {
+			let self = this;
+			this.get_sign(function() {
+				self.upload(upload_obj.file);
+			});
+		},
+		_onExceed(files, fileList) {
+			this.$message.warning(`最多选择 ${this.limit} 个文件`);
+		},
+		_onSuccess(response, file, fileList) {
+			this.onSuccess(response, file, fileList);
+		},
+		_onPreview(file) {
+			this.onPreview(file);
+		},
+		_onRemove(file, fileList) {
+			this.onRemove(file, fileList);
+		},
+		_onBeforeRemove(file, fileList) {
+			if (file.status == 'success') {
+				return this.$confirm(`确定移除此项?`);
+			}
+		},
+		random_string(len) {
+			len = len || 32;
+			var chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';
+			var maxPos = chars.length;
+			var pwd = '';
+			for (let i = 0; i < len; i++) {
+				pwd += chars.charAt(Math.floor(Math.random() * maxPos));
+			}
+			return pwd;
+		},
+		upload(item) {
+			let self = this;
+			const photo = item; // 获取图片对象
+			const photoName = item.name; // 原图片的名称
+			const url = 'https://integralsys.oss-cn-shenzhen.aliyuncs.com';
+			let date = moment().format('YYYY/MM/DD');
+			let param = new FormData();
+			let randomStr = this.random_string(32);
+			let key = 'intesys/dd/' + this.$getUserData().site_id + '/' + date + '/' + randomStr + '.png';
+			param.append('Filename', photoName);
+			param.append('key', key);
+			param.append('policy', this.config.policy);
+			param.append('OSSAccessKeyId', this.config.accessid);
+			param.append('success_action_status', '200'); // 不要问为什么,照做
+			param.append('callback', this.config.callback);
+			param.append('signature', this.config.signature);
+			param.append('file', photo); // 这个**切记**一定要放到最后去 append ,不然阿里云会一直报 key 的错误
+			axios.post(url, param, {
+					headers: {
+						'Content-Type': 'multipart/form-data'
+					}
+				})
+				.then(response => {
+					if (response.data.Status == 'Ok') {
+						this.processLength = 100;
+						this.showProcess = false;
+						setTimeout(() => {
+							this.processLength = 0;
+						}, 200);
+						self.fileList.push({
+							name: randomStr + photoName,
+							url: 'https://integralsys.oss-cn-shenzhen.aliyuncs.com/' + key,
+							name: item.name,
+							response: {
+								url: 'https://integralsys.oss-cn-shenzhen.aliyuncs.com/' + key
+							}
+						});
+						self._onSuccess({ status: 1, url: 'https://integralsys.oss-cn-shenzhen.aliyuncs.com/' + key, file_name: randomStr + photoName }, item, self.fileList);
+					}
+				})
+				.catch(err => {
+					this.showProcess = false;
+				});
+		}
+	}
+};
 </script>
 
-<style scoped>
-
-</style>
+<style scoped></style>

+ 1 - 1
src/main.js

@@ -23,7 +23,7 @@ Vue.component('userImage', userImage)
 Vue.component('noData', noData)
 Vue.use(ElementUI);
 if (process.env.NODE_ENV === 'development') {
-  new VConsole()
+  // new VConsole()
 }
 Vue.prototype.$echarts = echarts
 Vue.prototype.$dd = dd;

+ 16 - 4
src/views/abPoint/award_punish.vue

@@ -28,9 +28,12 @@
 				</template>
 			</el-table-column>
 			
-			<el-table-column show-overflow-tooltip label="奖扣内容">
+			<el-table-column label="奖扣内容">
 				<template slot-scope="scope">
-					<span class="font-flex-word" style="max-width: 200px;">{{  scope.row.remark_data.customize}}</span>
+					<el-tooltip class="item" effect="dark" placement="top">
+					  <div slot="content" style="width: 400px;">{{scope.row.remark_data.customize}}</div>
+					  <div class="remark">{{scope.row.remark_data.customize}}</div>
+					</el-tooltip>
 				</template>
 			</el-table-column>
 			<el-table-column  label="积分" width="120">
@@ -61,9 +64,12 @@
 					</div>
 				</template>
 			</el-table-column>
-			<el-table-column show-overflow-tooltip label="奖扣内容">
+			<el-table-column label="奖扣内容">
 				<template slot-scope="scope">
-					{{ scope.row.remark.customize }}
+					<el-tooltip class="item" effect="dark" placement="top">
+					  <div slot="content" style="width: 400px;">{{scope.row.remark.customize}}</div>
+					  <div class="remark">{{scope.row.remark.customize}}</div>
+					</el-tooltip>
 				</template>
 			</el-table-column>
 			<el-table-column label="奖扣时间" width="150">
@@ -496,6 +502,12 @@ export default {
 </script>
 
 <style scoped lang="scss">
+	.remark{
+		display: -webkit-box;
+		-webkit-box-orient: vertical;
+		-webkit-line-clamp: 2;
+		overflow: hidden;
+	}
  .btn_danger{
 	 margin-top: 20px;
  }

+ 15 - 2
src/views/ranking/integral_event.vue

@@ -86,7 +86,14 @@
 							<span :class="scope.row.point < 0 ? 'green' : 'red'">{{ scope.row.point }} {{ point_name(scope.row.pt_id) }}</span>
 						</template>
 					</el-table-column>
-					<el-table-column prop="remark" show-overflow-tooltip label="事件内容" align="left" min-width="280px"></el-table-column>
+					<el-table-column prop="remark"  label="事件内容" align="left" min-width="280px">
+						<template slot-scope="scope">
+							<el-tooltip class="item" effect="dark" placement="top">
+							  <div slot="content" style="width: 400px;">{{scope.row.remark}}</div>
+							  <div class="remark">{{scope.row.remark}}</div>
+							</el-tooltip>
+						</template>
+					</el-table-column>
 					<el-table-column prop="rule_name" show-overflow-tooltip label="规则分类" align="left" min-width="140px"></el-table-column>
 					<el-table-column prop="create_time" label="事件发生时间" align="left" min-width="140px">
 						<template slot-scope="scope">
@@ -233,7 +240,7 @@
 					</el-button>
 				</div>
 			</div>
-			<div v-if="!this.$authoritys('employee')" style="position: absolute; bottom: 20px; display: block; right: 20px;">
+			<div v-if="!this.$authoritys('employee')&&!this.$authoritys('dept_manager')" style="position: absolute; bottom: 20px; display: block; right: 20px;">
 				<el-button @click="close_integral_event">取消</el-button>
 				<el-button type="danger" @click="del_integral_event(detail_info)">删除</el-button>
 			</div>
@@ -789,6 +796,12 @@ export default {
 };
 </script>
 <style scoped lang="scss">
+.remark{
+	display: -webkit-box;
+	-webkit-box-orient: vertical;
+	-webkit-line-clamp: 2;
+	overflow: hidden;
+}	
 .title {
 	text-align: center;
 	font-weight: 700;

+ 1 - 1
src/views/set/rule.vue

@@ -106,7 +106,7 @@
 		<el-dialog :title="rule_type == 'add' ? '添加规则' : '编辑规则'" :visible.sync="rule_show" :close-on-click-modal="false" width="600px">
 			<el-form :model="rules_detail_form" ref="rules_detail_form" :rules="rules" label-width="80px">
 				<el-form-item label="规则内容" prop="remark">
-					<el-input v-model="rules_detail_form.remark" placeholder="请输入规则内容" type="textarea" :rows="3" maxlength="100" show-word-limit></el-input>
+					<el-input v-model="rules_detail_form.remark" placeholder="请输入规则内容" type="textarea" :rows="5" maxlength="300" show-word-limit></el-input>
 				</el-form-item>
 				<el-form-item label="所属分类" prop="rule_id">
 					<div style="position: relative;">

+ 0 - 1
src/views/welfare/flManagement.vue

@@ -590,7 +590,6 @@ export default {
 				this.errorMsg=e.msg
 				this.isShowError = true;
 			}
-			
 		},
 		// 确定转换
 		editRatio() {