|
|
@@ -169,20 +169,34 @@ function queryTask() {
|
|
|
// 不允许上传重复文件
|
|
|
prevent_duplicates: true
|
|
|
},
|
|
|
- onFileUploaded: function(file, responseObject) {
|
|
|
+ onUploadComplete: function(file) {
|
|
|
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) {
|
|
|
- file_src += "," + datas.result_data.path;
|
|
|
- } else {
|
|
|
- file_src += datas.result_data.path;
|
|
|
+ var type = this.$.attr("id").split("_")[2];
|
|
|
+ var param = {
|
|
|
+ "id": id
|
|
|
+ }
|
|
|
+ console.log(this.$.attr("id"));
|
|
|
+ post_common_service('q/record/one', param, function(redata) {
|
|
|
+ //debugger;
|
|
|
+ var file_src = '' ;
|
|
|
+ if(type = "videos"){
|
|
|
+ file_src = redata.videos;
|
|
|
+ }else{
|
|
|
+ file_src = redata.pics;
|
|
|
+ }
|
|
|
+ console.log(file[0].remoteData.result_data.path);
|
|
|
+ for(var index in file){
|
|
|
+ if (file_src != '' && file_src != null && file_src != undefined) {
|
|
|
+ file_src += "," + file[index].remoteData.result_data.path;
|
|
|
+ } else {
|
|
|
+ file_src += file[index].remoteData.result_data.path;
|
|
|
+ }
|
|
|
}
|
|
|
var data = {
|
|
|
"id": id,
|
|
|
"isComplete": 1
|
|
|
};
|
|
|
- if (file.type.indexOf('image') === 0) {
|
|
|
+ if (type == "pics") {
|
|
|
data.pics = file_src;
|
|
|
} else {
|
|
|
data.videos = file_src;
|
|
|
@@ -193,6 +207,7 @@ function queryTask() {
|
|
|
cur_page = taskTableObj.options.pager.p_cur;
|
|
|
queryTask();
|
|
|
});
|
|
|
+ });
|
|
|
},
|
|
|
onFilesRemoved: function(files) {
|
|
|
// alert(files);
|
|
|
@@ -359,12 +374,6 @@ function getRecord() {
|
|
|
|
|
|
}
|
|
|
|
|
|
-function setRecordId(id, videos) {
|
|
|
- recordVideos = videos;
|
|
|
- recordId = id;
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
function removeVideo(id, videos, field, index) {
|
|
|
|
|
|
|
|
|
@@ -380,7 +389,8 @@ function removeVideo(id, videos, field, index) {
|
|
|
}
|
|
|
p = p.substring(0, p.length - 1);
|
|
|
var data = {
|
|
|
- "id": recordId
|
|
|
+ "id": recordId,
|
|
|
+ "isComplete": 1
|
|
|
};
|
|
|
|
|
|
if (field == "videos") {
|