|
|
@@ -80,6 +80,7 @@ function queryTask() {
|
|
|
"startTime": getMomentTimeFormat(t.starttime),
|
|
|
"endTime": getMomentTimeFormat(t.endtime),
|
|
|
"dept": $("#deptlist").val(),
|
|
|
+ "isComplete":$("#isComplete").val(),
|
|
|
// "check_status": cur_status
|
|
|
};
|
|
|
|
|
|
@@ -95,18 +96,23 @@ function queryTask() {
|
|
|
{ width: 80, text: '车牌号', type: 'string', flex: true, hide: hide, colClass: 'text-center', field: 'car_info' },
|
|
|
{ width: 80, text: '客户信息', type: 'string', flex: true, sort: 'down', colClass: 'text-center', field: 'car_user_info' },
|
|
|
{ width: 120, text: '接警时间', type: 'string', flex: true, sort: 'down', colClass: 'text-center', field: 'received_time' },
|
|
|
- { width: 160, text: '出勤人员', type: 'string', flex: true, sort: 'down', colClass: 'text-center', field: 'userNames' },
|
|
|
+ // { width: 160, text: '最后时间', type: 'string', flex: true, sort: 'down', colClass: 'text-center', field: 'last_time' },
|
|
|
+ { width: 120, text: '出勤人员', type: 'string', flex: true, sort: 'down', colClass: 'text-center', field: 'userNames' },
|
|
|
// {width: 120, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'}
|
|
|
];
|
|
|
if (hasRole(ROLE_DDZS_ADMIN) || hasRole(ROLE_DDZS)) {
|
|
|
var colFunc = { width: 160, text: '操作', type: 'string', flex: true, field: 'id', colClass: 'text-center' };
|
|
|
+ var colStr = { width: 160, text: '最后时间', type: 'string', flex: true, sort: 'down', colClass: 'text-center', field: 'last_time' };
|
|
|
colFunc.oper = $.zui.store.get("task_table_btn_1");
|
|
|
+ cols.push(colStr);
|
|
|
cols.push(colFunc);
|
|
|
$("#saveButton").show();
|
|
|
} else if (hasRole(ROLE_WRECKER_MANAGER) || hasRole(ROLE_WRECKER_NQ) || hasRole(ROLE_WRECKER)) {
|
|
|
- var colFunc = { width: 160, text: '操作', type: 'imagebutton', flex: true, field: 'videos', colClass: 'text-center' };
|
|
|
- colFunc.oper = $.zui.store.get("task_table_btn_1");
|
|
|
- cols.push(colFunc);
|
|
|
+ var colFunc1 = { width: 160, text: '视频上传', type: 'imagebutton', flex: true, field: 'videos', colClass: 'text-center' };
|
|
|
+ var colFunc2 = { width: 160, text: '图片上传', type: 'imagebutton', flex: true, field: 'pics', colClass: 'text-center' };
|
|
|
+ // colFunc.oper = $.zui.store.get("task_table_btn_1");
|
|
|
+ cols.push(colFunc1);
|
|
|
+ cols.push(colFunc2);
|
|
|
}
|
|
|
//只有下发才显示复选框
|
|
|
var checkable = false;
|
|
|
@@ -129,20 +135,31 @@ function queryTask() {
|
|
|
renderfunction: function() {
|
|
|
|
|
|
$(".uploadervideo").each(function() {
|
|
|
+ var type = this.id.split("_")[2];
|
|
|
+ var title= '';
|
|
|
+ var extensions = '';
|
|
|
+ if(type == "videos"){
|
|
|
+ title = "视频";
|
|
|
+ extensions ='mp4,avi';
|
|
|
+ }else{
|
|
|
+ title ='图片',
|
|
|
+ extensions ='jpg,gif,png'
|
|
|
+ }
|
|
|
$(this).uploader({
|
|
|
autoUpload: true, // 当选择文件后立即自动进行上传操作
|
|
|
url: base_image_server_url + 'fileServer/file/upload', // 文件上传提交地址
|
|
|
chunk_size: 0,
|
|
|
filters: {
|
|
|
mime_types: [{
|
|
|
- title: '视频',
|
|
|
- extensions: 'mp4,avi'
|
|
|
+ title: title,
|
|
|
+ extensions: extensions
|
|
|
}],
|
|
|
+
|
|
|
// 不允许上传重复文件
|
|
|
prevent_duplicates: true
|
|
|
},
|
|
|
onFileUploaded: function(file, responseObject) {
|
|
|
- var id = this.$.attr("id").split("uploaderExample_")[1];
|
|
|
+ var id = this.$.attr("id").split("_")[1];
|
|
|
var file_src = recordVideos;
|
|
|
var datas = eval('(' + responseObject.response + ')');
|
|
|
if (file_src != '' && file_src != null && file_src != undefined) {
|
|
|
@@ -151,9 +168,13 @@ function queryTask() {
|
|
|
file_src += datas.result_data.path;
|
|
|
}
|
|
|
var data = {
|
|
|
- "videos": file_src,
|
|
|
"id": id
|
|
|
};
|
|
|
+ if(file.type.indexOf('image') === 0) {
|
|
|
+ data.pics = file_src;
|
|
|
+ }else{
|
|
|
+ data.videos = file_src;
|
|
|
+ }
|
|
|
recordVideos = file_src;
|
|
|
|
|
|
post_common_service('q/record/update', data, function(redata) {
|
|
|
@@ -313,7 +334,7 @@ function setRecordId(id, videos) {
|
|
|
}
|
|
|
|
|
|
|
|
|
-function removeVideo(id, videos, index) {
|
|
|
+function removeVideo(id, videos, field ,index) {
|
|
|
|
|
|
|
|
|
var p = "";
|
|
|
@@ -327,11 +348,14 @@ function removeVideo(id, videos, index) {
|
|
|
}
|
|
|
}
|
|
|
p = p.substring(0, p.length - 1);
|
|
|
-
|
|
|
var data = {
|
|
|
- "videos": p,
|
|
|
"id": recordId
|
|
|
};
|
|
|
+ if(field == videos){
|
|
|
+ data.videos = p;
|
|
|
+ }else{
|
|
|
+ data.pics = p;
|
|
|
+ }
|
|
|
post_common_service('q/record/update', data, function(redata) {
|
|
|
queryTask();
|
|
|
});
|